]> Git Repo - linux.git/commitdiff
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
authorLinus Torvalds <[email protected]>
Wed, 18 Jan 2012 23:51:48 +0000 (15:51 -0800)
committerLinus Torvalds <[email protected]>
Wed, 18 Jan 2012 23:51:48 +0000 (15:51 -0800)
This includes initial support for the recently published ACPI 5.0 spec.
In particular, support for the "hardware-reduced" bit that eliminates
the dependency on legacy hardware.

APEI has patches resulting from testing on real hardware.

Plus other random fixes.

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (52 commits)
  acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec
  intel_idle: Split up and provide per CPU initialization func
  ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2
  ACPI processor: Remove unneeded cpuidle_unregister_driver call
  intel idle: Make idle driver more robust
  intel_idle: Fix a cast to pointer from integer of different size warning in intel_idle
  ACPI: kernel-parameters.txt : Add intel_idle.max_cstate
  intel_idle: remove redundant local_irq_disable() call
  ACPI processor: Fix error path, also remove sysdev link
  ACPI: processor: fix acpi_get_cpuid for UP processor
  intel_idle: fix API misuse
  ACPI APEI: Convert atomicio routines
  ACPI: Export interfaces for ioremapping/iounmapping ACPI registers
  ACPI: Fix possible alignment issues with GAS 'address' references
  ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64)
  ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64)
  ACPI: Store SRAT table revision
  ACPI, APEI, Resolve false conflict between ACPI NVS and APEI
  ACPI, Record ACPI NVS regions
  ACPI, APEI, EINJ, Refine the fix of resource conflict
  ...

12 files changed:
1  2 
Documentation/kernel-parameters.txt
arch/x86/kernel/e820.c
arch/x86/mm/srat.c
drivers/acpi/acpica/acglobal.h
drivers/acpi/acpica/hwxface.c
drivers/acpi/apei/erst.c
drivers/acpi/apei/ghes.c
drivers/acpi/apei/hest.c
drivers/acpi/processor_driver.c
include/acpi/acpixf.h
include/linux/acpi.h
include/linux/cpuidle.h

index b29f3c416296ef880203a02c1d9b8c707f09206a,c6a56d8b901caeb7c6ff94d44b05906f086335c0..033d4e69b43b107d9780ec959105823e6cefd07c
@@@ -329,11 -329,6 +329,11 @@@ bytes respectively. Such letter suffixe
                                    is a lot of faster
                        off       - do not initialize any AMD IOMMU found in
                                    the system
 +                      force_isolation - Force device isolation for all
 +                                        devices. The IOMMU driver is not
 +                                        allowed anymore to lift isolation
 +                                        requirements as needed. This option
 +                                        does not override iommu=pt
  
        amijoy.map=     [HW,JOY] Amiga joystick support
                        Map of devices attached to JOY0DAT and JOY1DAT
        no_debug_objects
                        [KNL] Disable object debugging
  
 +      debug_guardpage_minorder=
 +                      [KNL] When CONFIG_DEBUG_PAGEALLOC is set, this
 +                      parameter allows control of the order of pages that will
 +                      be intentionally kept free (and hence protected) by the
 +                      buddy allocator. Bigger value increase the probability
 +                      of catching random memory corruption, but reduce the
 +                      amount of memory for normal system use. The maximum
 +                      possible value is MAX_ORDER/2.  Setting this parameter
 +                      to 1 or 2 should be enough to identify most random
 +                      memory corruption problems caused by bugs in kernel or
 +                      driver code when a CPU writes to (or reads from) a
 +                      random memory location. Note that there exists a class
 +                      of memory corruptions problems caused by buggy H/W or
 +                      F/W or by drivers badly programing DMA (basically when
 +                      memory is written at bus level and the CPU MMU is
 +                      bypassed) which are not detectable by
 +                      CONFIG_DEBUG_PAGEALLOC, hence this option will not help
 +                      tracking down these problems.
 +
        debugpat        [X86] Enable PAT debugging
  
        decnet.addr=    [HW,NET]
                        By default, super page will be supported if Intel IOMMU
                        has the capability. With this option, super page will
                        not be supported.
+       intel_idle.max_cstate=  [KNL,HW,ACPI,X86]
+                       0       disables intel_idle and fall back on acpi_idle.
+                       1 to 6  specify maximum depth of C-state.
        intremap=       [X86-64, Intel-IOMMU]
                        on      enable Interrupt Remapping (default)
                        off     disable Interrupt Remapping
                nomerge
                forcesac
                soft
 -              pt      [x86, IA-64]
 +              pt              [x86, IA-64]
 +              group_mf        [x86, IA-64]
 +
  
        io7=            [HW] IO7 for Marvel based alpha systems
                        See comment before marvel_specify_io7 in
        kvm.ignore_msrs=[KVM] Ignore guest accesses to unhandled MSRs.
                        Default is 0 (don't ignore, but inject #GP)
  
 -      kvm.oos_shadow= [KVM] Disable out-of-sync shadow paging.
 -                      Default is 1 (enabled)
 -
        kvm.mmu_audit=  [KVM] This is a R/W parameter which allows audit
                        KVM MMU at runtime.
                        Default is 0 (off)
                        The default is to return 64-bit inode numbers.
  
        nfs.nfs4_disable_idmapping=
 -                      [NFSv4] When set, this option disables the NFSv4
 -                      idmapper on the client, but only if the mount
 -                      is using the 'sec=sys' security flavour. This may
 -                      make migration from legacy NFSv2/v3 systems easier
 -                      provided that the server has the appropriate support.
 -                      The default is to always enable NFSv4 idmapping.
 +                      [NFSv4] When set to the default of '1', this option
 +                      ensures that both the RPC level authentication
 +                      scheme and the NFS level operations agree to use
 +                      numeric uids/gids if the mount is using the
 +                      'sec=sys' security flavour. In effect it is
 +                      disabling idmapping, which can make migration from
 +                      legacy NFSv2/v3 systems to NFSv4 easier.
 +                      Servers that do not support this mode of operation
 +                      will be autodetected by the client, and it will fall
 +                      back to using the idmapper.
 +                      To turn off this behaviour, set the value to '0'.
  
        nmi_debug=      [KNL,AVR32,SH] Specify one or more actions to take
                        when a NMI is triggered.
        nomfgpt         [X86-32] Disable Multi-Function General Purpose
                        Timer usage (for AMD Geode machines).
  
 +      nonmi_ipi       [X86] Disable using NMI IPIs during panic/reboot to
 +                      shutdown the other cpus.  Instead use the REBOOT_VECTOR
 +                      irq.
 +
        nopat           [X86] Disable PAT (page attribute table extension of
                        pagetables) support.
  
                        arch_perfmon: [X86] Force use of architectural
                                perfmon on Intel CPUs instead of the
                                CPU specific event set.
 +                      timer: [X86] Force use of architectural NMI
 +                              timer mode (see also oprofile.timer
 +                              for generic hr timer mode)
 +                              [s390] Force legacy basic mode sampling
 +                                (report cpu_type "timer")
  
        oops=panic      Always panic on oopses. Default is to just kill the
                        process, but there is a small probability of
  
        slram=          [HW,MTD]
  
 +      slab_max_order= [MM, SLAB]
 +                      Determines the maximum allowed order for slabs.
 +                      A high setting may cause OOMs due to memory
 +                      fragmentation.  Defaults to 1 for systems with
 +                      more than 32MB of RAM, 0 otherwise.
 +
        slub_debug[=options[,slabs]]    [MM, SLUB]
                        Enabling slub_debug allows one to determine the
                        culprit if slab objects become corrupted. Enabling
        stacktrace      [FTRACE]
                        Enabled the stack tracer on boot up.
  
 +      stacktrace_filter=[function-list]
 +                      [FTRACE] Limit the functions that the stack tracer
 +                      will trace at boot up. function-list is a comma separated
 +                      list of functions. This list can be changed at run
 +                      time by the stack_trace_filter file in the debugfs
 +                      tracing directory. Note, this enables stack tracing
 +                      and the stacktrace above is not needed.
 +
        sti=            [PARISC,HW]
                        Format: <num>
                        Set the STI (builtin display/keyboard on the HP-PARISC
                        [USB] Start with the old device initialization
                        scheme (default 0 = off).
  
 +      usbcore.usbfs_memory_mb=
 +                      [USB] Memory limit (in MB) for buffers allocated by
 +                      usbfs (default = 16, 0 = max = 2047).
 +
        usbcore.use_both_schemes=
                        [USB] Try the other device initialization scheme
                        if the first one fails (default 1 = enabled).
                        functions are at fixed addresses, they make nice
                        targets for exploits that can control RIP.
  
 -                      emulate     Vsyscalls turn into traps and are emulated
 -                                  reasonably safely.
 +                      emulate     [default] Vsyscalls turn into traps and are
 +                                  emulated reasonably safely.
  
 -                      native      [default] Vsyscalls are native syscall
 -                                  instructions.
 +                      native      Vsyscalls are native syscall instructions.
                                    This is a little bit faster than trapping
                                    and makes a few dynamic recompilers work
                                    better than they would in emulation mode.
diff --combined arch/x86/kernel/e820.c
index 174d938d576b347365f4fdab2de8e7b85fd36f53,51c3b186e5b9466c420ad862bedbb77dff045d19..62d61e9976eb0a83bca3aae5c979bb63505c0bbb
@@@ -19,7 -19,6 +19,7 @@@
  #include <linux/acpi.h>
  #include <linux/firmware-map.h>
  #include <linux/memblock.h>
 +#include <linux/sort.h>
  
  #include <asm/e820.h>
  #include <asm/proto.h>
@@@ -228,38 -227,22 +228,38 @@@ void __init e820_print_map(char *who
   *       ____________________33__
   *       ______________________4_
   */
 +struct change_member {
 +      struct e820entry *pbios; /* pointer to original bios entry */
 +      unsigned long long addr; /* address for this change point */
 +};
 +
 +static int __init cpcompare(const void *a, const void *b)
 +{
 +      struct change_member * const *app = a, * const *bpp = b;
 +      const struct change_member *ap = *app, *bp = *bpp;
 +
 +      /*
 +       * Inputs are pointers to two elements of change_point[].  If their
 +       * addresses are unequal, their difference dominates.  If the addresses
 +       * are equal, then consider one that represents the end of its region
 +       * to be greater than one that does not.
 +       */
 +      if (ap->addr != bp->addr)
 +              return ap->addr > bp->addr ? 1 : -1;
 +
 +      return (ap->addr != ap->pbios->addr) - (bp->addr != bp->pbios->addr);
 +}
  
  int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map,
                             u32 *pnr_map)
  {
 -      struct change_member {
 -              struct e820entry *pbios; /* pointer to original bios entry */
 -              unsigned long long addr; /* address for this change point */
 -      };
        static struct change_member change_point_list[2*E820_X_MAX] __initdata;
        static struct change_member *change_point[2*E820_X_MAX] __initdata;
        static struct e820entry *overlap_list[E820_X_MAX] __initdata;
        static struct e820entry new_bios[E820_X_MAX] __initdata;
 -      struct change_member *change_tmp;
        unsigned long current_type, last_type;
        unsigned long long last_addr;
 -      int chgidx, still_changing;
 +      int chgidx;
        int overlap_entries;
        int new_bios_entry;
        int old_nr, new_nr, chg_nr;
        chg_nr = chgidx;
  
        /* sort change-point list by memory addresses (low -> high) */
 -      still_changing = 1;
 -      while (still_changing)  {
 -              still_changing = 0;
 -              for (i = 1; i < chg_nr; i++)  {
 -                      unsigned long long curaddr, lastaddr;
 -                      unsigned long long curpbaddr, lastpbaddr;
 -
 -                      curaddr = change_point[i]->addr;
 -                      lastaddr = change_point[i - 1]->addr;
 -                      curpbaddr = change_point[i]->pbios->addr;
 -                      lastpbaddr = change_point[i - 1]->pbios->addr;
 -
 -                      /*
 -                       * swap entries, when:
 -                       *
 -                       * curaddr > lastaddr or
 -                       * curaddr == lastaddr and curaddr == curpbaddr and
 -                       * lastaddr != lastpbaddr
 -                       */
 -                      if (curaddr < lastaddr ||
 -                          (curaddr == lastaddr && curaddr == curpbaddr &&
 -                           lastaddr != lastpbaddr)) {
 -                              change_tmp = change_point[i];
 -                              change_point[i] = change_point[i-1];
 -                              change_point[i-1] = change_tmp;
 -                              still_changing = 1;
 -                      }
 -              }
 -      }
 +      sort(change_point, chg_nr, sizeof *change_point, cpcompare, NULL);
  
        /* create a new bios memory map, removing overlaps */
        overlap_entries = 0;     /* number of entries in the overlap table */
@@@ -703,7 -714,7 +703,7 @@@ void __init e820_mark_nosave_regions(un
  }
  #endif
  
- #ifdef CONFIG_HIBERNATION
+ #ifdef CONFIG_ACPI
  /**
   * Mark ACPI NVS memory region, so that we can save/restore it during
   * hibernation and the subsequent resume.
@@@ -716,7 -727,7 +716,7 @@@ static int __init e820_mark_nvs_memory(
                struct e820entry *ei = &e820.map[i];
  
                if (ei->type == E820_NVS)
-                       suspend_nvs_register(ei->addr, ei->size);
+                       acpi_nvs_register(ei->addr, ei->size);
        }
  
        return 0;
@@@ -727,17 -738,35 +727,17 @@@ core_initcall(e820_mark_nvs_memory)
  /*
   * pre allocated 4k and reserved it in memblock and e820_saved
   */
 -u64 __init early_reserve_e820(u64 startt, u64 sizet, u64 align)
 +u64 __init early_reserve_e820(u64 size, u64 align)
  {
 -      u64 size = 0;
        u64 addr;
 -      u64 start;
  
 -      for (start = startt; ; start += size) {
 -              start = memblock_x86_find_in_range_size(start, &size, align);
 -              if (start == MEMBLOCK_ERROR)
 -                      return 0;
 -              if (size >= sizet)
 -                      break;
 +      addr = __memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ACCESSIBLE);
 +      if (addr) {
 +              e820_update_range_saved(addr, size, E820_RAM, E820_RESERVED);
 +              printk(KERN_INFO "update e820_saved for early_reserve_e820\n");
 +              update_e820_saved();
        }
  
 -#ifdef CONFIG_X86_32
 -      if (start >= MAXMEM)
 -              return 0;
 -      if (start + size > MAXMEM)
 -              size = MAXMEM - start;
 -#endif
 -
 -      addr = round_down(start + size - sizet, align);
 -      if (addr < start)
 -              return 0;
 -      memblock_x86_reserve_range(addr, addr + sizet, "new next");
 -      e820_update_range_saved(addr, sizet, E820_RAM, E820_RESERVED);
 -      printk(KERN_INFO "update e820_saved for early_reserve_e820\n");
 -      update_e820_saved();
 -
        return addr;
  }
  
@@@ -1061,7 -1090,7 +1061,7 @@@ void __init memblock_x86_fill(void
         * We are safe to enable resizing, beause memblock_x86_fill()
         * is rather later for x86
         */
 -      memblock_can_resize = 1;
 +      memblock_allow_resize();
  
        for (i = 0; i < e820.nr_map; i++) {
                struct e820entry *ei = &e820.map[i];
                memblock_add(ei->addr, ei->size);
        }
  
 -      memblock_analyze();
        memblock_dump_all();
  }
  
  void __init memblock_find_dma_reserve(void)
  {
  #ifdef CONFIG_X86_64
 -      u64 free_size_pfn;
 -      u64 mem_size_pfn;
 +      u64 nr_pages = 0, nr_free_pages = 0;
 +      unsigned long start_pfn, end_pfn;
 +      phys_addr_t start, end;
 +      int i;
 +      u64 u;
 +
        /*
         * need to find out used area below MAX_DMA_PFN
         * need to use memblock to get free size in [0, MAX_DMA_PFN]
         * at first, and assume boot_mem will not take below MAX_DMA_PFN
         */
 -      mem_size_pfn = memblock_x86_memory_in_range(0, MAX_DMA_PFN << PAGE_SHIFT) >> PAGE_SHIFT;
 -      free_size_pfn = memblock_x86_free_memory_in_range(0, MAX_DMA_PFN << PAGE_SHIFT) >> PAGE_SHIFT;
 -      set_dma_reserve(mem_size_pfn - free_size_pfn);
 +      for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) {
 +              start_pfn = min_t(unsigned long, start_pfn, MAX_DMA_PFN);
 +              end_pfn = min_t(unsigned long, end_pfn, MAX_DMA_PFN);
 +              nr_pages += end_pfn - start_pfn;
 +      }
 +
 +      for_each_free_mem_range(u, MAX_NUMNODES, &start, &end, NULL) {
 +              start_pfn = min_t(unsigned long, PFN_UP(start), MAX_DMA_PFN);
 +              end_pfn = min_t(unsigned long, PFN_DOWN(end), MAX_DMA_PFN);
 +              if (start_pfn < end_pfn)
 +                      nr_free_pages += end_pfn - start_pfn;
 +      }
 +
 +      set_dma_reserve(nr_pages - nr_free_pages);
  #endif
  }
diff --combined arch/x86/mm/srat.c
index fd61b3fb73411f89b5a5d1b2805e133bcbd8be94,7efd0c615d58d9189c723fdde0e52838a320a6a3..1c1c4f46a7c15c19c54923c815556d8c253b847c
@@@ -69,12 -69,6 +69,12 @@@ acpi_numa_x2apic_affinity_init(struct a
        if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
                return;
        pxm = pa->proximity_domain;
 +      apic_id = pa->apic_id;
 +      if (!cpu_has_x2apic && (apic_id >= 0xff)) {
 +              printk(KERN_INFO "SRAT: PXM %u -> X2APIC 0x%04x ignored\n",
 +                       pxm, apic_id);
 +              return;
 +      }
        node = setup_node(pxm);
        if (node < 0) {
                printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
@@@ -82,6 -76,7 +82,6 @@@
                return;
        }
  
 -      apic_id = pa->apic_id;
        if (apic_id >= MAX_LOCAL_APIC) {
                printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%04x -> Node %u skipped apicid that is too big\n", pxm, apic_id, node);
                return;
@@@ -109,6 -104,8 +109,8 @@@ acpi_numa_processor_affinity_init(struc
        if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
                return;
        pxm = pa->proximity_domain_lo;
+       if (acpi_srat_revision >= 2)
+               pxm |= *((unsigned int*)pa->proximity_domain_hi) << 8;
        node = setup_node(pxm);
        if (node < 0) {
                printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
@@@ -160,6 -157,8 +162,8 @@@ acpi_numa_memory_affinity_init(struct a
        start = ma->base_address;
        end = start + ma->length;
        pxm = ma->proximity_domain;
+       if (acpi_srat_revision <= 1)
+               pxm &= 0xff;
        node = setup_node(pxm);
        if (node < 0) {
                printk(KERN_ERR "SRAT: Too many proximity domains.\n");
index e6652d716e45727cf992838b4420902b80436ce7,261fd5eb2b685fd8094c38b564fb71830e212842..2853f7673f3bdf05235384b21a614bd1ac331084
@@@ -5,7 -5,7 +5,7 @@@
   *****************************************************************************/
  
  /*
-  * Copyright (C) 2000 - 2011, Intel Corp.
+  * Copyright (C) 2000 - 2012, Intel Corp.
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -108,7 -108,7 +108,7 @@@ u8 ACPI_INIT_GLOBAL(acpi_gbl_use_defaul
  /*
   * Optionally enable output from the AML Debug Object.
   */
 -u32 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
 +bool ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
  
  /*
   * Optionally copy the entire DSDT to local memory (instead of simply
@@@ -140,8 -140,19 +140,19 @@@ u32 acpi_gbl_trace_flags
  acpi_name acpi_gbl_trace_method_name;
  u8 acpi_gbl_system_awake_and_running;
  
+ /*
+  * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
+  * that the ACPI hardware is no longer required. A flag in the FADT indicates
+  * a reduced HW machine, and that flag is duplicated here for convenience.
+  */
+ u8 acpi_gbl_reduced_hardware;
  #endif
  
+ /* Do not disassemble buffers to resource descriptors */
+ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE);
  /*****************************************************************************
   *
   * Debug support
@@@ -207,7 -218,7 +218,7 @@@ ACPI_EXTERN struct acpi_rw_lock acpi_gb
  
  /*****************************************************************************
   *
-  * Mutual exlusion within ACPICA subsystem
+  * Mutual exclusion within ACPICA subsystem
   *
   ****************************************************************************/
  
@@@ -295,6 -306,8 +306,8 @@@ ACPI_EXTERN u8 acpi_gbl_acpi_hardware_p
  ACPI_EXTERN u8 acpi_gbl_events_initialized;
  ACPI_EXTERN u8 acpi_gbl_osi_data;
  ACPI_EXTERN struct acpi_interface_info *acpi_gbl_supported_interfaces;
+ ACPI_EXTERN struct acpi_address_range
+     *acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX];
  
  #ifndef DEFINE_ACPI_GLOBALS
  
index d707756228c2eaddec8d4c99cd00ce3d19b92da8,7bdbbcf35f85926c6d2a0dbc1e251901f2c41829..9d38eb6c0d0b9107866f355c4aa9419937ebb883
@@@ -6,7 -6,7 +6,7 @@@
   *****************************************************************************/
  
  /*
-  * Copyright (C) 2000 - 2011, Intel Corp.
+  * Copyright (C) 2000 - 2012, Intel Corp.
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -356,7 -356,7 +356,7 @@@ ACPI_EXPORT_SYMBOL(acpi_read_bit_regist
   *
   * PARAMETERS:  register_id     - ID of ACPI Bit Register to access
   *              Value           - Value to write to the register, in bit
 - *                                position zero. The bit is automaticallly
 + *                                position zero. The bit is automatically
   *                                shifted to the correct position.
   *
   * RETURN:      Status
diff --combined drivers/acpi/apei/erst.c
index 6a9e3bad13f418d93572faff72d18a4df124f8e8,8e8d786c5d235d19ea8cd4fd760f4d39d00274ed..eb9fab5b96e4d3dca071e11e8dbdec2405b23508
@@@ -934,8 -934,7 +934,8 @@@ static int erst_close_pstore(struct pst
  static ssize_t erst_reader(u64 *id, enum pstore_type_id *type,
                           struct timespec *time, char **buf,
                           struct pstore_info *psi);
 -static int erst_writer(enum pstore_type_id type, u64 *id, unsigned int part,
 +static int erst_writer(enum pstore_type_id type, enum kmsg_dump_reason reason,
 +                     u64 *id, unsigned int part,
                       size_t size, struct pstore_info *psi);
  static int erst_clearer(enum pstore_type_id type, u64 id,
                        struct pstore_info *psi);
@@@ -1054,8 -1053,7 +1054,8 @@@ out
        return (rc < 0) ? rc : (len - sizeof(*rcd));
  }
  
 -static int erst_writer(enum pstore_type_id type, u64 *id, unsigned int part,
 +static int erst_writer(enum pstore_type_id type, enum kmsg_dump_reason reason,
 +                     u64 *id, unsigned int part,
                       size_t size, struct pstore_info *psi)
  {
        struct cper_pstore_record *rcd = (struct cper_pstore_record *)
@@@ -1127,10 -1125,9 +1127,9 @@@ static int __init erst_init(void
  
        status = acpi_get_table(ACPI_SIG_ERST, 0,
                                (struct acpi_table_header **)&erst_tab);
-       if (status == AE_NOT_FOUND) {
-               pr_info(ERST_PFX "Table is not found!\n");
+       if (status == AE_NOT_FOUND)
                goto err;
-       else if (ACPI_FAILURE(status)) {
+       else if (ACPI_FAILURE(status)) {
                const char *msg = acpi_format_exception(status);
                pr_err(ERST_PFX "Failed to get table, %s\n", msg);
                rc = -EINVAL;
diff --combined drivers/acpi/apei/ghes.c
index ebaf037a787b5479dcc87100e883a3440b8ef25f,b3207e16670e5a231ae6d0c72ee226f2415a8efc..9b3cac0abecc33c672c884ece470dfb494d1836c
@@@ -33,6 -33,7 +33,7 @@@
  #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/acpi.h>
+ #include <linux/acpi_io.h>
  #include <linux/io.h>
  #include <linux/interrupt.h>
  #include <linux/timer.h>
@@@ -45,8 -46,9 +46,9 @@@
  #include <linux/irq_work.h>
  #include <linux/llist.h>
  #include <linux/genalloc.h>
+ #include <linux/pci.h>
+ #include <linux/aer.h>
  #include <acpi/apei.h>
- #include <acpi/atomicio.h>
  #include <acpi/hed.h>
  #include <asm/mce.h>
  #include <asm/tlbflush.h>
@@@ -118,7 -120,7 +120,7 @@@ struct ghes_estatus_cache 
        struct rcu_head rcu;
  };
  
 -int ghes_disable;
 +bool ghes_disable;
  module_param_named(disable, ghes_disable, bool, 0);
  
  static int ghes_panic_timeout __read_mostly = 30;
@@@ -299,7 -301,7 +301,7 @@@ static struct ghes *ghes_new(struct acp
        if (!ghes)
                return ERR_PTR(-ENOMEM);
        ghes->generic = generic;
-       rc = acpi_pre_map_gar(&generic->error_status_address);
+       rc = acpi_os_map_generic_address(&generic->error_status_address);
        if (rc)
                goto err_free;
        error_block_length = generic->error_block_length;
        return ghes;
  
  err_unmap:
-       acpi_post_unmap_gar(&generic->error_status_address);
+       acpi_os_unmap_generic_address(&generic->error_status_address);
  err_free:
        kfree(ghes);
        return ERR_PTR(rc);
  static void ghes_fini(struct ghes *ghes)
  {
        kfree(ghes->estatus);
-       acpi_post_unmap_gar(&ghes->generic->error_status_address);
+       acpi_os_unmap_generic_address(&ghes->generic->error_status_address);
  }
  
  enum {
@@@ -399,7 -401,7 +401,7 @@@ static int ghes_read_estatus(struct ghe
        u32 len;
        int rc;
  
-       rc = acpi_atomic_read(&buf_paddr, &g->error_status_address);
+       rc = apei_read(&buf_paddr, &g->error_status_address);
        if (rc) {
                if (!silent && printk_ratelimit())
                        pr_warning(FW_WARN GHES_PFX
@@@ -476,6 -478,27 +478,27 @@@ static void ghes_do_proc(const struct a
                        }
  #endif
                }
+ #ifdef CONFIG_ACPI_APEI_PCIEAER
+               else if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
+                                     CPER_SEC_PCIE)) {
+                       struct cper_sec_pcie *pcie_err;
+                       pcie_err = (struct cper_sec_pcie *)(gdata+1);
+                       if (sev == GHES_SEV_RECOVERABLE &&
+                           sec_sev == GHES_SEV_RECOVERABLE &&
+                           pcie_err->validation_bits & CPER_PCIE_VALID_DEVICE_ID &&
+                           pcie_err->validation_bits & CPER_PCIE_VALID_AER_INFO) {
+                               unsigned int devfn;
+                               int aer_severity;
+                               devfn = PCI_DEVFN(pcie_err->device_id.device,
+                                                 pcie_err->device_id.function);
+                               aer_severity = cper_severity_to_aer(sev);
+                               aer_recover_queue(pcie_err->device_id.segment,
+                                                 pcie_err->device_id.bus,
+                                                 devfn, aer_severity);
+                       }
+               }
+ #endif
        }
  }
  
@@@ -483,16 -506,22 +506,22 @@@ static void __ghes_print_estatus(const 
                                 const struct acpi_hest_generic *generic,
                                 const struct acpi_hest_generic_status *estatus)
  {
+       static atomic_t seqno;
+       unsigned int curr_seqno;
+       char pfx_seq[64];
        if (pfx == NULL) {
                if (ghes_severity(estatus->error_severity) <=
                    GHES_SEV_CORRECTED)
-                       pfx = KERN_WARNING HW_ERR;
+                       pfx = KERN_WARNING;
                else
-                       pfx = KERN_ERR HW_ERR;
+                       pfx = KERN_ERR;
        }
+       curr_seqno = atomic_inc_return(&seqno);
+       snprintf(pfx_seq, sizeof(pfx_seq), "%s{%u}" HW_ERR, pfx, curr_seqno);
        printk("%s""Hardware error from APEI Generic Hardware Error Source: %d\n",
-              pfx, generic->header.source_id);
-       apei_estatus_print(pfx, estatus);
+              pfx_seq, generic->header.source_id);
+       apei_estatus_print(pfx_seq, estatus);
  }
  
  static int ghes_print_estatus(const char *pfx,
@@@ -711,26 -740,34 +740,34 @@@ static int ghes_notify_sci(struct notif
        return ret;
  }
  
+ static struct llist_node *llist_nodes_reverse(struct llist_node *llnode)
+ {
+       struct llist_node *next, *tail = NULL;
+       while (llnode) {
+               next = llnode->next;
+               llnode->next = tail;
+               tail = llnode;
+               llnode = next;
+       }
+       return tail;
+ }
  static void ghes_proc_in_irq(struct irq_work *irq_work)
  {
-       struct llist_node *llnode, *next, *tail = NULL;
+       struct llist_node *llnode, *next;
        struct ghes_estatus_node *estatus_node;
        struct acpi_hest_generic *generic;
        struct acpi_hest_generic_status *estatus;
        u32 len, node_len;
  
+       llnode = llist_del_all(&ghes_estatus_llist);
        /*
         * Because the time order of estatus in list is reversed,
         * revert it back to proper order.
         */
-       llnode = llist_del_all(&ghes_estatus_llist);
-       while (llnode) {
-               next = llnode->next;
-               llnode->next = tail;
-               tail = llnode;
-               llnode = next;
-       }
-       llnode = tail;
+       llnode = llist_nodes_reverse(llnode);
        while (llnode) {
                next = llnode->next;
                estatus_node = llist_entry(llnode, struct ghes_estatus_node,
        }
  }
  
+ static void ghes_print_queued_estatus(void)
+ {
+       struct llist_node *llnode;
+       struct ghes_estatus_node *estatus_node;
+       struct acpi_hest_generic *generic;
+       struct acpi_hest_generic_status *estatus;
+       u32 len, node_len;
+       llnode = llist_del_all(&ghes_estatus_llist);
+       /*
+        * Because the time order of estatus in list is reversed,
+        * revert it back to proper order.
+        */
+       llnode = llist_nodes_reverse(llnode);
+       while (llnode) {
+               estatus_node = llist_entry(llnode, struct ghes_estatus_node,
+                                          llnode);
+               estatus = GHES_ESTATUS_FROM_NODE(estatus_node);
+               len = apei_estatus_len(estatus);
+               node_len = GHES_ESTATUS_NODE_LEN(len);
+               generic = estatus_node->generic;
+               ghes_print_estatus(NULL, generic, estatus);
+               llnode = llnode->next;
+       }
+ }
  static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs)
  {
        struct ghes *ghes, *ghes_global = NULL;
  
        if (sev_global >= GHES_SEV_PANIC) {
                oops_begin();
-               __ghes_print_estatus(KERN_EMERG HW_ERR, ghes_global->generic,
+               ghes_print_queued_estatus();
+               __ghes_print_estatus(KERN_EMERG, ghes_global->generic,
                                     ghes_global->estatus);
                /* reboot to log the error! */
                if (panic_timeout == 0)
diff --combined drivers/acpi/apei/hest.c
index ee7fddc4665c9788d1502f0f28304493cede903b,f709269d49328a6920c20a809c28827a46585f90..7f00cf38098f21bdbe0d6a69ba624d18b00f7cb3
@@@ -41,7 -41,7 +41,7 @@@
  
  #define HEST_PFX "HEST: "
  
 -int hest_disable;
 +bool hest_disable;
  EXPORT_SYMBOL_GPL(hest_disable);
  
  /* HEST table parsing */
@@@ -221,10 -221,9 +221,9 @@@ void __init acpi_hest_init(void
  
        status = acpi_get_table(ACPI_SIG_HEST, 0,
                                (struct acpi_table_header **)&hest_tab);
-       if (status == AE_NOT_FOUND) {
-               pr_info(HEST_PFX "Table not found.\n");
+       if (status == AE_NOT_FOUND)
                goto err;
-       else if (ACPI_FAILURE(status)) {
+       else if (ACPI_FAILURE(status)) {
                const char *msg = acpi_format_exception(status);
                pr_err(HEST_PFX "Failed to get table, %s\n", msg);
                rc = -EINVAL;
index 20a68ca386de033dac092e74541f66f78cb21466,b9cbd9b094509cf3022217400544c3c660a451cf..0034ede387103e4d32a649507bece321eae7d93f
@@@ -82,7 -82,7 +82,7 @@@ MODULE_LICENSE("GPL")
  static int acpi_processor_add(struct acpi_device *device);
  static int acpi_processor_remove(struct acpi_device *device, int type);
  static void acpi_processor_notify(struct acpi_device *device, u32 event);
- static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu);
+ static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr);
  static int acpi_processor_handle_eject(struct acpi_processor *pr);
  
  
@@@ -324,10 -324,8 +324,8 @@@ static int acpi_processor_get_info(stru
         *  they are physically not present.
         */
        if (pr->id == -1) {
-               if (ACPI_FAILURE
-                   (acpi_processor_hotadd_init(pr->handle, &pr->id))) {
+               if (ACPI_FAILURE(acpi_processor_hotadd_init(pr)))
                        return -ENODEV;
-               }
        }
        /*
         * On some boxes several processors use the same processor bus id.
@@@ -446,7 -444,7 +444,7 @@@ static int __cpuinit acpi_processor_add
  {
        struct acpi_processor *pr = NULL;
        int result = 0;
 -      struct sys_device *sysdev;
 +      struct device *dev;
  
        pr = kzalloc(sizeof(struct acpi_processor), GFP_KERNEL);
        if (!pr)
  
        per_cpu(processors, pr->id) = pr;
  
 -      sysdev = get_cpu_sysdev(pr->id);
 -      if (sysfs_create_link(&device->dev.kobj, &sysdev->kobj, "sysdev")) {
 +      dev = get_cpu_device(pr->id);
 +      if (sysfs_create_link(&device->dev.kobj, &dev->kobj, "sysdev")) {
                result = -EFAULT;
                goto err_free_cpumask;
        }
@@@ -539,6 -537,7 +537,7 @@@ err_thermal_unregister
        thermal_cooling_device_unregister(pr->cdev);
  err_power_exit:
        acpi_processor_power_exit(pr, device);
+       sysfs_remove_link(&device->dev.kobj, "sysdev");
  err_free_cpumask:
        free_cpumask_var(pr->throttling.shared_cpu_map);
  
@@@ -720,18 -719,19 +719,19 @@@ processor_walk_namespace_cb(acpi_handl
        return (AE_OK);
  }
  
- static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu)
+ static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr)
  {
+       acpi_handle handle = pr->handle;
  
        if (!is_processor_present(handle)) {
                return AE_ERROR;
        }
  
-       if (acpi_map_lsapic(handle, p_cpu))
+       if (acpi_map_lsapic(handle, &pr->id))
                return AE_ERROR;
  
-       if (arch_register_cpu(*p_cpu)) {
-               acpi_unmap_lsapic(*p_cpu);
+       if (arch_register_cpu(pr->id)) {
+               acpi_unmap_lsapic(pr->id);
                return AE_ERROR;
        }
  
@@@ -748,7 -748,7 +748,7 @@@ static int acpi_processor_handle_eject(
        return (0);
  }
  #else
- static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu)
+ static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr)
  {
        return AE_ERROR;
  }
@@@ -827,8 -827,6 +827,6 @@@ static void __exit acpi_processor_exit(
  
        acpi_bus_unregister_driver(&acpi_processor_driver);
  
-       cpuidle_unregister_driver(&acpi_idle_driver);
        return;
  }
  
diff --combined include/acpi/acpixf.h
index 7762bc2d8404370d27be30e362b031e4da26af4c,dceeaf51d706a7839fb5875904011d57cfc38467..a28da35ba45ee3f1fd3bcdf2b8a7f64bbe5d2391
@@@ -47,7 -47,7 +47,7 @@@
  
  /* Current ACPICA subsystem version in YYYYMMDD format */
  
- #define ACPI_CA_VERSION                 0x20110623
+ #define ACPI_CA_VERSION                 0x20120111
  
  #include "actypes.h"
  #include "actbl.h"
@@@ -66,7 -66,7 +66,7 @@@ extern u8 acpi_gbl_create_osi_method
  extern u8 acpi_gbl_use_default_register_widths;
  extern acpi_name acpi_gbl_trace_method_name;
  extern u32 acpi_gbl_trace_flags;
 -extern u32 acpi_gbl_enable_aml_debug_object;
 +extern bool acpi_gbl_enable_aml_debug_object;
  extern u8 acpi_gbl_copy_dsdt_locally;
  extern u8 acpi_gbl_truncate_io_addresses;
  extern u8 acpi_gbl_disable_auto_repair;
@@@ -74,6 -74,7 +74,7 @@@
  extern u32 acpi_current_gpe_count;
  extern struct acpi_table_fadt acpi_gbl_FADT;
  extern u8 acpi_gbl_system_awake_and_running;
+ extern u8 acpi_gbl_reduced_hardware;  /* ACPI 5.0 */
  
  extern u32 acpi_rsdt_forced;
  /*
@@@ -111,6 -112,11 +112,11 @@@ acpi_status acpi_install_interface(acpi
  
  acpi_status acpi_remove_interface(acpi_string interface_name);
  
+ u32
+ acpi_check_address_range(acpi_adr_space_type space_id,
+                        acpi_physical_address address,
+                        acpi_size length, u8 warn);
  /*
   * ACPI Memory management
   */
@@@ -276,12 -282,23 +282,23 @@@ acpi_status acpi_install_exception_hand
  acpi_status acpi_install_interface_handler(acpi_interface_handler handler);
  
  /*
-  * Event interfaces
+  * Global Lock interfaces
   */
  acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle);
  
  acpi_status acpi_release_global_lock(u32 handle);
  
+ /*
+  * Interfaces to AML mutex objects
+  */
+ acpi_status
+ acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout);
+ acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname);
+ /*
+  * Fixed Event interfaces
+  */
  acpi_status acpi_enable_event(u32 event, u32 flags);
  
  acpi_status acpi_disable_event(u32 event, u32 flags);
@@@ -291,7 -308,7 +308,7 @@@ acpi_status acpi_clear_event(u32 event)
  acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
  
  /*
-  * GPE Interfaces
+  * General Purpose Event (GPE) Interfaces
   */
  acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number);
  
@@@ -345,6 -362,10 +362,10 @@@ acpi_statu
  acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
  #endif
  
+ acpi_status
+ acpi_get_event_resources(acpi_handle device_handle,
+                        struct acpi_buffer *ret_buffer);
  acpi_status
  acpi_walk_resources(acpi_handle device,
                    char *name,
@@@ -360,6 -381,11 +381,11 @@@ acpi_statu
  acpi_resource_to_address64(struct acpi_resource *resource,
                           struct acpi_resource_address64 *out);
  
+ acpi_status
+ acpi_buffer_to_resource(u8 *aml_buffer,
+                       u16 aml_buffer_length,
+                       struct acpi_resource **resource_ptr);
  /*
   * Hardware (ACPI device) interfaces
   */
diff --combined include/linux/acpi.h
index 627a3a42e4d8e3ba015ad32a6bf01f779c356943,26b75442ff7af5209e9d37ed13be10da86bdd5cc..3f968665899b9cadeef825dab03666d04eac3c64
@@@ -302,14 -302,15 +302,19 @@@ extern bool osc_sb_apei_support_acked
                                OSC_PCI_EXPRESS_PME_CONTROL |           \
                                OSC_PCI_EXPRESS_AER_CONTROL |           \
                                OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL)
 +
 +#define OSC_PCI_NATIVE_HOTPLUG        (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL |    \
 +                              OSC_SHPC_NATIVE_HP_CONTROL)
 +
  extern acpi_status acpi_pci_osc_control_set(acpi_handle handle,
                                             u32 *mask, u32 req);
  extern void acpi_early_init(void);
  
+ extern int acpi_nvs_register(__u64 start, __u64 size);
+ extern int acpi_nvs_for_each_region(int (*func)(__u64, __u64, void *),
+                                   void *data);
  #else /* !CONFIG_ACPI */
  
  #define acpi_disabled 1
@@@ -352,15 -353,18 +357,18 @@@ static inline int acpi_table_parse(cha
  {
        return -1;
  }
- #endif        /* !CONFIG_ACPI */
  
- #ifdef CONFIG_ACPI_SLEEP
- int suspend_nvs_register(unsigned long start, unsigned long size);
- #else
- static inline int suspend_nvs_register(unsigned long a, unsigned long b)
+ static inline int acpi_nvs_register(__u64 start, __u64 size)
  {
        return 0;
  }
- #endif
+ static inline int acpi_nvs_for_each_region(int (*func)(__u64, __u64, void *),
+                                          void *data)
+ {
+       return 0;
+ }
+ #endif        /* !CONFIG_ACPI */
  
  #endif        /*_LINUX_ACPI_H*/
diff --combined include/linux/cpuidle.h
index 23f81de518298dda6349ee3f44d425045cf9f62b,93df66ea794a0c641b6898af6d95b5741d5e358d..712abcc205ae0f4a68bda6c4da51e22a7b4000d3
@@@ -130,6 -130,7 +130,6 @@@ struct cpuidle_driver 
  #ifdef CONFIG_CPU_IDLE
  extern void disable_cpuidle(void);
  extern int cpuidle_idle_call(void);
 -
  extern int cpuidle_register_driver(struct cpuidle_driver *drv);
  struct cpuidle_driver *cpuidle_get_driver(void);
  extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
@@@ -144,6 -145,7 +144,6 @@@ extern void cpuidle_disable_device(stru
  #else
  static inline void disable_cpuidle(void) { }
  static inline int cpuidle_idle_call(void) { return -ENODEV; }
 -
  static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
  {return -ENODEV; }
  static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
@@@ -186,7 -188,14 +186,14 @@@ struct cpuidle_governor 
  extern int cpuidle_register_governor(struct cpuidle_governor *gov);
  extern void cpuidle_unregister_governor(struct cpuidle_governor *gov);
  
+ #ifdef CONFIG_INTEL_IDLE
+ extern int intel_idle_cpu_init(int cpu);
  #else
+ static inline int intel_idle_cpu_init(int cpu) { return -1; }
+ #endif
+ #else
+ static inline int intel_idle_cpu_init(int cpu) { return -1; }
  
  static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
  {return 0;}
This page took 0.116372 seconds and 4 git commands to generate.