]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'apei' into apei-release
authorLen Brown <len.brown@intel.com>
Wed, 3 Aug 2011 15:30:42 +0000 (11:30 -0400)
committerLen Brown <len.brown@intel.com>
Wed, 3 Aug 2011 15:30:42 +0000 (11:30 -0400)
Some trivial conflicts due to other various merges
adding to the end of common lists sooner than this one.

arch/ia64/Kconfig
arch/powerpc/Kconfig
arch/x86/Kconfig
lib/Kconfig
lib/Makefile

Signed-off-by: Len Brown <len.brown@intel.com>
13 files changed:
1  2 
arch/alpha/Kconfig
arch/ia64/Kconfig
arch/m68k/Kconfig
arch/powerpc/Kconfig
arch/sh/Kconfig
arch/sparc/Kconfig
arch/x86/Kconfig
drivers/acpi/apei/erst.c
include/linux/bitmap.h
include/linux/mm.h
lib/Kconfig
lib/Makefile
lib/bitmap.c

diff --combined arch/alpha/Kconfig
index ca2da8da6e9c68f057d0a393de2c0018c32c9d1d,23f8d8c32886b421a01b4a501dbc5a2cb96ebe08..60cde53d266c38da1848b01538698bc85a309453
@@@ -6,7 -6,6 +6,7 @@@ config ALPH
        select HAVE_OPROFILE
        select HAVE_SYSCALL_WRAPPERS
        select HAVE_IRQ_WORK
 +      select HAVE_PCSPKR_PLATFORM
        select HAVE_PERF_EVENTS
        select HAVE_DMA_ATTRS
        select HAVE_GENERIC_HARDIRQS
@@@ -14,6 -13,7 +14,7 @@@
        select AUTO_IRQ_AFFINITY if SMP
        select GENERIC_IRQ_SHOW
        select ARCH_WANT_OPTIONAL_GPIOLIB
+       select ARCH_HAVE_NMI_SAFE_CMPXCHG
        help
          The Alpha is a 64-bit general-purpose processor designed and
          marketed by the Digital Equipment Corporation of blessed memory,
diff --combined arch/ia64/Kconfig
index 64c7ab7e7a816922b8830bee7b4e579f1c48d2c4,b1227ddc672ac5ca2a4e3a9ca0ea80a91d41fd60..12485471495893cd00c80be024b7983c11e8168c
@@@ -27,7 -27,7 +27,8 @@@ config IA6
        select GENERIC_PENDING_IRQ if SMP
        select IRQ_PER_CPU
        select GENERIC_IRQ_SHOW
 +      select ARCH_WANT_OPTIONAL_GPIOLIB
+       select ARCH_HAVE_NMI_SAFE_CMPXCHG
        default y
        help
          The Itanium Processor Family is Intel's 64-bit successor to
@@@ -90,9 -90,6 +91,9 @@@ config GENERIC_TIME_VSYSCAL
  config HAVE_SETUP_PER_CPU_AREA
        def_bool y
  
 +config GENERIC_GPIO
 +      def_bool y
 +
  config DMI
        bool
        default y
@@@ -105,9 -102,6 +106,9 @@@ config GENERIC_IOMA
        bool
        default y
  
 +config ARCH_CLOCKSOURCE_DATA
 +      def_bool y
 +
  config SCHED_OMIT_FRAME_POINTER
        bool
        default y
@@@ -634,6 -628,27 +635,6 @@@ source "drivers/pci/hotplug/Kconfig
  
  source "drivers/pcmcia/Kconfig"
  
 -config DMAR
 -        bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
 -        depends on IA64_GENERIC && ACPI && EXPERIMENTAL
 -      help
 -        DMA remapping (DMAR) devices support enables independent address
 -        translations for Direct Memory Access (DMA) from devices.
 -        These DMA remapping devices are reported via ACPI tables
 -        and include PCI device scope covered by these DMA
 -        remapping devices.
 -
 -config DMAR_DEFAULT_ON
 -      def_bool y
 -      prompt "Enable DMA Remapping Devices by default"
 -      depends on DMAR
 -      help
 -        Selecting this option will enable a DMAR device at boot time if
 -        one is found. If this option is not selected, DMAR support can
 -        be enabled by passing intel_iommu=on to the kernel. It is
 -        recommended you say N here while the DMAR code remains
 -        experimental.
 -
  endmenu
  
  endif
@@@ -667,3 -682,6 +668,3 @@@ source "lib/Kconfig
  
  config IOMMU_HELPER
        def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)
 -
 -config IOMMU_API
 -      def_bool (DMAR)
diff --combined arch/m68k/Kconfig
index 284cd3771eaaf7b1b0c1f3fd5a35789c116954eb,effe8f0fa31effc9c1a60863f05774053ff8ff7c..9e8ee9d2b8ca3c55ce540aee8addcbf308ea9e06
@@@ -6,6 -6,7 +6,7 @@@ config M68
        select GENERIC_ATOMIC64 if MMU
        select HAVE_GENERIC_HARDIRQS if !MMU
        select GENERIC_IRQ_SHOW if !MMU
+       select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
  
  config RWSEM_GENERIC_SPINLOCK
        bool
@@@ -41,10 -42,6 +42,10 @@@ config NO_DM
  config ZONE_DMA
        bool
        default y
 +
 +config CPU_HAS_NO_BITFIELDS
 +      bool
 +
  config HZ
        int
        default 1000 if CLEOPATRA
diff --combined arch/powerpc/Kconfig
index 374c475e56a3238bf5e55e161cd13d44a468d7be,e55f754dd50d48b05ddae560ff0bba59444f983f..6926b61acfeac74133f6fe2d3d206e06b92162f1
@@@ -134,8 -134,7 +134,9 @@@ config PP
        select GENERIC_IRQ_SHOW_LEVEL
        select HAVE_RCU_TABLE_FREE if SMP
        select HAVE_SYSCALL_TRACEPOINTS
 +      select HAVE_BPF_JIT if (PPC64 && NET)
 +      select HAVE_ARCH_JUMP_LABEL
+       select ARCH_HAVE_NMI_SAFE_CMPXCHG
  
  config EARLY_PRINTK
        bool
@@@ -843,7 -842,7 +844,7 @@@ config LOWMEM_CAM_NU
  
  config RELOCATABLE
        bool "Build a relocatable kernel (EXPERIMENTAL)"
 -      depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
 +      depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || PPC_47x)
        help
          This builds a kernel image that is capable of running at the
          location the kernel is loaded at (some alignment restrictions may
diff --combined arch/sh/Kconfig
index 748ff1920068ae679131b8b8b9f80076c2a1f104,66405eb217669efcb5ded0f3f2e40d3be80dea25..ff9177c8f6439eec4be3fe13a5bbea6da833b64f
@@@ -11,6 -11,7 +11,7 @@@ config SUPER
        select HAVE_DMA_ATTRS
        select HAVE_IRQ_WORK
        select HAVE_PERF_EVENTS
+       select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
        select PERF_USE_VMALLOC
        select HAVE_KERNEL_GZIP
        select HAVE_KERNEL_BZIP2
@@@ -897,4 -898,20 +898,4 @@@ source "security/Kconfig
  
  source "crypto/Kconfig"
  
 -menuconfig VIRTUALIZATION
 -      bool "Virtualization"
 -      default n
 -      ---help---
 -        Say Y here to get to see options for using your Linux host to run other
 -        operating systems inside virtual machines (guests).
 -        This option alone does not add any kernel code.
 -
 -        If you say N, all options in this submenu will be skipped and disabled.
 -
 -if VIRTUALIZATION
 -
 -source drivers/virtio/Kconfig
 -
 -endif # VIRTUALIZATION
 -
  source "lib/Kconfig"
diff --combined arch/sparc/Kconfig
index 1074dddcb104595d5213849cb5656bceca80590d,a63cddfb3a153cbf9eb435c10b0434ea4f6b8965..42c67beadcae2367e9cb7107bb125d188b3b4443
@@@ -41,7 -41,6 +41,7 @@@ config SPARC6
        select HAVE_FUNCTION_TRACE_MCOUNT_TEST
        select HAVE_KRETPROBES
        select HAVE_KPROBES
 +      select HAVE_RCU_TABLE_FREE if SMP
        select HAVE_MEMBLOCK
        select HAVE_SYSCALL_WRAPPERS
        select HAVE_DYNAMIC_FTRACE
@@@ -54,6 -53,7 +54,7 @@@
        select HAVE_PERF_EVENTS
        select PERF_USE_VMALLOC
        select IRQ_PREFLOW_FASTEOI
+       select ARCH_HAVE_NMI_SAFE_CMPXCHG
  
  config ARCH_DEFCONFIG
        string
@@@ -82,6 -82,10 +83,6 @@@ config IOMMU_HELPE
        bool
        default y if SPARC64
  
 -config QUICKLIST
 -      bool
 -      default y if SPARC64
 -
  config STACKTRACE_SUPPORT
        bool
        default y if SPARC64
diff --combined arch/x86/Kconfig
index 7cf916fc1ce7e4920204a184a15b6e5ef2cfd1a4,a680a60898ded9e9a1afa241e00e6417cf3e8698..6a47bb22657fd3d55835c32b2e834cd42e3ad28c
@@@ -20,7 -20,6 +20,7 @@@ config X8
        select HAVE_UNSTABLE_SCHED_CLOCK
        select HAVE_IDE
        select HAVE_OPROFILE
 +      select HAVE_PCSPKR_PLATFORM
        select HAVE_PERF_EVENTS
        select HAVE_IRQ_WORK
        select HAVE_IOREMAP_PROT
@@@ -71,7 -70,7 +71,8 @@@
        select IRQ_FORCED_THREADING
        select USE_GENERIC_SMP_HELPERS if SMP
        select HAVE_BPF_JIT if (X86_64 && NET)
 +      select CLKEVT_I8253
+       select ARCH_HAVE_NMI_SAFE_CMPXCHG
  
  config INSTRUCTION_DECODER
        def_bool (KPROBES || PERF_EVENTS)
@@@ -95,10 -94,6 +96,10 @@@ config CLOCKSOURCE_WATCHDO
  config GENERIC_CLOCKEVENTS
        def_bool y
  
 +config ARCH_CLOCKSOURCE_DATA
 +      def_bool y
 +      depends on X86_64
 +
  config GENERIC_CLOCKEVENTS_BROADCAST
        def_bool y
        depends on X86_64 || (X86_32 && X86_LOCAL_APIC)
@@@ -390,21 -385,12 +391,21 @@@ config X86_INTEL_C
          This option compiles in support for the CE4100 SOC for settop
          boxes and media devices.
  
 +config X86_INTEL_MID
 +      bool "Intel MID platform support"
 +      depends on X86_32
 +      depends on X86_EXTENDED_PLATFORM
 +      ---help---
 +        Select to build a kernel capable of supporting Intel MID platform
 +        systems which do not have the PCI legacy interfaces (Moorestown,
 +        Medfield). If you are building for a PC class system say N here.
 +
 +if X86_INTEL_MID
 +
  config X86_MRST
         bool "Moorestown MID platform"
        depends on PCI
        depends on PCI_GOANY
 -      depends on X86_32
 -      depends on X86_EXTENDED_PLATFORM
        depends on X86_IO_APIC
        select APB_TIMER
        select I2C
          nor standard legacy replacement devices/features. e.g. Moorestown does
          not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.
  
 +endif
 +
  config X86_RDC321X
        bool "RDC R-321x SoC"
        depends on X86_32
@@@ -529,18 -513,6 +530,18 @@@ menuconfig PARAVIRT_GUES
  
  if PARAVIRT_GUEST
  
 +config PARAVIRT_TIME_ACCOUNTING
 +      bool "Paravirtual steal time accounting"
 +      select PARAVIRT
 +      default n
 +      ---help---
 +        Select this option to enable fine granularity task steal time
 +        accounting. Time spent executing other tasks in parallel with
 +        the current vCPU is discounted from the vCPU power. To account for
 +        that, there can be a small performance impact.
 +
 +        If in doubt, say N here.
 +
  source "arch/x86/xen/Kconfig"
  
  config KVM_CLOCK
@@@ -646,7 -618,6 +647,7 @@@ config HPET_EMULATE_RT
  config APB_TIMER
         def_bool y if MRST
         prompt "Langwell APB Timer Support" if X86_MRST
 +       select DW_APB_TIMER
         help
           APB timer is the replacement for 8254, HPET on X86 MID platforms.
           The APBT provides a stable time base on SMP
@@@ -710,6 -681,33 +711,6 @@@ config CALGARY_IOMMU_ENABLED_BY_DEFAUL
          Calgary anyway, pass 'iommu=calgary' on the kernel command line.
          If unsure, say Y.
  
 -config AMD_IOMMU
 -      bool "AMD IOMMU support"
 -      select SWIOTLB
 -      select PCI_MSI
 -      select PCI_IOV
 -      depends on X86_64 && PCI && ACPI
 -      ---help---
 -        With this option you can enable support for AMD IOMMU hardware in
 -        your system. An IOMMU is a hardware component which provides
 -        remapping of DMA memory accesses from devices. With an AMD IOMMU you
 -        can isolate the the DMA memory of different devices and protect the
 -        system from misbehaving device drivers or hardware.
 -
 -        You can find out if your system has an AMD IOMMU if you look into
 -        your BIOS for an option to enable it or if you have an IVRS ACPI
 -        table.
 -
 -config AMD_IOMMU_STATS
 -      bool "Export AMD IOMMU statistics to debugfs"
 -      depends on AMD_IOMMU
 -      select DEBUG_FS
 -      ---help---
 -        This option enables code in the AMD IOMMU driver to collect various
 -        statistics about whats happening in the driver and exports that
 -        information to userspace via debugfs.
 -        If unsure, say N.
 -
  # need this always selected by IOMMU for the VIA workaround
  config SWIOTLB
        def_bool y if X86_64
  config IOMMU_HELPER
        def_bool (CALGARY_IOMMU || GART_IOMMU || SWIOTLB || AMD_IOMMU)
  
 -config IOMMU_API
 -      def_bool (AMD_IOMMU || DMAR)
 -
  config MAXSMP
        bool "Enable Maximum number of SMP Processors and NUMA Nodes"
        depends on X86_64 && SMP && DEBUG_KERNEL && EXPERIMENTAL
@@@ -1170,7 -1171,7 +1171,7 @@@ comment "NUMA (Summit) requires SMP, 64
  config AMD_NUMA
        def_bool y
        prompt "Old style AMD Opteron NUMA detection"
 -      depends on NUMA && PCI
 +      depends on X86_64 && NUMA && PCI
        ---help---
          Enable AMD NUMA node topology detection.  You should say Y here if
          you have a multi processor AMD system. This uses an old method to
@@@ -1737,8 -1738,8 +1738,8 @@@ menuconfig AP
          machines with more than one CPU.
  
          In order to use APM, you will need supporting software. For location
 -        and more information, read <file:Documentation/power/pm.txt> and the
 -        Battery Powered Linux mini-HOWTO, available from
 +        and more information, read <file:Documentation/power/apm-acpi.txt>
 +        and the Battery Powered Linux mini-HOWTO, available from
          <http://www.tldp.org/docs.html#howto>.
  
          This driver does not spin down disk drives (see the hdparm(8)
@@@ -1905,7 -1906,7 +1906,7 @@@ config PCI_BIO
  # x86-64 doesn't support PCI BIOS access from long mode so always go direct.
  config PCI_DIRECT
        def_bool y
 -      depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC))
 +      depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC || PCI_GOMMCONFIG))
  
  config PCI_MMCONFIG
        def_bool y
@@@ -1942,6 -1943,55 +1943,6 @@@ config PCI_CNB20LE_QUIR
  
          You should say N unless you know you need this.
  
 -config DMAR
 -      bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
 -      depends on PCI_MSI && ACPI && EXPERIMENTAL
 -      help
 -        DMA remapping (DMAR) devices support enables independent address
 -        translations for Direct Memory Access (DMA) from devices.
 -        These DMA remapping devices are reported via ACPI tables
 -        and include PCI device scope covered by these DMA
 -        remapping devices.
 -
 -config DMAR_DEFAULT_ON
 -      def_bool y
 -      prompt "Enable DMA Remapping Devices by default"
 -      depends on DMAR
 -      help
 -        Selecting this option will enable a DMAR device at boot time if
 -        one is found. If this option is not selected, DMAR support can
 -        be enabled by passing intel_iommu=on to the kernel. It is
 -        recommended you say N here while the DMAR code remains
 -        experimental.
 -
 -config DMAR_BROKEN_GFX_WA
 -      bool "Workaround broken graphics drivers (going away soon)"
 -      depends on DMAR && BROKEN
 -      ---help---
 -        Current Graphics drivers tend to use physical address
 -        for DMA and avoid using DMA APIs. Setting this config
 -        option permits the IOMMU driver to set a unity map for
 -        all the OS-visible memory. Hence the driver can continue
 -        to use physical addresses for DMA, at least until this
 -        option is removed in the 2.6.32 kernel.
 -
 -config DMAR_FLOPPY_WA
 -      def_bool y
 -      depends on DMAR
 -      ---help---
 -        Floppy disk drivers are known to bypass DMA API calls
 -        thereby failing to work when IOMMU is enabled. This
 -        workaround will setup a 1:1 mapping for the first
 -        16MiB to make floppy (an ISA device) work.
 -
 -config INTR_REMAP
 -      bool "Support for Interrupt Remapping (EXPERIMENTAL)"
 -      depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
 -      ---help---
 -        Supports Interrupt remapping for IO-APIC and MSI devices.
 -        To use x2apic mode in the CPU's which support x2APIC enhancements or
 -        to support platforms with CPU's having > 8 bit APIC ID, say Y.
 -
  source "drivers/pci/pcie/Kconfig"
  
  source "drivers/pci/Kconfig"
@@@ -2024,44 -2074,11 +2025,44 @@@ config OLP
          Add support for detecting the unique features of the OLPC
          XO hardware.
  
 -config OLPC_XO1
 -      tristate "OLPC XO-1 support"
 -      depends on OLPC && MFD_CS5535
 -      ---help---
 -        Add support for non-essential features of the OLPC XO-1 laptop.
 +config OLPC_XO1_PM
 +      bool "OLPC XO-1 Power Management"
 +      depends on OLPC && MFD_CS5535 && PM_SLEEP
 +      select MFD_CORE
 +      ---help---
 +        Add support for poweroff and suspend of the OLPC XO-1 laptop.
 +
 +config OLPC_XO1_RTC
 +      bool "OLPC XO-1 Real Time Clock"
 +      depends on OLPC_XO1_PM && RTC_DRV_CMOS
 +      ---help---
 +        Add support for the XO-1 real time clock, which can be used as a
 +        programmable wakeup source.
 +
 +config OLPC_XO1_SCI
 +      bool "OLPC XO-1 SCI extras"
 +      depends on OLPC && OLPC_XO1_PM
 +      select POWER_SUPPLY
 +      select GPIO_CS5535
 +      select MFD_CORE
 +      ---help---
 +        Add support for SCI-based features of the OLPC XO-1 laptop:
 +         - EC-driven system wakeups
 +         - Power button
 +         - Ebook switch
 +         - Lid switch
 +         - AC adapter status updates
 +         - Battery status updates
 +
 +config OLPC_XO15_SCI
 +      bool "OLPC XO-1.5 SCI extras"
 +      depends on OLPC && ACPI
 +      select POWER_SUPPLY
 +      ---help---
 +        Add support for SCI-based features of the OLPC XO-1.5 laptop:
 +         - EC-driven system wakeups
 +         - AC adapter status updates
 +         - Battery status updates
  
  endif # X86_32
  
diff --combined drivers/acpi/apei/erst.c
index 6053f4780df94b67aa2f9bffc535e72c2c03ab94,c8ba9da14e4378f9392eaf891609914910d43545..2ca59dc69f7f6b034660bfdc04462230880456f9
@@@ -642,7 -642,7 +642,7 @@@ static int __erst_write_to_storage(u64 
        int rc;
  
        erst_exec_ctx_init(&ctx);
-       rc = apei_exec_run(&ctx, ACPI_ERST_BEGIN_WRITE);
+       rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_WRITE);
        if (rc)
                return rc;
        apei_exec_ctx_set_input(&ctx, offset);
        if (rc)
                return rc;
        val = apei_exec_ctx_get_output(&ctx);
-       rc = apei_exec_run(&ctx, ACPI_ERST_END);
+       rc = apei_exec_run_optional(&ctx, ACPI_ERST_END);
        if (rc)
                return rc;
  
@@@ -681,7 -681,7 +681,7 @@@ static int __erst_read_from_storage(u6
        int rc;
  
        erst_exec_ctx_init(&ctx);
-       rc = apei_exec_run(&ctx, ACPI_ERST_BEGIN_READ);
+       rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_READ);
        if (rc)
                return rc;
        apei_exec_ctx_set_input(&ctx, offset);
        if (rc)
                return rc;
        val = apei_exec_ctx_get_output(&ctx);
-       rc = apei_exec_run(&ctx, ACPI_ERST_END);
+       rc = apei_exec_run_optional(&ctx, ACPI_ERST_END);
        if (rc)
                return rc;
  
@@@ -724,7 -724,7 +724,7 @@@ static int __erst_clear_from_storage(u6
        int rc;
  
        erst_exec_ctx_init(&ctx);
-       rc = apei_exec_run(&ctx, ACPI_ERST_BEGIN_CLEAR);
+       rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_CLEAR);
        if (rc)
                return rc;
        apei_exec_ctx_set_input(&ctx, record_id);
        if (rc)
                return rc;
        val = apei_exec_ctx_get_output(&ctx);
-       rc = apei_exec_run(&ctx, ACPI_ERST_END);
+       rc = apei_exec_run_optional(&ctx, ACPI_ERST_END);
        if (rc)
                return rc;
  
@@@ -932,11 -932,8 +932,11 @@@ static int erst_check_table(struct acpi
  static int erst_open_pstore(struct pstore_info *psi);
  static int erst_close_pstore(struct pstore_info *psi);
  static ssize_t erst_reader(u64 *id, enum pstore_type_id *type,
 -                     struct timespec *time);
 -static u64 erst_writer(enum pstore_type_id type, size_t size);
 +                         struct timespec *time, struct pstore_info *psi);
 +static u64 erst_writer(enum pstore_type_id type, 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);
  
  static struct pstore_info erst_info = {
        .owner          = THIS_MODULE,
        .close          = erst_close_pstore,
        .read           = erst_reader,
        .write          = erst_writer,
 -      .erase          = erst_clear
 +      .erase          = erst_clearer
  };
  
  #define CPER_CREATOR_PSTORE                                           \
@@@ -986,7 -983,7 +986,7 @@@ static int erst_close_pstore(struct pst
  }
  
  static ssize_t erst_reader(u64 *id, enum pstore_type_id *type,
 -                     struct timespec *time)
 +                         struct timespec *time, struct pstore_info *psi)
  {
        int rc;
        ssize_t len = 0;
@@@ -1040,8 -1037,7 +1040,8 @@@ out
        return (rc < 0) ? rc : (len - sizeof(*rcd));
  }
  
 -static u64 erst_writer(enum pstore_type_id type, size_t size)
 +static u64 erst_writer(enum pstore_type_id type, unsigned int part,
 +                     size_t size, struct pstore_info *psi)
  {
        struct cper_pstore_record *rcd = (struct cper_pstore_record *)
                                        (erst_info.buf - sizeof(*rcd));
        return rcd->hdr.record_id;
  }
  
 +static int erst_clearer(enum pstore_type_id type, u64 id,
 +                      struct pstore_info *psi)
 +{
 +      return erst_clear(id);
 +}
 +
  static int __init erst_init(void)
  {
        int rc = 0;
diff --combined include/linux/bitmap.h
index 3bac44cce142c94f2a5d40ab5699a07bd7aff59f,907dd58aa2289428e47911387c2d033edc1b7045..7ad634501e48cd7d39b1e8b621f0affce26765d7
@@@ -144,8 -144,8 +144,9 @@@ extern int bitmap_find_free_region(unsi
  extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
  extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
  extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits);
 +extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits);
  
+ #define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG))
  #define BITMAP_LAST_WORD_MASK(nbits)                                  \
  (                                                                     \
        ((nbits) % BITS_PER_LONG) ?                                     \
diff --combined include/linux/mm.h
index 3172a1c0f08e96faf072fda7b4327a9626ddf611,303108eed28c9b7c4a3afde80947e7a1b817cfdf..f2690cf49827abc641d2bf59d8dc359b7bbce15e
@@@ -15,7 -15,6 +15,7 @@@
  #include <linux/range.h>
  #include <linux/pfn.h>
  #include <linux/bit_spinlock.h>
 +#include <linux/shrinker.h>
  
  struct mempolicy;
  struct anon_vma;
@@@ -637,7 -636,7 +637,7 @@@ static inline pte_t maybe_mkwrite(pte_
  #define SECTIONS_MASK         ((1UL << SECTIONS_WIDTH) - 1)
  #define ZONEID_MASK           ((1UL << ZONEID_SHIFT) - 1)
  
 -static inline enum zone_type page_zonenum(struct page *page)
 +static inline enum zone_type page_zonenum(const struct page *page)
  {
        return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK;
  }
@@@ -665,15 -664,15 +665,15 @@@ static inline int zone_to_nid(struct zo
  }
  
  #ifdef NODE_NOT_IN_PAGE_FLAGS
 -extern int page_to_nid(struct page *page);
 +extern int page_to_nid(const struct page *page);
  #else
 -static inline int page_to_nid(struct page *page)
 +static inline int page_to_nid(const struct page *page)
  {
        return (page->flags >> NODES_PGSHIFT) & NODES_MASK;
  }
  #endif
  
 -static inline struct zone *page_zone(struct page *page)
 +static inline struct zone *page_zone(const struct page *page)
  {
        return &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)];
  }
@@@ -718,9 -717,9 +718,9 @@@ static inline void set_page_links(struc
   */
  #include <linux/vmstat.h>
  
 -static __always_inline void *lowmem_page_address(struct page *page)
 +static __always_inline void *lowmem_page_address(const struct page *page)
  {
 -      return __va(PFN_PHYS(page_to_pfn(page)));
 +      return __va(PFN_PHYS(page_to_pfn((struct page *)page)));
  }
  
  #if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
@@@ -911,8 -910,6 +911,8 @@@ unsigned long unmap_vmas(struct mmu_gat
   * @pte_entry: if set, called for each non-empty PTE (4th-level) entry
   * @pte_hole: if set, called for each hole at all levels
   * @hugetlb_entry: if set, called for each hugetlb entry
 + *               *Caution*: The caller must hold mmap_sem() if @hugetlb_entry
 + *                          is used.
   *
   * (see walk_page_range for more details)
   */
@@@ -988,8 -985,6 +988,8 @@@ int get_user_pages(struct task_struct *
  int get_user_pages_fast(unsigned long start, int nr_pages, int write,
                        struct page **pages);
  struct page *get_dump_page(unsigned long addr);
 +extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
 +                          unsigned long address, unsigned int fault_flags);
  
  extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
  extern void do_invalidatepage(struct page *page, unsigned long offset);
@@@ -1126,6 -1121,44 +1126,6 @@@ static inline void sync_mm_rss(struct t
  }
  #endif
  
 -/*
 - * This struct is used to pass information from page reclaim to the shrinkers.
 - * We consolidate the values for easier extention later.
 - */
 -struct shrink_control {
 -      gfp_t gfp_mask;
 -
 -      /* How many slab objects shrinker() should scan and try to reclaim */
 -      unsigned long nr_to_scan;
 -};
 -
 -/*
 - * A callback you can register to apply pressure to ageable caches.
 - *
 - * 'sc' is passed shrink_control which includes a count 'nr_to_scan'
 - * and a 'gfpmask'.  It should look through the least-recently-used
 - * 'nr_to_scan' entries and attempt to free them up.  It should return
 - * the number of objects which remain in the cache.  If it returns -1, it means
 - * it cannot do any scanning at this time (eg. there is a risk of deadlock).
 - *
 - * The 'gfpmask' refers to the allocation we are currently trying to
 - * fulfil.
 - *
 - * Note that 'shrink' will be passed nr_to_scan == 0 when the VM is
 - * querying the cache size, so a fastpath for that case is appropriate.
 - */
 -struct shrinker {
 -      int (*shrink)(struct shrinker *, struct shrink_control *sc);
 -      int seeks;      /* seeks to recreate an obj */
 -
 -      /* These are for internal use */
 -      struct list_head list;
 -      long nr;        /* objs pending delete */
 -};
 -#define DEFAULT_SEEKS 2 /* A good number if you don't know better. */
 -extern void register_shrinker(struct shrinker *);
 -extern void unregister_shrinker(struct shrinker *);
 -
  int vma_wants_writenotify(struct vm_area_struct *vma);
  
  extern pte_t *__get_locked_pte(struct mm_struct *mm, unsigned long addr,
@@@ -1280,7 -1313,6 +1280,7 @@@ extern void remove_active_range(unsigne
                                        unsigned long end_pfn);
  extern void remove_all_active_ranges(void);
  void sort_node_map(void);
 +unsigned long node_map_pfn_alignment(void);
  unsigned long __absent_pages_in_range(int nid, unsigned long start_pfn,
                                                unsigned long end_pfn);
  extern unsigned long absent_pages_in_range(unsigned long start_pfn,
@@@ -1413,7 -1445,8 +1413,7 @@@ extern int do_munmap(struct mm_struct *
  
  extern unsigned long do_brk(unsigned long, unsigned long);
  
 -/* filemap.c */
 -extern unsigned long page_unuse(struct page *);
 +/* truncate.c */
  extern void truncate_inode_pages(struct address_space *, loff_t);
  extern void truncate_inode_pages_range(struct address_space *,
                                       loff_t lstart, loff_t lend);
@@@ -1600,6 -1633,7 +1600,7 @@@ enum mf_flags 
  };
  extern void memory_failure(unsigned long pfn, int trapno);
  extern int __memory_failure(unsigned long pfn, int trapno, int flags);
+ extern void memory_failure_queue(unsigned long pfn, int trapno, int flags);
  extern int unpoison_memory(unsigned long pfn);
  extern int sysctl_memory_failure_early_kill;
  extern int sysctl_memory_failure_recovery;
diff --combined lib/Kconfig
index 32f3e5ae2be543c59ae3e50682ca504010eb87a3,25c19678a30fa91089f6fe0a38cfe8b2186ce92e..6c695ff9caba7579aaf9f4814abff70ba7c21084
@@@ -79,13 -79,6 +79,13 @@@ config LIBCRC32
          require M here.  See Castagnoli93.
          Module will be libcrc32c.
  
 +config CRC8
 +      tristate "CRC8 function"
 +      help
 +        This option provides CRC8 function. Drivers may select this
 +        when they need to do cyclic redundancy check according CRC8
 +        algorithm. Module will be called crc8.
 +
  config AUDIT_GENERIC
        bool
        depends on AUDIT && !AUDIT_ARCH
@@@ -269,11 -262,7 +269,14 @@@ config AVERAG
  
          If unsure, say N.
  
 +config CORDIC
 +      tristate "Cordic function"
 +      help
 +        The option provides arithmetic function using cordic algorithm
 +        so its calculations are in fixed point. Modules can select this
 +        when they require this function. Module will be called cordic.
 +
+ config LLIST
+       bool
  endmenu
diff --combined lib/Makefile
index 892f4e282ea1c0aecf8a60c33ec8c6bde2d2c175,d770b817202ed5eaabb6c131f8a1cc5b55981ca8..6457af4a7caf632d9bd26c70ac4b5744199e5079
@@@ -61,7 -61,6 +61,7 @@@ obj-$(CONFIG_CRC_ITU_T)       += crc-itu-t.
  obj-$(CONFIG_CRC32)   += crc32.o
  obj-$(CONFIG_CRC7)    += crc7.o
  obj-$(CONFIG_LIBCRC32C)       += libcrc32c.o
 +obj-$(CONFIG_CRC8)    += crc8.o
  obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o
  
  obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/
@@@ -113,8 -112,8 +113,10 @@@ obj-$(CONFIG_AVERAGE) += average.
  
  obj-$(CONFIG_CPU_RMAP) += cpu_rmap.o
  
 +obj-$(CONFIG_CORDIC) += cordic.o
 +
+ obj-$(CONFIG_LLIST) += llist.o
  hostprogs-y   := gen_crc32table
  clean-files   := crc32table.h
  
diff --combined lib/bitmap.c
index 37ef4b048795463a46a98702fd5bf780c1b59060,e3c9e999501e43f8ae0a66876c869c45bdaaf923..2f4412e4d0719c25ca1d4948d489eee8c998f444
@@@ -271,8 -271,6 +271,6 @@@ int __bitmap_weight(const unsigned lon
  }
  EXPORT_SYMBOL(__bitmap_weight);
  
- #define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG))
  void bitmap_set(unsigned long *map, int start, int nr)
  {
        unsigned long *p = map + BIT_WORD(start);
@@@ -756,7 -754,7 +754,7 @@@ static int bitmap_pos_to_ord(const unsi
   *
   * The bit positions 0 through @bits are valid positions in @buf.
   */
 -static int bitmap_ord_to_pos(const unsigned long *buf, int ord, int bits)
 +int bitmap_ord_to_pos(const unsigned long *buf, int ord, int bits)
  {
        int pos = 0;