]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'x86/apic', 'x86/asm', 'x86/cleanups', 'x86/debug', 'x86/kconfig'...
authorIngo Molnar <mingo@elte.hu>
Sat, 14 Mar 2009 15:25:40 +0000 (16:25 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 14 Mar 2009 15:25:40 +0000 (16:25 +0100)
1  2  3  4  5  6  7  8  9  10 
arch/x86/Kconfig
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/intel.c
arch/x86/mm/pat.c

diff --combined arch/x86/Kconfig
index 7fcf85182681c5d04be5d3e681cf47bdf11cabab,31758378bcd2707f7dd2803ecd9a98d2d9a9a063,7fcf85182681c5d04be5d3e681cf47bdf11cabab,469f3450bf813af117549a3234b73be12041d0d3,7fcf85182681c5d04be5d3e681cf47bdf11cabab,d571cc7e3d358e52e266cd8a52fb4b942fc7bdd5,076f4f85f6ea83b6c5ec1ebd0945b4011a2bcaa1,7fcf85182681c5d04be5d3e681cf47bdf11cabab,87717f3687d2dce96a0cf91cc0d90d64ffa37a51,bc2fbadff9f90fe681d9c30ae621d1ec94e348cf..34bc3a89228b58cb31d2aa18c70c1965bb35ace6
@@@@@@@@@@@ -5,7 -5,7 -5,7 -5,7 -5,7 -5,7 -5,7 -5,7 -5,7 -5,7 +5,7 @@@@@@@@@@@ mainmenu "Linux Kernel Configuration fo
          config 64BIT
                bool "64-bit kernel" if ARCH = "x86"
                default ARCH = "x86_64"
         -      help
         +      ---help---
                  Say yes to build a 64-bit kernel - formerly known as x86_64
                  Say no to build a 32-bit kernel - formerly known as i386
          
@@@@@@@@@@@ -34,15 -34,15 -34,15 -34,15 -34,15 -34,15 -34,15 -34,15 -34,15 -34,12 +34,15 @@@@@@@@@@@ config X8
                select HAVE_FUNCTION_TRACER
                select HAVE_FUNCTION_GRAPH_TRACER
                select HAVE_FUNCTION_TRACE_MCOUNT_TEST
         -      select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
         -      select HAVE_ARCH_KGDB if !X86_VOYAGER
         +      select HAVE_KVM
         +      select HAVE_ARCH_KGDB
                select HAVE_ARCH_TRACEHOOK
                select HAVE_GENERIC_DMA_COHERENT if X86_32
                select HAVE_EFFICIENT_UNALIGNED_ACCESS
                select USER_STACKTRACE_SUPPORT
         +      select HAVE_KERNEL_GZIP
         +      select HAVE_KERNEL_BZIP2
         +      select HAVE_KERNEL_LZMA
          
          config ARCH_DEFCONFIG
                string
@@@@@@@@@@@ -136,19 -136,19 -136,19 -136,16 -136,19 -136,19 -136,19 -136,19 -136,19 -133,18 +136,19 @@@@@@@@@@@ config ARCH_HAS_CACHE_LINE_SIZ
                def_bool y
          
          config HAVE_SETUP_PER_CPU_AREA
         -      def_bool X86_64_SMP || (X86_SMP && !X86_VOYAGER)
         +      def_bool y
         +
   +     +config HAVE_DYNAMIC_PER_CPU_AREA
   +     +      def_bool y
   +      
          config HAVE_CPUMASK_OF_CPU_MAP
                def_bool X86_64_SMP
          
          config ARCH_HIBERNATION_POSSIBLE
                def_bool y
         -      depends on !SMP || !X86_VOYAGER
          
          config ARCH_SUSPEND_POSSIBLE
                def_bool y
         -      depends on !X86_VOYAGER
          
          config ZONE_DMA32
                bool
@@@@@@@@@@@ -169,6 -169,6 -169,6 -166,6 -169,6 -169,9 -169,6 -169,6 -169,6 -165,6 +169,9 @@@@@@@@@@@ config GENERIC_HARDIRQ
                bool
                default y
          
+++++ ++++config GENERIC_HARDIRQS_NO__DO_IRQ
+++++ ++++       def_bool y
+++++ ++++
          config GENERIC_IRQ_PROBE
                bool
                default y
@@@@@@@@@@@ -178,6 -178,6 -178,6 -175,6 -178,6 -181,6 -178,6 -178,6 -178,6 -174,11 +181,6 @@@@@@@@@@@ config GENERIC_PENDING_IR
                depends on GENERIC_HARDIRQS && SMP
                default y
          
         -config X86_SMP
         -      bool
         -      depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64)
         -      default y
         -
          config USE_GENERIC_SMP_HELPERS
                def_bool y
                depends on SMP
@@@@@@@@@@@ -193,17 -193,17 -193,17 -190,17 -193,17 -196,17 -193,17 -193,17 -193,17 -194,19 +196,17 @@@@@@@@@@@ config X86_64_SM
          config X86_HT
                bool
                depends on SMP
         -      depends on (X86_32 && !X86_VOYAGER) || X86_64
         -      default y
         -
         -config X86_BIOS_REBOOT
         -      bool
         -      depends on !X86_VOYAGER
                default y
          
          config X86_TRAMPOLINE
                bool
         -      depends on X86_SMP || (X86_VOYAGER && SMP) || (64BIT && ACPI_SLEEP)
         +      depends on SMP || (64BIT && ACPI_SLEEP)
                default y
          
         +config X86_32_LAZY_GS
         +      def_bool y
         +      depends on X86_32 && !CC_STACKPROTECTOR
         +
          config KTIME_SCALAR
                def_bool X86_32
          source "init/Kconfig"
          
                  If you don't know what to do here, say N.
          
         -config X86_HAS_BOOT_CPU_ID
         -      def_bool y
         -      depends on X86_VOYAGER
         +config X86_X2APIC
         +      bool "Support x2apic"
         +      depends on X86_LOCAL_APIC && X86_64
         +      ---help---
         +        This enables x2apic support on CPUs that have this feature.
         +
         +        This allows 32-bit apic IDs (so it can support very large systems),
         +        and accesses the local apic via MSRs not via mmio.
         +
         +        ( On certain CPU models you may need to enable INTR_REMAP too,
         +          to get functional x2apic mode. )
         +
         +        If you don't know what to do here, say N.
          
          config SPARSE_IRQ
                bool "Support sparse irq numbering"
                depends on PCI_MSI || HT_IRQ
         -      help
         +      ---help---
                  This enables support for sparse irqs. This is useful for distro
                  kernels that want to define a high CONFIG_NR_CPUS value but still
                  want to have low kernel memory footprint on smaller machines.
@@@@@@@@@@@ -272,140 -272,140 -272,140 -269,140 -272,140 -275,140 -272,140 -272,140 -272,140 -265,114 +275,140 @@@@@@@@@@@ config NUMA_MIGRATE_IRQ_DES
                bool "Move irq desc when changing irq smp_affinity"
                depends on SPARSE_IRQ && NUMA
                default n
         -      help
         +      ---help---
                  This enables moving irq_desc to cpu/node that irq will use handled.
          
                  If you don't know what to do here, say N.
          
         -config X86_FIND_SMP_CONFIG
         -      def_bool y
         -      depends on X86_MPPARSE || X86_VOYAGER
         -
          config X86_MPPARSE
                bool "Enable MPS table" if ACPI
                default y
                depends on X86_LOCAL_APIC
         -      help
         +      ---help---
                  For old smp systems that do not have proper acpi support. Newer systems
                  (esp with 64bit cpus) with acpi support, MADT and DSDT will override it
          
         -choice
         -      prompt "Subarchitecture Type"
         -      default X86_PC
         +config X86_BIGSMP
         +      bool "Support for big SMP systems with more than 8 CPUs"
         +      depends on X86_32 && SMP
         +      ---help---
         +        This option is needed for the systems that have more than 8 CPUs
          
         -config X86_PC
         -      bool "PC-compatible"
         -      help
         -        Choose this option if your computer is a standard PC or compatible.
         +if X86_32
         +config X86_EXTENDED_PLATFORM
         +      bool "Support for extended (non-PC) x86 platforms"
         +      default y
         +      ---help---
         +        If you disable this option then the kernel will only support
         +        standard PC platforms. (which covers the vast majority of
         +        systems out there.)
         +
         +        If you enable this option then you'll be able to select support
         +        for the following (non-PC) 32 bit x86 platforms:
         +              AMD Elan
         +              NUMAQ (IBM/Sequent)
         +              RDC R-321x SoC
         +              SGI 320/540 (Visual Workstation)
         +              Summit/EXA (IBM x440)
         +              Unisys ES7000 IA32 series
         +
         +        If you have one of these systems, or if you want to build a
         +        generic distribution kernel, say Y here - otherwise say N.
         +endif
         +
         +if X86_64
         +config X86_EXTENDED_PLATFORM
         +      bool "Support for extended (non-PC) x86 platforms"
         +      default y
         +      ---help---
         +        If you disable this option then the kernel will only support
         +        standard PC platforms. (which covers the vast majority of
         +        systems out there.)
         +
         +        If you enable this option then you'll be able to select support
         +        for the following (non-PC) 64 bit x86 platforms:
         +              ScaleMP vSMP
         +              SGI Ultraviolet
         +
         +        If you have one of these systems, or if you want to build a
         +        generic distribution kernel, say Y here - otherwise say N.
         +endif
         +# This is an alphabetically sorted list of 64 bit extended platforms
         +# Please maintain the alphabetic order if and when there are additions
         +
         +config X86_VSMP
         +      bool "ScaleMP vSMP"
         +      select PARAVIRT
         +      depends on X86_64 && PCI
         +      depends on X86_EXTENDED_PLATFORM
         +      ---help---
         +        Support for ScaleMP vSMP systems.  Say 'Y' here if this kernel is
         +        supposed to run on these EM64T-based machines.  Only choose this option
         +        if you have one of these machines.
         +
         +config X86_UV
         +      bool "SGI Ultraviolet"
         +      depends on X86_64
         +      depends on X86_EXTENDED_PLATFORM
         +      select X86_X2APIC
         +      ---help---
         +        This option is needed in order to support SGI Ultraviolet systems.
         +        If you don't have one of these, you should say N here.
         +
         +# Following is an alphabetically sorted list of 32 bit extended platforms
         +# Please maintain the alphabetic order if and when there are additions
          
          config X86_ELAN
                bool "AMD Elan"
                depends on X86_32
         -      help
         +      depends on X86_EXTENDED_PLATFORM
         +      ---help---
                  Select this for an AMD Elan processor.
          
                  Do not use this option for K6/Athlon/Opteron processors!
          
                  If unsure, choose "PC-compatible" instead.
          
         -config X86_VOYAGER
         -      bool "Voyager (NCR)"
         -      depends on X86_32 && (SMP || BROKEN) && !PCI
         -      help
         -        Voyager is an MCA-based 32-way capable SMP architecture proprietary
         -        to NCR Corp.  Machine classes 345x/35xx/4100/51xx are Voyager-based.
         -
         -        *** WARNING ***
         -
         -        If you do not specifically know you have a Voyager based machine,
         -        say N here, otherwise the kernel you build will not be bootable.
         -
         -config X86_GENERICARCH
         -       bool "Generic architecture"
         +config X86_RDC321X
         +      bool "RDC R-321x SoC"
                depends on X86_32
         -       help
         -          This option compiles in the NUMAQ, Summit, bigsmp, ES7000, default
         +      depends on X86_EXTENDED_PLATFORM
         +      select M486
         +      select X86_REBOOTFIXUPS
         +      ---help---
         +        This option is needed for RDC R-321x system-on-chip, also known
         +        as R-8610-(G).
         +        If you don't have one of these chips, you should say N here.
         +
         +config X86_32_NON_STANDARD
         +      bool "Support non-standard 32-bit SMP architectures"
         +      depends on X86_32 && SMP
         +      depends on X86_EXTENDED_PLATFORM
         +      ---help---
         +        This option compiles in the NUMAQ, Summit, bigsmp, ES7000, default
                  subarchitectures.  It is intended for a generic binary kernel.
                  if you select them all, kernel will probe it one by one. and will
                  fallback to default.
          
         -if X86_GENERICARCH
         +# Alphabetically sorted list of Non standard 32 bit platforms
          
          config X86_NUMAQ
                bool "NUMAQ (IBM/Sequent)"
         -      depends on SMP && X86_32 && PCI && X86_MPPARSE
         +      depends on X86_32_NON_STANDARD
                select NUMA
         -      help
         +      select X86_MPPARSE
         +      ---help---
                  This option is used for getting Linux to run on a NUMAQ (IBM/Sequent)
                  NUMA multiquad box. This changes the way that processors are
                  bootstrapped, and uses Clustered Logical APIC addressing mode instead
                  of Flat Logical.  You will need a new lynxer.elf file to flash your
                  firmware with - send email to <Martin.Bligh@us.ibm.com>.
          
         -config X86_SUMMIT
         -      bool "Summit/EXA (IBM x440)"
         -      depends on X86_32 && SMP
         -      help
         -        This option is needed for IBM systems that use the Summit/EXA chipset.
         -        In particular, it is needed for the x440.
         -
         -config X86_ES7000
         -      bool "Support for Unisys ES7000 IA32 series"
         -      depends on X86_32 && SMP
         -      help
         -        Support for Unisys ES7000 systems.  Say 'Y' here if this kernel is
         -        supposed to run on an IA32-based Unisys ES7000 system.
         -
         -config X86_BIGSMP
         -      bool "Support for big SMP systems with more than 8 CPUs"
         -      depends on X86_32 && SMP
         -      help
         -        This option is needed for the systems that have more than 8 CPUs
         -        and if the system is not of any sub-arch type above.
         -
         -endif
         -
         -config X86_VSMP
         -      bool "Support for ScaleMP vSMP"
         -      select PARAVIRT
         -      depends on X86_64 && PCI
         -      help
         -        Support for ScaleMP vSMP systems.  Say 'Y' here if this kernel is
         -        supposed to run on these EM64T-based machines.  Only choose this option
         -        if you have one of these machines.
         -
         -endchoice
         -
          config X86_VISWS
                bool "SGI 320/540 (Visual Workstation)"
         -      depends on X86_32 && PCI && !X86_VOYAGER && X86_MPPARSE && PCI_GODIRECT
         -      help
         +      depends on X86_32 && PCI && X86_MPPARSE && PCI_GODIRECT
         +      depends on X86_32_NON_STANDARD
         +      ---help---
                  The SGI Visual Workstation series is an IA32-based workstation
                  based on SGI systems chips with some legacy PC hardware attached.
          
                  A kernel compiled for the Visual Workstation will run on general
                  PCs as well. See <file:Documentation/sgi-visws.txt> for details.
          
         -config X86_RDC321X
         -      bool "RDC R-321x SoC"
         -      depends on X86_32
         -      select M486
         -      select X86_REBOOTFIXUPS
         -      help
         -        This option is needed for RDC R-321x system-on-chip, also known
         -        as R-8610-(G).
         -        If you don't have one of these chips, you should say N here.
         +config X86_SUMMIT
         +      bool "Summit/EXA (IBM x440)"
         +      depends on X86_32_NON_STANDARD
         +      ---help---
         +        This option is needed for IBM systems that use the Summit/EXA chipset.
         +        In particular, it is needed for the x440.
         +
         +config X86_ES7000
         +      bool "Unisys ES7000 IA32 series"
         +      depends on X86_32_NON_STANDARD && X86_BIGSMP
         +      ---help---
         +        Support for Unisys ES7000 systems.  Say 'Y' here if this kernel is
         +        supposed to run on an IA32-based Unisys ES7000 system.
          
          config SCHED_OMIT_FRAME_POINTER
                def_bool y
                prompt "Single-depth WCHAN output"
                depends on X86
         -      help
         +      ---help---
                  Calculate simpler /proc/<PID>/wchan values. If this option
                  is disabled then wchan values will recurse back to the
                  caller function. This provides more accurate wchan values,
          
          menuconfig PARAVIRT_GUEST
                bool "Paravirtualized guest support"
         -      help
         +      ---help---
                  Say Y here to get to see options related to running Linux under
                  various hypervisors.  This option alone does not add any kernel code.
          
@@@@@@@@@@@ -456,7 -456,7 -456,7 -453,7 -456,7 -459,7 -456,7 -456,7 -456,7 -419,8 +459,7 @@@@@@@@@@@ config VM
                bool "VMI Guest support"
                select PARAVIRT
                depends on X86_32
         -      depends on !X86_VOYAGER
         -      help
         +      ---help---
                  VMI provides a paravirtualized interface to the VMware ESX server
                  (it could be used by other hypervisors in theory too, but is not
                  at the moment), by linking the kernel to a GPL-ed ROM module
@@@@@@@@@@@ -466,7 -466,7 -466,7 -463,7 -466,7 -469,7 -466,7 -466,7 -466,7 -430,8 +469,7 @@@@@@@@@@@ config KVM_CLOC
                bool "KVM paravirtualized clock"
                select PARAVIRT
                select PARAVIRT_CLOCK
         -      depends on !X86_VOYAGER
         -      help
         +      ---help---
                  Turning on this option will allow you to run a paravirtualized clock
                  when running over the KVM hypervisor. Instead of relying on a PIT
                  (or probably other) emulation by the underlying device model, the host
          config KVM_GUEST
                bool "KVM Guest support"
                select PARAVIRT
         -      depends on !X86_VOYAGER
         -      help
         -       This option enables various optimizations for running under the KVM
         -       hypervisor.
         +      ---help---
         +        This option enables various optimizations for running under the KVM
         +        hypervisor.
          
          source "arch/x86/lguest/Kconfig"
          
          config PARAVIRT
                bool "Enable paravirtualization code"
         -      depends on !X86_VOYAGER
         -      help
         +      ---help---
                  This changes the kernel so it can modify itself when it is run
                  under a hypervisor, potentially improving performance significantly
                  over full virtualization.  However, when run without a hypervisor
@@@@@@@@@@@ -497,51 -497,51 -497,51 -494,51 -497,51 -500,51 -497,51 -497,51 -497,51 -464,51 +500,51 @@@@@@@@@@@ config PARAVIRT_CLOC
          endif
          
          config PARAVIRT_DEBUG
         -       bool "paravirt-ops debugging"
         -       depends on PARAVIRT && DEBUG_KERNEL
         -       help
         -         Enable to debug paravirt_ops internals.  Specifically, BUG if
         -       a paravirt_op is missing when it is called.
         +      bool "paravirt-ops debugging"
         +      depends on PARAVIRT && DEBUG_KERNEL
         +      ---help---
         +        Enable to debug paravirt_ops internals.  Specifically, BUG if
         +        a paravirt_op is missing when it is called.
          
          config MEMTEST
                bool "Memtest"
         -      help
         +      ---help---
                  This option adds a kernel parameter 'memtest', which allows memtest
                  to be set.
         -              memtest=0, mean disabled; -- default
         -              memtest=1, mean do 1 test pattern;
         -              ...
         -              memtest=4, mean do 4 test patterns.
         +              memtest=0, mean disabled; -- default
         +              memtest=1, mean do 1 test pattern;
         +              ...
         +              memtest=4, mean do 4 test patterns.
                  If you are unsure how to answer this question, answer N.
          
          config X86_SUMMIT_NUMA
                def_bool y
         -      depends on X86_32 && NUMA && X86_GENERICARCH
         +      depends on X86_32 && NUMA && X86_32_NON_STANDARD
          
          config X86_CYCLONE_TIMER
                def_bool y
         -      depends on X86_GENERICARCH
         +      depends on X86_32_NON_STANDARD
          
          source "arch/x86/Kconfig.cpu"
          
          config HPET_TIMER
                def_bool X86_64
                prompt "HPET Timer Support" if X86_32
         -      help
         -         Use the IA-PC HPET (High Precision Event Timer) to manage
         -         time in preference to the PIT and RTC, if a HPET is
         -         present.
         -         HPET is the next generation timer replacing legacy 8254s.
         -         The HPET provides a stable time base on SMP
         -         systems, unlike the TSC, but it is more expensive to access,
         -         as it is off-chip.  You can find the HPET spec at
         -         <http://www.intel.com/hardwaredesign/hpetspec_1.pdf>.
         +      ---help---
         +        Use the IA-PC HPET (High Precision Event Timer) to manage
         +        time in preference to the PIT and RTC, if a HPET is
         +        present.
         +        HPET is the next generation timer replacing legacy 8254s.
         +        The HPET provides a stable time base on SMP
         +        systems, unlike the TSC, but it is more expensive to access,
         +        as it is off-chip.  You can find the HPET spec at
         +        <http://www.intel.com/hardwaredesign/hpetspec_1.pdf>.
          
         -         You can safely choose Y here.  However, HPET will only be
         -         activated if the platform and the BIOS support this feature.
         -         Otherwise the 8254 will be used for timing services.
         +        You can safely choose Y here.  However, HPET will only be
         +        activated if the platform and the BIOS support this feature.
         +        Otherwise the 8254 will be used for timing services.
          
         -         Choose N to continue using the legacy 8254 timer.
         +        Choose N to continue using the legacy 8254 timer.
          
          config HPET_EMULATE_RTC
                def_bool y
          config DMI
                default y
                bool "Enable DMI scanning" if EMBEDDED
         -      help
         +      ---help---
                  Enabled scanning of DMI to identify machine quirks. Say Y
                  here unless you have verified that your setup is not
                  affected by entries in the DMI blacklist. Required by PNP
@@@@@@@@@@@ -564,7 -564,7 -564,7 -561,7 -564,7 -567,7 -564,7 -564,7 -564,7 -531,7 +567,7 @@@@@@@@@@@ config GART_IOMM
                select SWIOTLB
                select AGP
                depends on X86_64 && PCI
         -      help
         +      ---help---
                  Support for full DMA access of devices with 32bit memory access only
                  on systems with more than 3GB. This is usually needed for USB,
                  sound, many IDE/SATA chipsets and some other devices.
@@@@@@@@@@@ -579,7 -579,7 -579,7 -576,7 -579,7 -582,7 -579,7 -579,7 -579,7 -546,7 +582,7 @@@@@@@@@@@ config CALGARY_IOMM
                bool "IBM Calgary IOMMU support"
                select SWIOTLB
                depends on X86_64 && PCI && EXPERIMENTAL
         -      help
         +      ---help---
                  Support for hardware IOMMUs in IBM's xSeries x366 and x460
                  systems. Needed to run systems with more than 3GB of memory
                  properly with 32-bit PCI devices that do not support DAC
@@@@@@@@@@@ -597,7 -597,7 -597,7 -594,7 -597,7 -600,7 -597,7 -597,7 -597,7 -564,7 +600,7 @@@@@@@@@@@ config CALGARY_IOMMU_ENABLED_BY_DEFAUL
                def_bool y
                prompt "Should Calgary be enabled by default?"
                depends on CALGARY_IOMMU
         -      help
         +      ---help---
                  Should Calgary be enabled by default? if you choose 'y', Calgary
                  will be used (if it exists). If you choose 'n', Calgary will not be
                  used even if it exists. If you choose 'n' and would like to use
@@@@@@@@@@@ -609,7 -609,7 -609,7 -606,7 -609,7 -612,7 -609,7 -609,7 -609,7 -576,7 +612,7 @@@@@@@@@@@ config AMD_IOMM
                select SWIOTLB
                select PCI_MSI
                depends on X86_64 && PCI && ACPI
         -      help
         +      ---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
@@@@@@@@@@@ -624,7 -624,7 -624,7 -621,7 -624,7 -627,7 -624,7 -624,7 -624,7 -591,7 +627,7 @@@@@@@@@@@ config AMD_IOMMU_STAT
                bool "Export AMD IOMMU statistics to debugfs"
                depends on AMD_IOMMU
                select DEBUG_FS
         -      help
         +      ---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.
          # need this always selected by IOMMU for the VIA workaround
          config SWIOTLB
                def_bool y if X86_64
         -      help
         +      ---help---
                  Support for software bounce buffers used on x86-64 systems
                  which don't have a hardware IOMMU (e.g. the current generation
                  of Intel's x86-64 CPUs). Using this PCI devices which can only
@@@@@@@@@@@ -651,7 -651,7 -651,7 -648,7 -651,7 -654,7 -651,7 -651,7 -651,7 -618,7 +654,7 @@@@@@@@@@@ config MAXSM
                depends on X86_64 && SMP && DEBUG_KERNEL && EXPERIMENTAL
                select CPUMASK_OFFSTACK
                default n
         -      help
         +      ---help---
                  Configure maximum number of CPUS and NUMA Nodes for this architecture.
                  If unsure, say N.
          
@@@@@@@@@@@ -662,7 -662,7 -662,7 -659,7 -662,7 -665,7 -662,7 -662,7 -662,7 -629,7 +665,7 @@@@@@@@@@@ config NR_CPU
                default "4096" if MAXSMP
                default "32" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000)
                default "8" if SMP
         -      help
         +      ---help---
                  This allows you to specify the maximum number of CPUs which this
                  kernel will support.  The maximum supported value is 512 and the
                  minimum value which makes sense is 2.
          config SCHED_SMT
                bool "SMT (Hyperthreading) scheduler support"
                depends on X86_HT
         -      help
         +      ---help---
                  SMT scheduler support improves the CPU scheduler's decision making
                  when dealing with Intel Pentium 4 chips with HyperThreading at a
                  cost of slightly increased overhead in some places. If unsure say
@@@@@@@@@@@ -683,7 -683,7 -683,7 -680,7 -683,7 -686,7 -683,7 -683,7 -683,7 -650,7 +686,7 @@@@@@@@@@@ config SCHED_M
                def_bool y
                prompt "Multi-core scheduler support"
                depends on X86_HT
         -      help
         +      ---help---
                  Multi-core scheduler support improves the CPU scheduler's decision
                  making when dealing with multi-core CPU chips at a cost of slightly
                  increased overhead in some places. If unsure say N here.
@@@@@@@@@@@ -692,8 -692,8 -692,8 -689,8 -692,8 -695,8 -692,8 -692,8 -692,8 -659,8 +695,8 @@@@@@@@@@@ source "kernel/Kconfig.preempt
          
          config X86_UP_APIC
                bool "Local APIC support on uniprocessors"
         -      depends on X86_32 && !SMP && !(X86_VOYAGER || X86_GENERICARCH)
         -      help
         +      depends on X86_32 && !SMP && !X86_32_NON_STANDARD
         +      ---help---
                  A local APIC (Advanced Programmable Interrupt Controller) is an
                  integrated interrupt controller in the CPU. If you have a single-CPU
                  system which has a processor with a local APIC, you can say Y here to
          config X86_UP_IOAPIC
                bool "IO-APIC support on uniprocessors"
                depends on X86_UP_APIC
         -      help
         +      ---help---
                  An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
                  SMP-capable replacement for PC-style interrupt controllers. Most
                  SMP systems and many recent uniprocessor systems have one.
          
          config X86_LOCAL_APIC
                def_bool y
         -      depends on X86_64 || (X86_32 && (X86_UP_APIC || (SMP && !X86_VOYAGER) || X86_GENERICARCH))
         +      depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC
          
          config X86_IO_APIC
                def_bool y
         -      depends on X86_64 || (X86_32 && (X86_UP_IOAPIC || (SMP && !X86_VOYAGER) || X86_GENERICARCH))
         +      depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC
          
          config X86_VISWS_APIC
                def_bool y
@@@@@@@@@@@ -731,7 -731,7 -731,7 -728,7 -731,7 -734,7 -731,7 -731,7 -731,7 -698,7 +734,7 @@@@@@@@@@@ config X86_REROUTE_FOR_BROKEN_BOOT_IRQ
                bool "Reroute for broken boot IRQs"
                default n
                depends on X86_IO_APIC
         -      help
         +      ---help---
                  This option enables a workaround that fixes a source of
                  spurious interrupts. This is recommended when threaded
                  interrupt handling is used on systems where the generation of
          
          config X86_MCE
                bool "Machine Check Exception"
         -      depends on !X86_VOYAGER
                ---help---
                  Machine Check Exception support allows the processor to notify the
                  kernel if it detects a problem (e.g. overheating, component failure).
@@@@@@@@@@@ -771,7 -771,7 -771,7 -768,7 -771,7 -774,7 -771,7 -771,7 -771,7 -739,7 +774,7 @@@@@@@@@@@ config X86_MCE_INTE
                def_bool y
                prompt "Intel MCE features"
                depends on X86_64 && X86_MCE && X86_LOCAL_APIC
         -      help
         +      ---help---
                   Additional support for intel specific MCE features such as
                   the thermal monitor.
          
@@@@@@@@@@@ -779,19 -779,19 -779,19 -776,14 -779,19 -782,19 -779,19 -779,19 -779,19 -747,14 +782,19 @@@@@@@@@@@ config X86_MCE_AM
                def_bool y
                prompt "AMD MCE features"
                depends on X86_64 && X86_MCE && X86_LOCAL_APIC
         -      help
         +      ---help---
                   Additional support for AMD specific MCE features such as
                   the DRAM Error Threshold.
          
   +     +config X86_MCE_THRESHOLD
   +     +      depends on X86_MCE_AMD || X86_MCE_INTEL
   +     +      bool
   +     +      default y
   +     +
          config X86_MCE_NONFATAL
                tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4"
                depends on X86_32 && X86_MCE
         -      help
         +      ---help---
                  Enabling this feature starts a timer that triggers every 5 seconds which
                  will look at the machine check registers to see if anything happened.
                  Non-fatal problems automatically get corrected (but still logged).
          config X86_MCE_P4THERMAL
                bool "check for P4 thermal throttling interrupt."
                depends on X86_32 && X86_MCE && (X86_UP_APIC || SMP)
         -      help
         +      ---help---
                  Enabling this feature will cause a message to be printed when the P4
                  enters thermal throttling.
          
                bool "Enable VM86 support" if EMBEDDED
                default y
                depends on X86_32
         -      help
         -          This option is required by programs like DOSEMU to run 16-bit legacy
         +      ---help---
         +        This option is required by programs like DOSEMU to run 16-bit legacy
                  code on X86 processors. It also may be needed by software like
         -          XFree86 to initialize some video cards via BIOS. Disabling this
         -          option saves about 6k.
         +        XFree86 to initialize some video cards via BIOS. Disabling this
         +        option saves about 6k.
          
          config TOSHIBA
                tristate "Toshiba Laptop support"
@@@@@@@@@@@ -890,33 -890,33 -890,33 -882,33 -890,33 -893,33 -890,33 -890,33 -890,33 -853,33 +893,33 @@@@@@@@@@@ config MICROCOD
                  module will be called microcode.
          
          config MICROCODE_INTEL
         -       bool "Intel microcode patch loading support"
         -       depends on MICROCODE
         -       default MICROCODE
         -       select FW_LOADER
         -       --help---
         -         This options enables microcode patch loading support for Intel
         -         processors.
         -
         -         For latest news and information on obtaining all the required
         -         Intel ingredients for this driver, check:
         -         <http://www.urbanmyth.org/microcode/>.
         +      bool "Intel microcode patch loading support"
         +      depends on MICROCODE
         +      default MICROCODE
         +      select FW_LOADER
         +      ---help---
         +        This options enables microcode patch loading support for Intel
         +        processors.
         +
         +        For latest news and information on obtaining all the required
         +        Intel ingredients for this driver, check:
         +        <http://www.urbanmyth.org/microcode/>.
          
          config MICROCODE_AMD
         -       bool "AMD microcode patch loading support"
         -       depends on MICROCODE
         -       select FW_LOADER
         -       --help---
         -         If you select this option, microcode patch loading support for AMD
         -       processors will be enabled.
         +      bool "AMD microcode patch loading support"
         +      depends on MICROCODE
         +      select FW_LOADER
         +      ---help---
         +        If you select this option, microcode patch loading support for AMD
         +        processors will be enabled.
          
         -   config MICROCODE_OLD_INTERFACE
         +config MICROCODE_OLD_INTERFACE
                def_bool y
                depends on MICROCODE
          
          config X86_MSR
                tristate "/dev/cpu/*/msr - Model-specific register support"
         -      help
         +      ---help---
                  This device gives privileged processes access to the x86
                  Model-Specific Registers (MSRs).  It is a character device with
                  major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
          
          config X86_CPUID
                tristate "/dev/cpu/*/cpuid - CPU information support"
         -      help
         +      ---help---
                  This device gives processes access to the x86 CPUID instruction to
                  be executed on a specific processor.  It is a character device
                  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
                  /dev/cpu/31/cpuid.
          
 + +  + ++config X86_CPU_DEBUG
 + +  + ++      tristate "/sys/kernel/debug/x86/cpu/* - CPU Debug support"
 + +  + ++      ---help---
 + +  + ++        If you select this option, this will provide various x86 CPUs
 + +  + ++        information through debugfs.
 + +  + ++
          choice
                prompt "High Memory Support"
                default HIGHMEM4G if !X86_NUMAQ
@@@@@@@@@@@ -983,7 -977,7 -983,7 -969,7 -983,7 -986,7 -977,7 -983,7 -977,7 -940,7 +986,7 @@@@@@@@@@@ config NOHIGHME
          config HIGHMEM4G
                bool "4GB"
                depends on !X86_NUMAQ
         -      help
         +      ---help---
                  Select this if you have a 32-bit processor and between 1 and 4
                  gigabytes of physical RAM.
          
@@@@@@@@@@@ -991,7 -985,7 -991,7 -977,7 -991,7 -994,7 -985,7 -991,7 -985,7 -948,7 +994,7 @@@@@@@@@@@ config HIGHMEM64
                bool "64GB"
                depends on !M386 && !M486
                select X86_PAE
         -      help
         +      ---help---
                  Select this if you have a 32-bit processor and more than 4
                  gigabytes of physical RAM.
          
                prompt "Memory split" if EMBEDDED
                default VMSPLIT_3G
                depends on X86_32
         -      help
         +      ---help---
                  Select the desired split between kernel and user memory.
          
                  If the address range available to the kernel is less than the
          config X86_PAE
                bool "PAE (Physical Address Extension) Support"
                depends on X86_32 && !HIGHMEM4G
         -      help
         +      ---help---
                  PAE is required for NX support, and furthermore enables
                  larger swapspace support for non-overcommit purposes. It
                  has the cost of more pagetable lookup overhead, and also
                  consumes more pagetable space per process.
          
          config ARCH_PHYS_ADDR_T_64BIT
         -       def_bool X86_64 || X86_PAE
         +      def_bool X86_64 || X86_PAE
          
          config DIRECT_GBPAGES
                bool "Enable 1GB pages for kernel pagetables" if EMBEDDED
                default y
                depends on X86_64
         -      help
         +      ---help---
                  Allow the kernel linear mapping to use 1GB pages on CPUs that
                  support it. This can improve the kernel's performance a tiny bit by
                  reducing TLB pressure. If in doubt, say "Y".
                bool "Numa Memory Allocation and Scheduler Support"
                depends on SMP
                depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && EXPERIMENTAL)
         -      default n if X86_PC
                default y if (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP)
         -      help
         +      ---help---
                  Enable NUMA (Non Uniform Memory Access) support.
          
                  The kernel will try to allocate memory used by a CPU on the
                def_bool y
                prompt "Old style AMD Opteron NUMA detection"
                depends on X86_64 && NUMA && PCI
         -      help
         -       Enable K8 NUMA node topology detection.  You should say Y here if
         -       you have a multi processor AMD K8 system. This uses an old
         -       method to read the NUMA configuration directly from the builtin
         -       Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA
         -       instead, which also takes priority if both are compiled in.
         +      ---help---
         +        Enable K8 NUMA node topology detection.  You should say Y here if
         +        you have a multi processor AMD K8 system. This uses an old
         +        method to read the NUMA configuration directly from the builtin
         +        Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA
         +        instead, which also takes priority if both are compiled in.
          
          config X86_64_ACPI_NUMA
                def_bool y
                prompt "ACPI NUMA detection"
                depends on X86_64 && NUMA && ACPI && PCI
                select ACPI_NUMA
         -      help
         +      ---help---
                  Enable ACPI SRAT based node topology detection.
          
          # Some NUMA nodes have memory ranges that span
@@@@@@@@@@@ -1122,24 -1116,24 -1122,24 -1108,24 -1122,24 -1125,24 -1116,24 -1122,24 -1116,24 -1080,24 +1125,24 @@@@@@@@@@@ config NODES_SPAN_OTHER_NODE
          config NUMA_EMU
                bool "NUMA emulation"
                depends on X86_64 && NUMA
         -      help
         +      ---help---
                  Enable NUMA emulation. A flat machine will be split
                  into virtual nodes when booted with "numa=fake=N", where N is the
                  number of nodes. This is only useful for debugging.
          
          config NODES_SHIFT
                int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
------ ---      range 1 9   if X86_64
++++++ +++      range 1 9
                default "9" if MAXSMP
                default "6" if X86_64
                default "4" if X86_NUMAQ
                default "3"
                depends on NEED_MULTIPLE_NODES
         -      help
         +      ---help---
                  Specify the maximum number of NUMA Nodes available on the target
                  system.  Increases memory reserved to accomodate various tables.
          
   -     -config HAVE_ARCH_BOOTMEM_NODE
   +     +config HAVE_ARCH_BOOTMEM
                def_bool y
                depends on X86_32 && NUMA
          
@@@@@@@@@@@ -1173,7 -1167,7 -1173,7 -1159,7 -1173,7 -1176,7 -1167,7 -1173,7 -1167,7 -1131,7 +1176,7 @@@@@@@@@@@ config ARCH_SPARSEMEM_DEFAUL
          
          config ARCH_SPARSEMEM_ENABLE
                def_bool y
         -      depends on X86_64 || NUMA || (EXPERIMENTAL && X86_PC) || X86_GENERICARCH
         +      depends on X86_64 || NUMA || (EXPERIMENTAL && X86_32) || X86_32_NON_STANDARD
                select SPARSEMEM_STATIC if X86_32
                select SPARSEMEM_VMEMMAP_ENABLE if X86_64
          
          config HIGHPTE
                bool "Allocate 3rd-level pagetables from highmem"
                depends on X86_32 && (HIGHMEM4G || HIGHMEM64G)
         -      help
         +      ---help---
                  The VM uses one page table entry for each page of physical memory.
                  For systems with a lot of RAM, this can be wasteful of precious
                  low memory.  Setting this option will put user-space page table
                  entries in high memory.
          
          config X86_CHECK_BIOS_CORRUPTION
         -        bool "Check for low memory corruption"
         -      help
         -       Periodically check for memory corruption in low memory, which
         -       is suspected to be caused by BIOS.  Even when enabled in the
         -       configuration, it is disabled at runtime.  Enable it by
         -       setting "memory_corruption_check=1" on the kernel command
         -       line.  By default it scans the low 64k of memory every 60
         -       seconds; see the memory_corruption_check_size and
         -       memory_corruption_check_period parameters in
         -       Documentation/kernel-parameters.txt to adjust this.
         -
         -       When enabled with the default parameters, this option has
         -       almost no overhead, as it reserves a relatively small amount
         -       of memory and scans it infrequently.  It both detects corruption
         -       and prevents it from affecting the running system.
         -
         -       It is, however, intended as a diagnostic tool; if repeatable
         -       BIOS-originated corruption always affects the same memory,
         -       you can use memmap= to prevent the kernel from using that
         -       memory.
         +      bool "Check for low memory corruption"
         +      ---help---
         +        Periodically check for memory corruption in low memory, which
         +        is suspected to be caused by BIOS.  Even when enabled in the
         +        configuration, it is disabled at runtime.  Enable it by
         +        setting "memory_corruption_check=1" on the kernel command
         +        line.  By default it scans the low 64k of memory every 60
         +        seconds; see the memory_corruption_check_size and
         +        memory_corruption_check_period parameters in
         +        Documentation/kernel-parameters.txt to adjust this.
         +
         +        When enabled with the default parameters, this option has
         +        almost no overhead, as it reserves a relatively small amount
         +        of memory and scans it infrequently.  It both detects corruption
         +        and prevents it from affecting the running system.
         +
         +        It is, however, intended as a diagnostic tool; if repeatable
         +        BIOS-originated corruption always affects the same memory,
         +        you can use memmap= to prevent the kernel from using that
         +        memory.
          
          config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
         -        bool "Set the default setting of memory_corruption_check"
         +      bool "Set the default setting of memory_corruption_check"
                depends on X86_CHECK_BIOS_CORRUPTION
                default y
         -      help
         -       Set whether the default state of memory_corruption_check is
         -       on or off.
         +      ---help---
         +        Set whether the default state of memory_corruption_check is
         +        on or off.
          
          config X86_RESERVE_LOW_64K
         -        bool "Reserve low 64K of RAM on AMI/Phoenix BIOSen"
         +      bool "Reserve low 64K of RAM on AMI/Phoenix BIOSen"
                default y
         -      help
         -       Reserve the first 64K of physical RAM on BIOSes that are known
         -       to potentially corrupt that memory range. A numbers of BIOSes are
         -       known to utilize this area during suspend/resume, so it must not
         -       be used by the kernel.
         +      ---help---
         +        Reserve the first 64K of physical RAM on BIOSes that are known
         +        to potentially corrupt that memory range. A numbers of BIOSes are
         +        known to utilize this area during suspend/resume, so it must not
         +        be used by the kernel.
          
         -       Set this to N if you are absolutely sure that you trust the BIOS
         -       to get all its memory reservations and usages right.
         +        Set this to N if you are absolutely sure that you trust the BIOS
         +        to get all its memory reservations and usages right.
          
         -       If you have doubts about the BIOS (e.g. suspend/resume does not
         -       work or there's kernel crashes after certain hardware hotplug
         -       events) and it's not AMI or Phoenix, then you might want to enable
         -       X86_CHECK_BIOS_CORRUPTION=y to allow the kernel to check typical
         -       corruption patterns.
         +        If you have doubts about the BIOS (e.g. suspend/resume does not
         +        work or there's kernel crashes after certain hardware hotplug
         +        events) and it's not AMI or Phoenix, then you might want to enable
         +        X86_CHECK_BIOS_CORRUPTION=y to allow the kernel to check typical
         +        corruption patterns.
          
         -       Say Y if unsure.
         +        Say Y if unsure.
          
          config MATH_EMULATION
                bool
@@@@@@@@@@@ -1310,7 -1304,7 -1310,7 -1296,7 -1310,7 -1313,7 -1304,7 -1310,7 -1304,7 -1268,7 +1313,7 @@@@@@@@@@@ config MTRR_SANITIZE
                def_bool y
                prompt "MTRR cleanup support"
                depends on MTRR
         -      help
         +      ---help---
                  Convert MTRR layout from continuous to discrete, so X drivers can
                  add writeback entries.
          
@@@@@@@@@@@ -1325,7 -1319,7 -1325,7 -1311,7 -1325,7 -1328,7 -1319,7 -1325,7 -1319,7 -1283,7 +1328,7 @@@@@@@@@@@ config MTRR_SANITIZER_ENABLE_DEFAUL
                range 0 1
                default "0"
                depends on MTRR_SANITIZER
         -      help
         +      ---help---
                  Enable mtrr cleanup default value
          
          config MTRR_SANITIZER_SPARE_REG_NR_DEFAULT
                range 0 7
                default "1"
                depends on MTRR_SANITIZER
         -      help
         +      ---help---
                  mtrr cleanup spare entries default, it can be changed via
                  mtrr_spare_reg_nr=N on the kernel command line.
          
                bool
                prompt "x86 PAT support"
                depends on MTRR
         -      help
         +      ---help---
                  Use PAT attributes to setup page level cache control.
          
                  PATs are the modern equivalents of MTRRs and are much more
                bool "EFI runtime service support"
                depends on ACPI
                ---help---
         -      This enables the kernel to use EFI runtime services that are
         -      available (such as the EFI variable services).
         +        This enables the kernel to use EFI runtime services that are
         +        available (such as the EFI variable services).
          
         -      This option is only useful on systems that have EFI firmware.
         -      In addition, you should use the latest ELILO loader available
         -      at <http://elilo.sourceforge.net> in order to take advantage
         -      of EFI runtime services. However, even with this option, the
         -      resultant kernel should continue to boot on existing non-EFI
         -      platforms.
         +        This option is only useful on systems that have EFI firmware.
         +        In addition, you should use the latest ELILO loader available
         +        at <http://elilo.sourceforge.net> in order to take advantage
         +        of EFI runtime services. However, even with this option, the
         +        resultant kernel should continue to boot on existing non-EFI
         +        platforms.
          
          config SECCOMP
                def_bool y
                prompt "Enable seccomp to safely compute untrusted bytecode"
         -      help
         +      ---help---
                  This kernel feature is useful for number crunching applications
                  that may need to compute untrusted bytecode during their
                  execution. By using pipes or other transports made available to
          
                  If unsure, say Y. Only embedded should say N here.
          
         +config CC_STACKPROTECTOR_ALL
         +      bool
         +
          config CC_STACKPROTECTOR
                bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
         -      depends on X86_64 && EXPERIMENTAL && BROKEN
         -      help
         -         This option turns on the -fstack-protector GCC feature. This
         -        feature puts, at the beginning of critical functions, a canary
         -        value on the stack just before the return address, and validates
         +      select CC_STACKPROTECTOR_ALL
         +      ---help---
         +        This option turns on the -fstack-protector GCC feature. This
         +        feature puts, at the beginning of functions, a canary value on
         +        the stack just before the return address, and validates
                  the value just before actually returning.  Stack based buffer
                  overflows (that need to overwrite this return address) now also
                  overwrite the canary, which gets detected and the attack is then
          
                  This feature requires gcc version 4.2 or above, or a distribution
                  gcc with the feature backported. Older versions are automatically
         -        detected and for those versions, this configuration option is ignored.
         -
         -config CC_STACKPROTECTOR_ALL
         -      bool "Use stack-protector for all functions"
         -      depends on CC_STACKPROTECTOR
         -      help
         -        Normally, GCC only inserts the canary value protection for
         -        functions that use large-ish on-stack buffers. By enabling
         -        this option, GCC will be asked to do this for ALL functions.
         +        detected and for those versions, this configuration option is
         +        ignored. (and a warning is printed during bootup)
          
          source kernel/Kconfig.hz
          
          config KEXEC
                bool "kexec system call"
         -      depends on X86_BIOS_REBOOT
         -      help
         +      ---help---
                  kexec is a system call that implements the ability to shutdown your
                  current kernel, and to start another kernel.  It is like a reboot
                  but it is independent of the system firmware.   And like a reboot
          config CRASH_DUMP
                bool "kernel crash dumps"
                depends on X86_64 || (X86_32 && HIGHMEM)
         -      help
         +      ---help---
                  Generate crash dump after being started by kexec.
                  This should be normally only set in special crash dump kernels
                  which are loaded in the main kernel with kexec-tools into
          config KEXEC_JUMP
                bool "kexec jump (EXPERIMENTAL)"
                depends on EXPERIMENTAL
 - -     -      depends on KEXEC && HIBERNATION && X86_32
         -      help
 + +     +      depends on KEXEC && HIBERNATION
         +      ---help---
                  Jump between original kernel and kexeced kernel and invoke
                  code in physical address mode via KEXEC
          
@@@@@@@@@@@ -1447,7 -1441,7 -1447,7 -1433,7 -1447,7 -1450,7 -1441,7 -1447,7 -1441,7 -1410,7 +1450,7 @@@@@@@@@@@ config PHYSICAL_STAR
                default "0x1000000" if X86_NUMAQ
                default "0x200000" if X86_64
                default "0x100000"
         -      help
         +      ---help---
                  This gives the physical address where the kernel is loaded.
          
                  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
          config RELOCATABLE
                bool "Build a relocatable kernel (EXPERIMENTAL)"
                depends on EXPERIMENTAL
         -      help
         +      ---help---
                  This builds a kernel image that retains relocation information
                  so it can be loaded someplace besides the default 1MB.
                  The relocations tend to make the kernel binary about 10% larger,
@@@@@@@@@@@ -1508,7 -1502,7 -1508,7 -1494,7 -1508,7 -1511,7 -1502,7 -1508,7 -1502,7 -1471,7 +1511,7 @@@@@@@@@@@ config PHYSICAL_ALIG
                default "0x100000" if X86_32
                default "0x200000" if X86_64
                range 0x2000 0x400000
         -      help
         +      ---help---
                  This value puts the alignment restrictions on physical address
                  where kernel is loaded and run from. Kernel is compiled for an
                  address which meets above alignment restriction.
          
          config HOTPLUG_CPU
                bool "Support for hot-pluggable CPUs"
         -      depends on SMP && HOTPLUG && !X86_VOYAGER
         +      depends on SMP && HOTPLUG
                ---help---
                  Say Y here to allow turning CPUs off and on. CPUs can be
                  controlled through /sys/devices/system/cpu.
@@@@@@@@@@@ -1541,7 -1535,7 -1541,7 -1527,7 -1541,7 -1544,7 -1535,7 -1541,7 -1535,7 -1504,7 +1544,7 @@@@@@@@@@@ config COMPAT_VDS
                def_bool y
                prompt "Compat VDSO support"
                depends on X86_32 || IA32_EMULATION
         -      help
         +      ---help---
                  Map the 32-bit VDSO to the predictable old-style address too.
                ---help---
                  Say N here if you are running a sufficiently recent glibc
          config CMDLINE_BOOL
                bool "Built-in kernel command line"
                default n
         -      help
         +      ---help---
                  Allow for specifying boot arguments to the kernel at
                  build time.  On some systems (e.g. embedded ones), it is
                  necessary or convenient to provide some or all of the
                string "Built-in kernel command string"
                depends on CMDLINE_BOOL
                default ""
         -      help
         +      ---help---
                  Enter arguments here that should be compiled into the kernel
                  image and used at boot time.  If the boot loader provides a
                  command line at boot time, it is appended to this string to
@@@@@@@@@@@ -1588,7 -1582,7 -1588,7 -1574,7 -1588,7 -1591,7 -1582,7 -1588,7 -1582,7 -1551,7 +1591,7 @@@@@@@@@@@ config CMDLINE_OVERRID
                bool "Built-in command line overrides boot loader arguments"
                default n
                depends on CMDLINE_BOOL
         -      help
         +      ---help---
                  Set this option to 'Y' to have the kernel ignore the boot loader
                  command line, and use ONLY the built-in command line.
          
@@@@@@@@@@@ -1610,6 -1604,6 -1610,6 -1596,6 -1610,6 -1613,6 -1604,6 -1610,6 -1604,6 -1573,7 +1613,6 @@@@@@@@@@@ config HAVE_ARCH_EARLY_PFN_TO_NI
                depends on NUMA
          
          menu "Power management and ACPI options"
         -      depends on !X86_VOYAGER
          
          config ARCH_HIBERNATION_HEADER
                def_bool y
          
          config APM_IGNORE_USER_SUSPEND
                bool "Ignore USER SUSPEND"
         -      help
         +      ---help---
                  This option will ignore USER SUSPEND requests. On machines with a
                  compliant APM BIOS, you want to say N. However, on the NEC Versa M
                  series notebooks, it is necessary to say Y because of a BIOS bug.
@@@@@@@@@@@ -1711,7 -1705,7 -1711,7 -1697,7 -1711,7 -1714,7 -1705,7 -1711,7 -1705,7 -1675,7 +1714,7 @@@@@@@@@@@ config APM_DO_ENABL
          
          config APM_CPU_IDLE
                bool "Make CPU Idle calls when idle"
         -      help
         +      ---help---
                  Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop.
                  On some machines, this can activate improved power savings, such as
                  a slowed CPU clock rate, when the machine is idle. These idle calls
          
          config APM_DISPLAY_BLANK
                bool "Enable console blanking using APM"
         -      help
         +      ---help---
                  Enable console blanking using the APM. Some laptops can use this to
                  turn off the LCD backlight when the screen blanker of the Linux
                  virtual console blanks the screen. Note that this is only used by
          
          config APM_ALLOW_INTS
                bool "Allow interrupts during APM BIOS calls"
         -      help
         +      ---help---
                  Normally we disable external interrupts while we are making calls to
                  the APM BIOS as a measure to lessen the effects of a badly behaving
                  BIOS implementation.  The BIOS should reenable interrupts if it
                bool "PCI support"
                default y
                select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC)
         -      help
         +      ---help---
                  Find out whether you have a PCI motherboard. PCI is the name of a
                  bus system, i.e. the way the CPU talks to the other stuff inside
                  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
@@@@@@@@@@@ -1831,7 -1825,7 -1831,7 -1817,7 -1831,7 -1834,7 -1825,7 -1831,7 -1825,7 -1795,7 +1834,7 @@@@@@@@@@@ config PCI_MMCONFI
          config DMAR
                bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
                depends on X86_64 && PCI_MSI && ACPI && EXPERIMENTAL
         -      help
         +      ---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
                def_bool y
                prompt "Support for Graphics workaround"
                depends on DMAR
         -      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.
         +      ---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.
          
          config DMAR_FLOPPY_WA
                def_bool y
                depends on DMAR
         -      help
         -       Floppy disk drivers are know to bypass DMA API calls
         -       thereby failing to work when IOMMU is enabled. This
         -       workaround will setup a 1:1 mapping for the first
         -       16M to make floppy (an ISA device) work.
         +      ---help---
         +        Floppy disk drivers are know to bypass DMA API calls
         +        thereby failing to work when IOMMU is enabled. This
         +        workaround will setup a 1:1 mapping for the first
         +        16M 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.
         +      select X86_X2APIC
         +      ---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"
          
          
          config ISA
                bool "ISA support"
         -      depends on !X86_VOYAGER
         -      help
         +      ---help---
                  Find out whether you have ISA slots on your motherboard.  ISA is the
                  name of a bus system, i.e. the way the CPU talks to the other stuff
                  inside your box.  Other bus systems are PCI, EISA, MicroChannel
          source "drivers/eisa/Kconfig"
          
          config MCA
         -      bool "MCA support" if !X86_VOYAGER
         -      default y if X86_VOYAGER
         -      help
         +      bool "MCA support"
         +      ---help---
                  MicroChannel Architecture is found in some IBM PS/2 machines and
                  laptops.  It is a bus system similar to PCI or ISA. See
                  <file:Documentation/mca.txt> (and especially the web page given
@@@@@@@@@@@ -1927,7 -1921,7 -1927,7 -1913,7 -1927,7 -1930,7 -1921,7 -1927,7 -1921,7 -1892,8 +1930,7 @@@@@@@@@@@ source "drivers/mca/Kconfig
          
          config SCx200
                tristate "NatSemi SCx200 support"
         -      depends on !X86_VOYAGER
         -      help
         +      ---help---
                  This provides basic support for National Semiconductor's
                  (now AMD's) Geode processors.  The driver probes for the
                  PCI-IDs of several on-chip devices, so its a good dependency
@@@@@@@@@@@ -1939,7 -1933,7 -1939,7 -1925,7 -1939,7 -1942,7 -1933,7 -1939,7 -1933,7 -1905,7 +1942,7 @@@@@@@@@@@ config SCx200HR_TIME
                tristate "NatSemi SCx200 27MHz High-Resolution Timer Support"
                depends on SCx200 && GENERIC_TIME
                default y
         -      help
         +      ---help---
                  This driver provides a clocksource built upon the on-chip
                  27MHz high-resolution timer.  Its also a workaround for
                  NSC Geode SC-1100's buggy TSC, which loses time when the
@@@@@@@@@@@ -1950,7 -1944,7 -1950,7 -1936,7 -1950,7 -1953,7 -1944,7 -1950,7 -1944,7 -1916,7 +1953,7 @@@@@@@@@@@ config GEODE_MFGPT_TIME
                def_bool y
                prompt "Geode Multi-Function General Purpose Timer (MFGPT) events"
                depends on MGEODE_LX && GENERIC_TIME && GENERIC_CLOCKEVENTS
         -      help
         +      ---help---
                  This driver provides a clock event source based on the MFGPT
                  timer(s) in the CS5535 and CS5536 companion chip for the geode.
                  MFGPTs have a better resolution and max interval than the
          config OLPC
                bool "One Laptop Per Child support"
                default n
         -      help
         +      ---help---
                  Add support for detecting the unique features of the OLPC
                  XO hardware.
          
                bool "IA32 Emulation"
                depends on X86_64
                select COMPAT_BINFMT_ELF
         -      help
         +      ---help---
                  Include code to run 32-bit programs under a 64-bit kernel. You should
                  likely turn this on, unless you're 100% sure that you don't have any
                  32-bit programs left.
          
          config IA32_AOUT
         -       tristate "IA32 a.out support"
         -       depends on IA32_EMULATION
         -       help
         -         Support old a.out binaries in the 32bit emulation.
         +      tristate "IA32 a.out support"
         +      depends on IA32_EMULATION
         +      ---help---
         +        Support old a.out binaries in the 32bit emulation.
          
          config COMPAT
                def_bool y
index 76139506c3e4f489d6252edd272e98d0e8637ead,76139506c3e4f489d6252edd272e98d0e8637ead,76139506c3e4f489d6252edd272e98d0e8637ead,dccef5be0fc1e5d4dcd6018be223c7d112d4497b,76139506c3e4f489d6252edd272e98d0e8637ead,76139506c3e4f489d6252edd272e98d0e8637ead,bd3406db1d680fee9d924221dca1836681169c62,76139506c3e4f489d6252edd272e98d0e8637ead,76139506c3e4f489d6252edd272e98d0e8637ead,3bfd5235a9eb46dbf5e1386cf8ba34b6e8765066..ae85a8d66a30601a1a22c3b6b84f3df6d3056477
@@@@@@@@@@@ -16,7 -16,7 -16,7 -16,7 -16,7 -16,7 -16,7 -16,7 -16,7 -16,6 +16,7 @@@@@@@@@@@ struct mm_struct
          #include <asm/cpufeature.h>
          #include <asm/system.h>
          #include <asm/page.h>
         +#include <asm/pgtable_types.h>
          #include <asm/percpu.h>
          #include <asm/msr.h>
          #include <asm/desc_defs.h>
@@@@@@@@@@@ -74,10 -74,10 -74,10 -74,10 -74,10 -74,10 -74,10 -74,10 -74,10 -73,10 +74,10 @@@@@@@@@@@ struct cpuinfo_x86 
                char                    pad0;
          #else
                /* Number of 4K pages in DTLB/ITLB combined(in pages): */
         -      int                      x86_tlbsize;
         +      int                     x86_tlbsize;
++++++ +++#endif
                __u8                    x86_virt_bits;
                __u8                    x86_phys_bits;
------ ---#endif
                /* CPUID returned core id bits: */
                __u8                    x86_coreid_bits;
                /* Max extended CPUID function supported: */
@@@@@@@@@@@ -248,6 -248,6 -248,6 -248,6 -248,6 -248,6 -248,6 -248,6 -248,6 -247,7 +248,6 @@@@@@@@@@@ struct x86_hw_tss 
          #define IO_BITMAP_LONGS                       (IO_BITMAP_BYTES/sizeof(long))
          #define IO_BITMAP_OFFSET              offsetof(struct tss_struct, io_bitmap)
          #define INVALID_IO_BITMAP_OFFSET      0x8000
         -#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
          
          struct tss_struct {
                /*
                 * be within the limit.
                 */
                unsigned long           io_bitmap[IO_BITMAP_LONGS + 1];
         -      /*
         -       * Cache the current maximum and the last task that used the bitmap:
         -       */
         -      unsigned long           io_bitmap_max;
         -      struct thread_struct    *io_bitmap_owner;
          
                /*
                 * .. and then another 0x100 bytes for the emergency kernel stack:
@@@@@@@@@@@ -373,30 -373,30 -373,30 -373,33 -373,30 -373,30 -373,30 -373,30 -373,30 -378,9 +373,33 @@@@@@@@@@@ union thread_xstate 
          
          #ifdef CONFIG_X86_64
          DECLARE_PER_CPU(struct orig_ist, orig_ist);
         +
         +union irq_stack_union {
         +      char irq_stack[IRQ_STACK_SIZE];
         +      /*
         +       * GCC hardcodes the stack canary as %gs:40.  Since the
         +       * irq_stack is the object at %gs:0, we reserve the bottom
         +       * 48 bytes of the irq stack for the canary.
         +       */
         +      struct {
         +              char gs_base[40];
         +              unsigned long stack_canary;
         +      };
         +};
         +
         +DECLARE_PER_CPU(union irq_stack_union, irq_stack_union);
         +DECLARE_INIT_PER_CPU(irq_stack_union);
         +
         +DECLARE_PER_CPU(char *, irq_stack_ptr);
+++ ++++++DECLARE_PER_CPU(unsigned int, irq_count);
+++ ++++++extern unsigned long kernel_eflags;
+++ ++++++extern asmlinkage void ignore_sysret(void);
         +#else /* X86_64 */
         +#ifdef CONFIG_CC_STACKPROTECTOR
         +DECLARE_PER_CPU(unsigned long, stack_canary);
          #endif
         +#endif        /* X86_64 */
          
         -extern void print_cpu_info(struct cpuinfo_x86 *);
          extern unsigned int xstate_size;
          extern void free_thread_xstate(struct task_struct *);
          extern struct kmem_cache *task_xstate_cachep;
@@@@@@@@@@@ -768,9 -768,9 -768,9 -771,9 -768,9 -768,9 -768,9 -768,9 -768,9 -752,9 +771,9 @@@@@@@@@@@ extern int sysenter_setup(void)
          extern struct desc_ptr                early_gdt_descr;
          
          extern void cpu_set_gdt(int);
         -extern void switch_to_new_gdt(void);
         +extern void switch_to_new_gdt(int);
         +extern void load_percpu_segment(int);
          extern void cpu_init(void);
         -extern void init_gdt(int cpu);
          
          static inline unsigned long get_debugctlmsr(void)
          {
@@@@@@@@@@@ -855,7 -855,7 -855,7 -858,7 -855,7 -855,7 -855,7 -855,7 -855,7 -839,6 +858,7 @@@@@@@@@@@ static inline void spin_lock_prefetch(c
           * User space process size: 3GB (default).
           */
          #define TASK_SIZE             PAGE_OFFSET
         +#define TASK_SIZE_MAX         TASK_SIZE
          #define STACK_TOP             TASK_SIZE
          #define STACK_TOP_MAX         STACK_TOP
          
@@@@@@@@@@@ -915,7 -915,7 -915,7 -918,7 -915,7 -915,7 -915,7 -915,7 -915,7 -898,7 +918,7 @@@@@@@@@@@ extern unsigned long thread_saved_pc(st
          /*
           * User space process size. 47bits minus one guard page.
           */
         -#define TASK_SIZE64   ((1UL << 47) - PAGE_SIZE)
         +#define TASK_SIZE_MAX ((1UL << 47) - PAGE_SIZE)
          
          /* This decides where the kernel will search for a free chunk of vm
           * space during mmap's.
                                                0xc0000000 : 0xFFFFe000)
          
          #define TASK_SIZE             (test_thread_flag(TIF_IA32) ? \
         -                                      IA32_PAGE_OFFSET : TASK_SIZE64)
         +                                      IA32_PAGE_OFFSET : TASK_SIZE_MAX)
          #define TASK_SIZE_OF(child)   ((test_tsk_thread_flag(child, TIF_IA32)) ? \
         -                                      IA32_PAGE_OFFSET : TASK_SIZE64)
         +                                      IA32_PAGE_OFFSET : TASK_SIZE_MAX)
          
          #define STACK_TOP             TASK_SIZE
         -#define STACK_TOP_MAX         TASK_SIZE64
         +#define STACK_TOP_MAX         TASK_SIZE_MAX
          
          #define INIT_THREAD  { \
                .sp0 = (unsigned long)&init_stack + sizeof(init_stack) \
index f8869978bbb70eefca7021d83fa226f1f9da7915,826d5c87627826911ac393f215c0cecb03f50ef9,f8869978bbb70eefca7021d83fa226f1f9da7915,a9e3791ca098ce14d20df01548d9a8cec3cc0ef9,54cbe7690f93939e0025464ccfe12c658521b0e5,f8869978bbb70eefca7021d83fa226f1f9da7915,a95e9480bb9c9b3a17e7c2100d4c5be82c57b396,f8869978bbb70eefca7021d83fa226f1f9da7915,826d5c87627826911ac393f215c0cecb03f50ef9,83492b1f93b11c5e0b851300ffdb3e314eaacc9e..e2962cc1e27b742965f6af45a8cfdcf9b4c1a0b8
--- ------#include <linux/init.h>
--- ------#include <linux/kernel.h>
--- ------#include <linux/sched.h>
--- ------#include <linux/string.h>
          #include <linux/bootmem.h>
+++ ++++++#include <linux/linkage.h>
          #include <linux/bitops.h>
+++ ++++++#include <linux/kernel.h>
          #include <linux/module.h>
--- ------#include <linux/kgdb.h>
--- ------#include <linux/topology.h>
+++ ++++++#include <linux/percpu.h>
+++ ++++++#include <linux/string.h>
          #include <linux/delay.h>
+++ ++++++#include <linux/sched.h>
+++ ++++++#include <linux/init.h>
+++ ++++++#include <linux/kgdb.h>
          #include <linux/smp.h>
--- ------#include <linux/percpu.h>
--- ------#include <asm/i387.h>
--- ------#include <asm/msr.h>
--- ------#include <asm/io.h>
--- ------#include <asm/linkage.h>
+++ ++++++#include <linux/io.h>
+++ ++++++
+++ ++++++#include <asm/stackprotector.h>
          #include <asm/mmu_context.h>
+++ ++++++#include <asm/hypervisor.h>
+++ ++++++#include <asm/processor.h>
+++ ++++++#include <asm/sections.h>
+++ ++++++#include <asm/topology.h>
+++ ++++++#include <asm/cpumask.h>
+++ ++++++#include <asm/pgtable.h>
+++ ++++++#include <asm/atomic.h>
+++ ++++++#include <asm/proto.h>
+++ ++++++#include <asm/setup.h>
+++ ++++++#include <asm/apic.h>
+++ ++++++#include <asm/desc.h>
+++ ++++++#include <asm/i387.h>
          #include <asm/mtrr.h>
+++ ++++++#include <asm/numa.h>
+++ ++++++#include <asm/asm.h>
+++ ++++++#include <asm/cpu.h>
          #include <asm/mce.h>
+++ ++++++#include <asm/msr.h>
          #include <asm/pat.h>
--- ------#include <asm/asm.h>
--- ------#include <asm/numa.h>
          #include <asm/smp.h>
--- ----- #include <asm/cpu.h>
--- ----- #include <asm/cpumask.h>
--- ----- #include <asm/apic.h>
         +
          #ifdef CONFIG_X86_LOCAL_APIC
         -#include <asm/mpspec.h>
         -#include <asm/apic.h>
         -#include <mach_apic.h>
         -#include <asm/genapic.h>
         +#include <asm/uv/uv.h>
          #endif
          
         -#include <asm/pda.h>
--- ------#include <asm/pgtable.h>
--- ------#include <asm/processor.h>
--- ------#include <asm/desc.h>
--- ------#include <asm/atomic.h>
--- ------#include <asm/proto.h>
--- ------#include <asm/sections.h>
--- ------#include <asm/setup.h>
--- ------#include <asm/hypervisor.h>
--- ----- #include <asm/stackprotector.h>
--- ------
          #include "cpu.h"
          
          #ifdef CONFIG_X86_64
          
          /* all of these masks are initialized in setup_cpu_local_masks() */
--- ------cpumask_var_t cpu_callin_mask;
--- ------cpumask_var_t cpu_callout_mask;
          cpumask_var_t cpu_initialized_mask;
+++ ++++++cpumask_var_t cpu_callout_mask;
+++ ++++++cpumask_var_t cpu_callin_mask;
          
          /* representing cpus for which sibling maps can be computed */
          cpumask_var_t cpu_sibling_setup_mask;
          
         +/* correctly size the local cpu masks */
         +void __init setup_cpu_local_masks(void)
         +{
         +      alloc_bootmem_cpumask_var(&cpu_initialized_mask);
         +      alloc_bootmem_cpumask_var(&cpu_callin_mask);
         +      alloc_bootmem_cpumask_var(&cpu_callout_mask);
         +      alloc_bootmem_cpumask_var(&cpu_sibling_setup_mask);
         +}
         +
          #else /* CONFIG_X86_32 */
          
--- ------cpumask_t cpu_callin_map;
+++ ++++++cpumask_t cpu_sibling_setup_map;
          cpumask_t cpu_callout_map;
          cpumask_t cpu_initialized;
--- ------cpumask_t cpu_sibling_setup_map;
+++ ++++++cpumask_t cpu_callin_map;
          
          #endif /* CONFIG_X86_32 */
          
          
---- -----static struct cpu_dev *this_cpu __cpuinitdata;
++++ +++++static const struct cpu_dev *this_cpu __cpuinitdata;
          
         +DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = {
          #ifdef CONFIG_X86_64
         -/* We need valid kernel segments for data and code in long mode too
         - * IRET will check the segment types  kkeil 2000/10/28
         - * Also sysret mandates a special GDT layout
         - */
         -/* The TLS descriptors are currently at a different place compared to i386.
         -   Hopefully nobody expects them at a fixed place (Wine?) */
         -DEFINE_PER_CPU(struct gdt_page, gdt_page) = { .gdt = {
         -      [GDT_ENTRY_KERNEL32_CS] = { { { 0x0000ffff, 0x00cf9b00 } } },
         -      [GDT_ENTRY_KERNEL_CS] = { { { 0x0000ffff, 0x00af9b00 } } },
         -      [GDT_ENTRY_KERNEL_DS] = { { { 0x0000ffff, 0x00cf9300 } } },
         -      [GDT_ENTRY_DEFAULT_USER32_CS] = { { { 0x0000ffff, 0x00cffb00 } } },
         -      [GDT_ENTRY_DEFAULT_USER_DS] = { { { 0x0000ffff, 0x00cff300 } } },
         -      [GDT_ENTRY_DEFAULT_USER_CS] = { { { 0x0000ffff, 0x00affb00 } } },
         -} };
         +      /*
         +       * We need valid kernel segments for data and code in long mode too
         +       * IRET will check the segment types  kkeil 2000/10/28
         +       * Also sysret mandates a special GDT layout
         +       *
--- -----        * The TLS descriptors are currently at a different place compared to i386.
+++ ++++++       * TLS descriptors are currently at a different place compared to i386.
         +       * Hopefully nobody expects them at a fixed place (Wine?)
         +       */
--- -----       [GDT_ENTRY_KERNEL32_CS] = { { { 0x0000ffff, 0x00cf9b00 } } },
--- -----       [GDT_ENTRY_KERNEL_CS] = { { { 0x0000ffff, 0x00af9b00 } } },
--- -----       [GDT_ENTRY_KERNEL_DS] = { { { 0x0000ffff, 0x00cf9300 } } },
--- -----       [GDT_ENTRY_DEFAULT_USER32_CS] = { { { 0x0000ffff, 0x00cffb00 } } },
--- -----       [GDT_ENTRY_DEFAULT_USER_DS] = { { { 0x0000ffff, 0x00cff300 } } },
--- -----       [GDT_ENTRY_DEFAULT_USER_CS] = { { { 0x0000ffff, 0x00affb00 } } },
+++ ++++++      [GDT_ENTRY_KERNEL32_CS]         = { { { 0x0000ffff, 0x00cf9b00 } } },
+++ ++++++      [GDT_ENTRY_KERNEL_CS]           = { { { 0x0000ffff, 0x00af9b00 } } },
+++ ++++++      [GDT_ENTRY_KERNEL_DS]           = { { { 0x0000ffff, 0x00cf9300 } } },
+++ ++++++      [GDT_ENTRY_DEFAULT_USER32_CS]   = { { { 0x0000ffff, 0x00cffb00 } } },
+++ ++++++      [GDT_ENTRY_DEFAULT_USER_DS]     = { { { 0x0000ffff, 0x00cff300 } } },
+++ ++++++      [GDT_ENTRY_DEFAULT_USER_CS]     = { { { 0x0000ffff, 0x00affb00 } } },
          #else
         -DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = {
--- ------      [GDT_ENTRY_KERNEL_CS] = { { { 0x0000ffff, 0x00cf9a00 } } },
--- ------      [GDT_ENTRY_KERNEL_DS] = { { { 0x0000ffff, 0x00cf9200 } } },
--- ------      [GDT_ENTRY_DEFAULT_USER_CS] = { { { 0x0000ffff, 0x00cffa00 } } },
--- ------      [GDT_ENTRY_DEFAULT_USER_DS] = { { { 0x0000ffff, 0x00cff200 } } },
+++ ++++++      [GDT_ENTRY_KERNEL_CS]           = { { { 0x0000ffff, 0x00cf9a00 } } },
+++ ++++++      [GDT_ENTRY_KERNEL_DS]           = { { { 0x0000ffff, 0x00cf9200 } } },
+++ ++++++      [GDT_ENTRY_DEFAULT_USER_CS]     = { { { 0x0000ffff, 0x00cffa00 } } },
+++ ++++++      [GDT_ENTRY_DEFAULT_USER_DS]     = { { { 0x0000ffff, 0x00cff200 } } },
                /*
                 * Segments used for calling PnP BIOS have byte granularity.
                 * They code segments and data segments have fixed 64k limits,
                 * the transfer segment sizes are set at run time.
                 */
                /* 32-bit code */
--- ------      [GDT_ENTRY_PNPBIOS_CS32] = { { { 0x0000ffff, 0x00409a00 } } },
+++ ++++++      [GDT_ENTRY_PNPBIOS_CS32]        = { { { 0x0000ffff, 0x00409a00 } } },
                /* 16-bit code */
--- ------      [GDT_ENTRY_PNPBIOS_CS16] = { { { 0x0000ffff, 0x00009a00 } } },
+++ ++++++      [GDT_ENTRY_PNPBIOS_CS16]        = { { { 0x0000ffff, 0x00009a00 } } },
                /* 16-bit data */
--- ------      [GDT_ENTRY_PNPBIOS_DS] = { { { 0x0000ffff, 0x00009200 } } },
+++ ++++++      [GDT_ENTRY_PNPBIOS_DS]          = { { { 0x0000ffff, 0x00009200 } } },
                /* 16-bit data */
--- ------      [GDT_ENTRY_PNPBIOS_TS1] = { { { 0x00000000, 0x00009200 } } },
+++ ++++++      [GDT_ENTRY_PNPBIOS_TS1]         = { { { 0x00000000, 0x00009200 } } },
                /* 16-bit data */
--- ------      [GDT_ENTRY_PNPBIOS_TS2] = { { { 0x00000000, 0x00009200 } } },
+++ ++++++      [GDT_ENTRY_PNPBIOS_TS2]         = { { { 0x00000000, 0x00009200 } } },
                /*
                 * The APM segments have byte granularity and their bases
                 * are set at run time.  All have 64k limits.
                 */
                /* 32-bit code */
--- ------      [GDT_ENTRY_APMBIOS_BASE] = { { { 0x0000ffff, 0x00409a00 } } },
+++ ++++++      [GDT_ENTRY_APMBIOS_BASE]        = { { { 0x0000ffff, 0x00409a00 } } },
                /* 16-bit code */
--- ------      [GDT_ENTRY_APMBIOS_BASE+1] = { { { 0x0000ffff, 0x00009a00 } } },
+++ ++++++      [GDT_ENTRY_APMBIOS_BASE+1]      = { { { 0x0000ffff, 0x00009a00 } } },
                /* data */
--- ------      [GDT_ENTRY_APMBIOS_BASE+2] = { { { 0x0000ffff, 0x00409200 } } },
+++ ++++++      [GDT_ENTRY_APMBIOS_BASE+2]      = { { { 0x0000ffff, 0x00409200 } } },
          
--- ------      [GDT_ENTRY_ESPFIX_SS] = { { { 0x00000000, 0x00c09200 } } },
--- -----       [GDT_ENTRY_PERCPU] = { { { 0x0000ffff, 0x00cf9200 } } },
         -      [GDT_ENTRY_PERCPU] = { { { 0x00000000, 0x00000000 } } },
         -} };
+++ ++++++      [GDT_ENTRY_ESPFIX_SS]           = { { { 0x00000000, 0x00c09200 } } },
+++ ++++++      [GDT_ENTRY_PERCPU]              = { { { 0x0000ffff, 0x00cf9200 } } },
         +      GDT_STACK_CANARY_INIT
          #endif
         +} };
          EXPORT_PER_CPU_SYMBOL_GPL(gdt_page);
          
          #ifdef CONFIG_X86_32
@@@@@@@@@@@ -164,16 -164,16 -164,16 -164,17 -164,16 -164,16 -164,16 -164,16 -164,16 -153,16 +164,17 @@@@@@@@@@@ static inline int flag_is_changeable_p(
                 * the CPUID. Add "volatile" to not allow gcc to
                 * optimize the subsequent calls to this function.
                 */
--- ------      asm volatile ("pushfl\n\t"
--- ------                    "pushfl\n\t"
--- ------                    "popl %0\n\t"
--- ------                    "movl %0,%1\n\t"
--- ------                    "xorl %2,%0\n\t"
--- ------                    "pushl %0\n\t"
--- ------                    "popfl\n\t"
--- ------                    "pushfl\n\t"
--- ------                    "popl %0\n\t"
--- ------                    "popfl\n\t"
+++ ++++++      asm volatile ("pushfl           \n\t"
+++ ++++++                    "pushfl           \n\t"
+++ ++++++                    "popl %0          \n\t"
+++ ++++++                    "movl %0, %1      \n\t"
+++ ++++++                    "xorl %2, %0      \n\t"
+++ ++++++                    "pushl %0         \n\t"
+++ ++++++                    "popfl            \n\t"
+++ ++++++                    "pushfl           \n\t"
+++ ++++++                    "popl %0          \n\t"
+++ ++++++                    "popfl            \n\t"
+++ ++++++
                              : "=&r" (f1), "=&r" (f2)
                              : "ir" (flag));
          
@@@@@@@@@@@ -188,18 -188,18 -188,18 -189,22 -188,18 -188,18 -188,18 -188,18 -188,18 -177,18 +189,22 @@@@@@@@@@@ static int __cpuinit have_cpuid_p(void
          
          static void __cpuinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
          {
--- ------      if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr) {
--- ------              /* Disable processor serial number */
--- ------              unsigned long lo, hi;
--- ------              rdmsr(MSR_IA32_BBL_CR_CTL, lo, hi);
--- ------              lo |= 0x200000;
--- ------              wrmsr(MSR_IA32_BBL_CR_CTL, lo, hi);
--- ------              printk(KERN_NOTICE "CPU serial number disabled.\n");
--- ------              clear_cpu_cap(c, X86_FEATURE_PN);
--- ------
--- ------              /* Disabling the serial number may affect the cpuid level */
--- ------              c->cpuid_level = cpuid_eax(0);
--- ------      }
+++ ++++++      unsigned long lo, hi;
+++ ++++++
+++ ++++++      if (!cpu_has(c, X86_FEATURE_PN) || !disable_x86_serial_nr)
+++ ++++++              return;
+++ ++++++
+++ ++++++      /* Disable processor serial number: */
+++ ++++++
+++ ++++++      rdmsr(MSR_IA32_BBL_CR_CTL, lo, hi);
+++ ++++++      lo |= 0x200000;
+++ ++++++      wrmsr(MSR_IA32_BBL_CR_CTL, lo, hi);
+++ ++++++
+++ ++++++      printk(KERN_NOTICE "CPU serial number disabled.\n");
+++ ++++++      clear_cpu_cap(c, X86_FEATURE_PN);
+++ ++++++
+++ ++++++      /* Disabling the serial number may affect the cpuid level */
+++ ++++++      c->cpuid_level = cpuid_eax(0);
          }
          
          static int __init x86_serial_nr_setup(char *s)
@@@@@@@@@@@ -223,60 -223,60 -223,60 -228,65 -223,60 -223,60 -223,60 -223,60 -223,60 -212,17 +228,65 @@@@@@@@@@@ static inline void squash_the_stupid_se
          }
          #endif
          
--- -----               if (cpu_has(c, df->feature) &&
--- -----                   ((s32)df->level < 0 ?
         +/*
         + * Some CPU features depend on higher CPUID levels, which may not always
         + * be available due to CPUID level capping or broken virtualization
         + * software.  Add those features to this table to auto-disable them.
         + */
         +struct cpuid_dependent_feature {
         +      u32 feature;
         +      u32 level;
         +};
+++ ++++++
         +static const struct cpuid_dependent_feature __cpuinitconst
         +cpuid_dependent_features[] = {
         +      { X86_FEATURE_MWAIT,            0x00000005 },
         +      { X86_FEATURE_DCA,              0x00000009 },
         +      { X86_FEATURE_XSAVE,            0x0000000d },
         +      { 0, 0 }
         +};
         +
         +static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn)
         +{
         +      const struct cpuid_dependent_feature *df;
+++ ++++++
         +      for (df = cpuid_dependent_features; df->feature; df++) {
+++ ++++++
+++ ++++++              if (!cpu_has(c, df->feature))
+++ ++++++                      continue;
         +              /*
         +               * Note: cpuid_level is set to -1 if unavailable, but
         +               * extended_extended_level is set to 0 if unavailable
         +               * and the legitimate extended levels are all negative
         +               * when signed; hence the weird messing around with
         +               * signs here...
         +               */
--- -----                    (s32)df->level > (s32)c->cpuid_level)) {
--- -----                       clear_cpu_cap(c, df->feature);
--- -----                       if (warn)
--- -----                               printk(KERN_WARNING
--- -----                                      "CPU: CPU feature %s disabled "
--- -----                                      "due to lack of CPUID level 0x%x\n",
--- -----                                      x86_cap_flags[df->feature],
--- -----                                      df->level);
--- -----               }
+++ ++++++              if (!((s32)df->level < 0 ?
         +                   (u32)df->level > (u32)c->extended_cpuid_level :
+++ ++++++                   (s32)df->level > (s32)c->cpuid_level))
+++ ++++++                      continue;
+++ ++++++
+++ ++++++              clear_cpu_cap(c, df->feature);
+++ ++++++              if (!warn)
+++ ++++++                      continue;
+++ ++++++
+++ ++++++              printk(KERN_WARNING
+++ ++++++                     "CPU: CPU feature %s disabled, no CPUID level 0x%x\n",
+++ ++++++                              x86_cap_flags[df->feature], df->level);
         +      }
         +}
         +
          /*
           * Naming convention should be: <Name> [(<Codename>)]
           * This table only is used unless init_<vendor>() below doesn't set it;
--- ------ * in particular, if CPUID levels 0x80000002..4 are supported, this isn't used
--- ------ *
+++ ++++++ * in particular, if CPUID levels 0x80000002..4 are supported, this
+++ ++++++ * isn't used
           */
          
          /* Look up CPU names by table lookup. */
---- -----static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c)
++++ +++++static const char *__cpuinit table_lookup_model(struct cpuinfo_x86 *c)
          {
---- -----      struct cpu_model_info *info;
++++ +++++      const struct cpu_model_info *info;
          
                if (c->x86_model >= 16)
                        return NULL;    /* Range check */
          
          __u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata;
          
         -/* Current gdt points %fs at the "master" per-cpu area: after this,
         - * it's on the real one. */
         -void switch_to_new_gdt(void)
         +void load_percpu_segment(int cpu)
         +{
         +#ifdef CONFIG_X86_32
         +      loadsegment(fs, __KERNEL_PERCPU);
         +#else
         +      loadsegment(gs, 0);
         +      wrmsrl(MSR_GS_BASE, (unsigned long)per_cpu(irq_stack_union.gs_base, cpu));
         +#endif
         +      load_stack_canary_segment();
         +}
         +
--- ----- /* Current gdt points %fs at the "master" per-cpu area: after this,
--- -----  * it's on the real one. */
+++ ++++++/*
+++ ++++++ * Current gdt points %fs at the "master" per-cpu area: after this,
+++ ++++++ * it's on the real one.
+++ ++++++ */
         +void switch_to_new_gdt(int cpu)
          {
                struct desc_ptr gdt_descr;
          
         -      gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id());
         +      gdt_descr.address = (long)get_cpu_gdt_table(cpu);
                gdt_descr.size = GDT_SIZE - 1;
                load_gdt(&gdt_descr);
         -#ifdef CONFIG_X86_32
         -      asm("mov %0, %%fs" : : "r" (__KERNEL_PERCPU) : "memory");
         -#endif
         +      /* Reload the per-cpu base */
         +
         +      load_percpu_segment(cpu);
          }
          
---- -----static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
++++ +++++static const struct cpu_dev *__cpuinitdata cpu_devs[X86_VENDOR_NUM] = {};
          
          static void __cpuinit default_init(struct cpuinfo_x86 *c)
          {
          #endif
          }
          
---- -----static struct cpu_dev __cpuinitdata default_cpu = {
++++ +++++static const struct cpu_dev __cpuinitconst default_cpu = {
                .c_init = default_init,
                .c_vendor = "Unknown",
                .c_x86_vendor = X86_VENDOR_UNKNOWN,
@@@@@@@@@@@ -354,22 -354,22 -354,22 -366,24 -354,22 -354,22 -354,22 -354,22 -354,22 -289,22 +366,24 @@@@@@@@@@@ static void __cpuinit get_model_name(st
                if (c->extended_cpuid_level < 0x80000004)
                        return;
          
--- ------      v = (unsigned int *) c->x86_model_id;
+++ ++++++      v = (unsigned int *)c->x86_model_id;
                cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
                cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
                cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
                c->x86_model_id[48] = 0;
          
--- ------      /* Intel chips right-justify this string for some dumb reason;
--- ------         undo that brain damage */
+++ ++++++      /*
+++ ++++++       * Intel chips right-justify this string for some dumb reason;
+++ ++++++       * undo that brain damage:
+++ ++++++       */
                p = q = &c->x86_model_id[0];
                while (*p == ' ')
--- ------           p++;
+++ ++++++              p++;
                if (p != q) {
--- ------           while (*p)
--- ------                *q++ = *p++;
--- ------           while (q <= &c->x86_model_id[48])
--- ------                *q++ = '\0';  /* Zero-pad the rest */
+++ ++++++              while (*p)
+++ ++++++                      *q++ = *p++;
+++ ++++++              while (q <= &c->x86_model_id[48])
+++ ++++++                      *q++ = '\0';    /* Zero-pad the rest */
                }
          }
          
@@@@@@@@@@@ -438,27 -438,27 -438,27 -452,30 -438,27 -438,27 -438,27 -438,27 -438,27 -373,36 +452,30 @@@@@@@@@@@ void __cpuinit detect_ht(struct cpuinfo
          
                if (smp_num_siblings == 1) {
                        printk(KERN_INFO  "CPU: Hyper-Threading is disabled\n");
--- ------      } else if (smp_num_siblings > 1) {
+++ ++++++              goto out;
+++ ++++++      }
          
--- ------              if (smp_num_siblings > nr_cpu_ids) {
--- ------                      printk(KERN_WARNING "CPU: Unsupported number of siblings %d",
--- ------                                      smp_num_siblings);
--- ------                      smp_num_siblings = 1;
--- ------                      return;
--- ------              }
+++ ++++++      if (smp_num_siblings <= 1)
+++ ++++++              goto out;
+++ +++++ 
         -              index_msb = get_count_order(smp_num_siblings);
         -#ifdef CONFIG_X86_64
         -              c->phys_proc_id = phys_pkg_id(index_msb);
         -#else
         -              c->phys_proc_id = phys_pkg_id(c->initial_apicid, index_msb);
         -#endif
+++ ++++++      if (smp_num_siblings > nr_cpu_ids) {
+++ ++++++              pr_warning("CPU: Unsupported number of siblings %d",
+++ ++++++                         smp_num_siblings);
+++ ++++++              smp_num_siblings = 1;
+++ ++++++              return;
+++ ++++++      }
          
--- -----               index_msb = get_count_order(smp_num_siblings);
--- -----               c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, index_msb);
         -              smp_num_siblings = smp_num_siblings / c->x86_max_cores;
+++ ++++++      index_msb = get_count_order(smp_num_siblings);
+++ ++++++      c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, index_msb);
          
--- -----               smp_num_siblings = smp_num_siblings / c->x86_max_cores;
         -              index_msb = get_count_order(smp_num_siblings);
+++ ++++++      smp_num_siblings = smp_num_siblings / c->x86_max_cores;
          
--- -----               index_msb = get_count_order(smp_num_siblings);
         -              core_bits = get_count_order(c->x86_max_cores);
+++ ++++++      index_msb = get_count_order(smp_num_siblings);
          
--- -----               core_bits = get_count_order(c->x86_max_cores);
         -#ifdef CONFIG_X86_64
         -              c->cpu_core_id = phys_pkg_id(index_msb) &
         -                                             ((1 << core_bits) - 1);
         -#else
         -              c->cpu_core_id = phys_pkg_id(c->initial_apicid, index_msb) &
         -                                             ((1 << core_bits) - 1);
         -#endif
         -      }
+++ ++++++      core_bits = get_count_order(c->x86_max_cores);
         +
--- -----               c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, index_msb) &
--- -----                                              ((1 << core_bits) - 1);
--- -----       }
+++ ++++++      c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, index_msb) &
+++ ++++++                                     ((1 << core_bits) - 1);
          
          out:
                if ((c->x86_max_cores * smp_num_siblings) > 1) {
          static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
          {
                char *v = c->x86_vendor_id;
--- ------      int i;
                static int printed;
+++ ++++++      int i;
          
                for (i = 0; i < X86_VENDOR_NUM; i++) {
                        if (!cpu_devs[i])
                        if (!strcmp(v, cpu_devs[i]->c_ident[0]) ||
                            (cpu_devs[i]->c_ident[1] &&
                             !strcmp(v, cpu_devs[i]->c_ident[1]))) {
+++ ++++++
                                this_cpu = cpu_devs[i];
                                c->x86_vendor = this_cpu->c_x86_vendor;
                                return;
          
                if (!printed) {
                        printed++;
--- ------              printk(KERN_ERR "CPU: vendor_id '%s' unknown, using generic init.\n", v);
+++ ++++++              printk(KERN_ERR
+++ ++++++                  "CPU: vendor_id '%s' unknown, using generic init.\n", v);
+++ ++++++
                        printk(KERN_ERR "CPU: Your system may be unstable.\n");
                }
          
@@@@@@@@@@@ -511,14 -511,14 -511,14 -531,17 -511,14 -511,14 -511,14 -511,14 -511,14 -455,14 +531,17 @@@@@@@@@@@ void __cpuinit cpu_detect(struct cpuinf
                /* Intel-defined flags: level 0x00000001 */
                if (c->cpuid_level >= 0x00000001) {
                        u32 junk, tfms, cap0, misc;
+++ ++++++
                        cpuid(0x00000001, &tfms, &misc, &junk, &cap0);
                        c->x86 = (tfms >> 8) & 0xf;
                        c->x86_model = (tfms >> 4) & 0xf;
                        c->x86_mask = tfms & 0xf;
+++ ++++++
                        if (c->x86 == 0xf)
                                c->x86 += (tfms >> 20) & 0xff;
                        if (c->x86 >= 0x6)
                                c->x86_model += ((tfms >> 16) & 0xf) << 4;
+++ ++++++
                        if (cap0 & (1<<19)) {
                                c->x86_clflush_size = ((misc >> 8) & 0xff) * 8;
                                c->x86_cache_alignment = c->x86_clflush_size;
@@@@@@@@@@@ -534,6 -534,6 -534,6 -557,7 -534,6 -534,6 -534,6 -534,6 -534,6 -478,6 +557,7 @@@@@@@@@@@ static void __cpuinit get_cpu_cap(struc
                /* Intel-defined flags: level 0x00000001 */
                if (c->cpuid_level >= 0x00000001) {
                        u32 capability, excap;
+++ ++++++
                        cpuid(0x00000001, &tfms, &ebx, &excap, &capability);
                        c->x86_capability[0] = capability;
                        c->x86_capability[4] = excap;
                /* AMD-defined flags: level 0x80000001 */
                xlvl = cpuid_eax(0x80000000);
                c->extended_cpuid_level = xlvl;
+++ ++++++
                if ((xlvl & 0xffff0000) == 0x80000000) {
                        if (xlvl >= 0x80000001) {
                                c->x86_capability[1] = cpuid_edx(0x80000001);
                        }
                }
          
------ ---#ifdef CONFIG_X86_64
                if (c->extended_cpuid_level >= 0x80000008) {
                        u32 eax = cpuid_eax(0x80000008);
          
                        c->x86_virt_bits = (eax >> 8) & 0xff;
                        c->x86_phys_bits = eax & 0xff;
                }
++++++ +++#ifdef CONFIG_X86_32
++++++ +++      else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))
++++++ +++              c->x86_phys_bits = 36;
          #endif
          
                if (c->extended_cpuid_level >= 0x80000007)
@@@@@@@@@@@ -602,8 -602,8 -602,8 -627,8 -602,8 -602,8 -604,12 -602,8 -602,8 -546,8 +629,12 @@@@@@@@@@@ static void __init early_identify_cpu(s
          {
          #ifdef CONFIG_X86_64
                c->x86_clflush_size = 64;
++++++ +++      c->x86_phys_bits = 36;
++++++ +++      c->x86_virt_bits = 48;
          #else
                c->x86_clflush_size = 32;
++++++ +++      c->x86_phys_bits = 32;
++++++ +++      c->x86_virt_bits = 32;
          #endif
                c->x86_cache_alignment = c->x86_clflush_size;
          
                if (this_cpu->c_early_init)
                        this_cpu->c_early_init(c);
          
         -      validate_pat_support(c);
         -
          #ifdef CONFIG_SMP
                c->cpu_index = boot_cpu_id;
          #endif
         +      filter_cpuid_features(c, false);
          }
          
          void __init early_cpu_init(void)
          {
---- -----      struct cpu_dev **cdev;
++++ +++++      const struct cpu_dev *const *cdev;
                int count = 0;
          
--- ------      printk("KERNEL supported cpus:\n");
+++ ++++++      printk(KERN_INFO "KERNEL supported cpus:\n");
                for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
---- -----              struct cpu_dev *cpudev = *cdev;
++++ +++++              const struct cpu_dev *cpudev = *cdev;
                        unsigned int j;
          
                        if (count >= X86_VENDOR_NUM)
                        for (j = 0; j < 2; j++) {
                                if (!cpudev->c_ident[j])
                                        continue;
--- ------                      printk("  %s %s\n", cpudev->c_vendor,
+++ ++++++                      printk(KERN_INFO "  %s %s\n", cpudev->c_vendor,
                                        cpudev->c_ident[j]);
                        }
                }
@@@@@@@@@@@ -692,7 -692,7 -692,7 -717,7 -692,7 -692,7 -698,7 -692,7 -692,7 -637,7 +723,7 @@@@@@@@@@@ static void __cpuinit generic_identify(
                        c->initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF;
          #ifdef CONFIG_X86_32
          # ifdef CONFIG_X86_HT
         -              c->apicid = phys_pkg_id(c->initial_apicid, 0);
         +              c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
          # else
                        c->apicid = c->initial_apicid;
          # endif
@@@@@@@@@@@ -726,9 -726,9 -726,9 -751,9 -726,9 -726,9 -732,13 -726,9 -726,9 -671,9 +757,13 @@@@@@@@@@@ static void __cpuinit identify_cpu(stru
                c->x86_coreid_bits = 0;
          #ifdef CONFIG_X86_64
                c->x86_clflush_size = 64;
++++++ +++      c->x86_phys_bits = 36;
++++++ +++      c->x86_virt_bits = 48;
          #else
                c->cpuid_level = -1;    /* CPUID not detected */
                c->x86_clflush_size = 32;
++++++ +++      c->x86_phys_bits = 32;
++++++ +++      c->x86_virt_bits = 32;
          #endif
                c->x86_cache_alignment = c->x86_clflush_size;
                memset(&c->x86_capability, 0, sizeof c->x86_capability);
                        this_cpu->c_identify(c);
          
          #ifdef CONFIG_X86_64
         -      c->apicid = phys_pkg_id(0);
         +      c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
          #endif
          
                /*
                squash_the_stupid_serial_number(c);
          
                /*
--- ------       * The vendor-specific functions might have changed features.  Now
--- ------       * we do "generic changes."
+++ ++++++       * The vendor-specific functions might have changed features.
+++ ++++++       * Now we do "generic changes."
                 */
          
         +      /* Filter out anything that depends on CPUID levels we don't have */
         +      filter_cpuid_features(c, true);
         +
                /* If the model name is still unset, do table lookup. */
                if (!c->x86_model_id[0]) {
---- -----              char *p;
++++ +++++              const char *p;
                        p = table_lookup_model(c);
                        if (p)
                                strcpy(c->x86_model_id, p);
@@@@@@@@@@@ -843,11 -843,11 -843,11 -868,11 -843,11 -843,11 -853,11 -843,11 -843,11 -785,11 +878,11 @@@@@@@@@@@ void __cpuinit identify_secondary_cpu(s
          }
          
          struct msr_range {
--- ------      unsigned min;
--- ------      unsigned max;
+++ ++++++      unsigned        min;
+++ ++++++      unsigned        max;
          };
          
---- -----static struct msr_range msr_range_array[] __cpuinitdata = {
++++ +++++static const struct msr_range msr_range_array[] __cpuinitconst = {
                { 0x00000000, 0x00000418},
                { 0xc0000000, 0xc000040b},
                { 0xc0010000, 0xc0010142},
          
          static void __cpuinit print_cpu_msr(void)
          {
+++ ++++++      unsigned index_min, index_max;
                unsigned index;
                u64 val;
                int i;
--- ------      unsigned index_min, index_max;
          
                for (i = 0; i < ARRAY_SIZE(msr_range_array); i++) {
                        index_min = msr_range_array[i].min;
                        index_max = msr_range_array[i].max;
+++ ++++++
                        for (index = index_min; index < index_max; index++) {
                                if (rdmsrl_amd_safe(index, &val))
                                        continue;
          }
          
          static int show_msr __cpuinitdata;
+++ ++++++
          static __init int setup_show_msr(char *arg)
          {
                int num;
@@@@@@@@@@@ -894,12 -894,12 -894,12 -921,14 -894,12 -894,12 -904,12 -894,12 -894,12 -836,12 +931,14 @@@@@@@@@@@ __setup("noclflush", setup_noclflush)
          
          void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
          {
---- -----      char *vendor = NULL;
++++ +++++      const char *vendor = NULL;
          
--- ------      if (c->x86_vendor < X86_VENDOR_NUM)
+++ ++++++      if (c->x86_vendor < X86_VENDOR_NUM) {
                        vendor = this_cpu->c_vendor;
--- ------      else if (c->cpuid_level >= 0)
--- ------              vendor = c->x86_vendor_id;
+++ ++++++      } else {
+++ ++++++              if (c->cpuid_level >= 0)
+++ ++++++                      vendor = c->x86_vendor_id;
+++ ++++++      }
          
                if (vendor && !strstr(c->x86_model_id, vendor))
                        printk(KERN_CONT "%s ", vendor);
          static __init int setup_disablecpuid(char *arg)
          {
                int bit;
+++ ++++++
                if (get_option(&arg, &bit) && bit < NCAPINTS*32)
                        setup_clear_cpu_cap(bit);
                else
                        return 0;
+++ ++++++
                return 1;
          }
          __setup("clearcpuid=", setup_disablecpuid);
          
          #ifdef CONFIG_X86_64
         -struct x8664_pda **_cpu_pda __read_mostly;
         -EXPORT_SYMBOL(_cpu_pda);
         -
          struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
          
         -static char boot_cpu_stack[IRQSTACKSIZE] __page_aligned_bss;
         +DEFINE_PER_CPU_FIRST(union irq_stack_union,
         +                   irq_stack_union) __aligned(PAGE_SIZE);
+++ +++++ 
         -void __cpuinit pda_init(int cpu)
         -{
         -      struct x8664_pda *pda = cpu_pda(cpu);
         +DEFINE_PER_CPU(char *, irq_stack_ptr) =
         +      init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64;
          
         -      /* Setup up data that may be needed in __get_free_pages early */
         -      loadsegment(fs, 0);
         -      loadsegment(gs, 0);
         -      /* Memory clobbers used to order PDA accessed */
         -      mb();
         -      wrmsrl(MSR_GS_BASE, pda);
         -      mb();
         -
         -      pda->cpunumber = cpu;
         -      pda->irqcount = -1;
         -      pda->kernelstack = (unsigned long)stack_thread_info() -
         -                               PDA_STACKOFFSET + THREAD_SIZE;
         -      pda->active_mm = &init_mm;
         -      pda->mmu_state = 0;
         -
         -      if (cpu == 0) {
         -              /* others are initialized in smpboot.c */
         -              pda->pcurrent = &init_task;
         -              pda->irqstackptr = boot_cpu_stack;
         -              pda->irqstackptr += IRQSTACKSIZE - 64;
         -      } else {
         -              if (!pda->irqstackptr) {
         -                      pda->irqstackptr = (char *)
         -                              __get_free_pages(GFP_ATOMIC, IRQSTACK_ORDER);
         -                      if (!pda->irqstackptr)
         -                              panic("cannot allocate irqstack for cpu %d",
         -                                    cpu);
         -                      pda->irqstackptr += IRQSTACKSIZE - 64;
         -              }
         +DEFINE_PER_CPU(unsigned long, kernel_stack) =
         +      (unsigned long)&init_thread_union - KERNEL_STACK_OFFSET + THREAD_SIZE;
         +EXPORT_PER_CPU_SYMBOL(kernel_stack);
          
         -              if (pda->nodenumber == 0 && cpu_to_node(cpu) != NUMA_NO_NODE)
         -                      pda->nodenumber = cpu_to_node(cpu);
         -      }
         -}
         +DEFINE_PER_CPU(unsigned int, irq_count) = -1;
          
         -static char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ +
         -                                DEBUG_STKSZ] __page_aligned_bss;
+++ ++++++/*
+++ ++++++ * Special IST stacks which the CPU switches to when it calls
+++ ++++++ * an IST-marked descriptor entry. Up to 7 stacks (hardware
+++ ++++++ * limit), all of them are 4K, except the debug stack which
+++ ++++++ * is 8K.
+++ ++++++ */
+++ ++++++static const unsigned int exception_stack_sizes[N_EXCEPTION_STACKS] = {
+++ ++++++        [0 ... N_EXCEPTION_STACKS - 1]        = EXCEPTION_STKSZ,
+++ ++++++        [DEBUG_STACK - 1]                     = DEBUG_STKSZ
+++ ++++++};
+++ +++++ 
         -extern asmlinkage void ignore_sysret(void);
         +static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks
         +      [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ])
         +      __aligned(PAGE_SIZE);
          
--- ----- extern asmlinkage void ignore_sysret(void);
--- ----- 
          /* May not be marked __init: used by software suspend */
          void syscall_init(void)
          {
@@@@@@@@@@@ -983,21 -983,21 -983,21 -1024,38 -983,21 -983,21 -993,21 -983,21 -983,21 -957,16 +1034,38 @@@@@@@@@@@ unsigned long kernel_eflags
           */
          DEFINE_PER_CPU(struct orig_ist, orig_ist);
          
--- ----- #else /* x86_64 */
         -#else
+++ ++++++#else /* CONFIG_X86_64 */
         +
         +#ifdef CONFIG_CC_STACKPROTECTOR
         +DEFINE_PER_CPU(unsigned long, stack_canary);
         +#endif
          
         -/* Make sure %fs is initialized properly in idle threads */
         +/* Make sure %fs and %gs are initialized properly in idle threads */
          struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
          {
                memset(regs, 0, sizeof(struct pt_regs));
                regs->fs = __KERNEL_PERCPU;
         +      regs->gs = __KERNEL_STACK_CANARY;
+++ ++++++
                return regs;
          }
--- ----- #endif        /* x86_64 */
         -#endif
+++ ++++++#endif        /* CONFIG_X86_64 */
+++ ++++++
+++ ++++++/*
+++ ++++++ * Clear all 6 debug registers:
+++ ++++++ */
+++ ++++++static void clear_all_debug_regs(void)
+++ ++++++{
+++ ++++++      int i;
+++ ++++++
+++ ++++++      for (i = 0; i < 8; i++) {
+++ ++++++              /* Ignore db4, db5 */
+++ ++++++              if ((i == 4) || (i == 5))
+++ ++++++                      continue;
+++ ++++++
+++ ++++++              set_debugreg(0, i);
+++ ++++++      }
+++ ++++++}
          
          /*
           * cpu_init() initializes state that is per-CPU. Some data is already
           * A lot of state is already set up in PDA init for 64 bit
           */
          #ifdef CONFIG_X86_64
+++ ++++++
          void __cpuinit cpu_init(void)
          {
--- ------      int cpu = stack_smp_processor_id();
--- ------      struct tss_struct *t = &per_cpu(init_tss, cpu);
--- ------      struct orig_ist *orig_ist = &per_cpu(orig_ist, cpu);
--- ------      unsigned long v;
         -      char *estacks = NULL;
+++ ++++++      struct orig_ist *orig_ist;
                struct task_struct *me;
+++ ++++++      struct tss_struct *t;
+++ ++++++      unsigned long v;
+++ ++++++      int cpu;
                int i;
          
         -      /* CPU 0 is initialised in head64.c */
         -      if (cpu != 0)
         -              pda_init(cpu);
         -      else
         -              estacks = boot_exception_stacks;
+++ ++++++      cpu = stack_smp_processor_id();
+++ ++++++      t = &per_cpu(init_tss, cpu);
+++ ++++++      orig_ist = &per_cpu(orig_ist, cpu);
+++ ++++++
         +#ifdef CONFIG_NUMA
         +      if (cpu != 0 && percpu_read(node_number) == 0 &&
         +          cpu_to_node(cpu) != NUMA_NO_NODE)
         +              percpu_write(node_number, cpu_to_node(cpu));
         +#endif
          
                me = current;
          
                 * and set up the GDT descriptor:
                 */
          
         -      switch_to_new_gdt();
         +      switch_to_new_gdt(cpu);
         +      loadsegment(fs, 0);
         +
                load_idt((const struct desc_ptr *)&idt_descr);
          
                memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8);
                barrier();
          
                check_efer();
         -      if (cpu != 0 && x2apic)
         +      if (cpu != 0)
                        enable_x2apic();
          
                /*
                 * set up and load the per-CPU TSS
                 */
                if (!orig_ist->ist[0]) {
--- -----               static const unsigned int sizes[N_EXCEPTION_STACKS] = {
--- -----                 [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STKSZ,
--- -----                 [DEBUG_STACK - 1] = DEBUG_STKSZ
         -              static const unsigned int order[N_EXCEPTION_STACKS] = {
         -                [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STACK_ORDER,
         -                [DEBUG_STACK - 1] = DEBUG_STACK_ORDER
--- ------              };
         +              char *estacks = per_cpu(exception_stacks, cpu);
+++ ++++++
                        for (v = 0; v < N_EXCEPTION_STACKS; v++) {
--- -----                       estacks += sizes[v];
         -                      if (cpu) {
         -                              estacks = (char *)__get_free_pages(GFP_ATOMIC, order[v]);
         -                              if (!estacks)
         -                                      panic("Cannot allocate exception "
         -                                            "stack %ld %d\n", v, cpu);
         -                      }
         -                      estacks += PAGE_SIZE << order[v];
+++ ++++++                      estacks += exception_stack_sizes[v];
                                orig_ist->ist[v] = t->x86_tss.ist[v] =
                                                (unsigned long)estacks;
                        }
                }
          
                t->x86_tss.io_bitmap_base = offsetof(struct tss_struct, io_bitmap);
+++ ++++++
                /*
                 * <= is required because the CPU will access up to
                 * 8 bits beyond the end of the IO permission bitmap.
          
                atomic_inc(&init_mm.mm_count);
                me->active_mm = &init_mm;
 - -  - --      if (me->mm)
 - -  - --              BUG();
 + +  + ++      BUG_ON(me->mm);
                enter_lazy_tlb(&init_mm, me);
          
                load_sp0(t, &current->thread);
                 */
                if (kgdb_connected && arch_kgdb_ops.correct_hw_break)
                        arch_kgdb_ops.correct_hw_break();
         -      else {
         -#endif
         -      /*
         -       * Clear all 6 debug registers:
         -       */
         -
         -      set_debugreg(0UL, 0);
         -      set_debugreg(0UL, 1);
         -      set_debugreg(0UL, 2);
         -      set_debugreg(0UL, 3);
         -      set_debugreg(0UL, 6);
         -      set_debugreg(0UL, 7);
         -#ifdef CONFIG_KGDB
         -      /* If the kgdb is connected no debug regs should be altered. */
         -      }
         +      else
          #endif
--- -----       {
--- -----               /*
--- -----                * Clear all 6 debug registers:
--- -----                */
--- -----               set_debugreg(0UL, 0);
--- -----               set_debugreg(0UL, 1);
--- -----               set_debugreg(0UL, 2);
--- -----               set_debugreg(0UL, 3);
--- -----               set_debugreg(0UL, 6);
--- -----               set_debugreg(0UL, 7);
--- -----       }
+++ ++++++              clear_all_debug_regs();
          
                fpu_init();
          
@@@@@@@@@@@ -1128,7 -1129,7 -1128,7 -1180,8 -1128,7 -1128,7 -1139,7 -1128,7 -1129,7 -1105,7 +1189,8 @@@@@@@@@@@ void __cpuinit cpu_init(void
          
                if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
                        printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
--- ------              for (;;) local_irq_enable();
+++ ++++++              for (;;)
+++ ++++++                      local_irq_enable();
                }
          
                printk(KERN_INFO "Initializing CPU#%d\n", cpu);
                        clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
          
                load_idt(&idt_descr);
         -      switch_to_new_gdt();
         +      switch_to_new_gdt(cpu);
          
                /*
                 * Set up and load the per-CPU TSS and LDT
                 */
                atomic_inc(&init_mm.mm_count);
                curr->active_mm = &init_mm;
 - -  - --      if (curr->mm)
 - -  - --              BUG();
 + +  + ++      BUG_ON(curr->mm);
                enter_lazy_tlb(&init_mm, curr);
          
                load_sp0(t, thread);
                __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
          #endif
          
         -      /* Clear %gs. */
         -      asm volatile ("mov %0, %%gs" : : "r" (0));
         -
--- ------      /* Clear all 6 debug registers: */
--- ------      set_debugreg(0, 0);
--- ------      set_debugreg(0, 1);
--- ------      set_debugreg(0, 2);
--- ------      set_debugreg(0, 3);
--- ------      set_debugreg(0, 6);
--- ------      set_debugreg(0, 7);
+++ ++++++      clear_all_debug_regs();
          
                /*
                 * Force FPU initialization:
          
                xsave_init();
          }
--- ------
--- ------
          #endif
index 191117f1ad51d06475be918516e109fd31bc0d71,191117f1ad51d06475be918516e109fd31bc0d71,191117f1ad51d06475be918516e109fd31bc0d71,25c559ba8d546fd4e332720165b84b7f5aea6a8e,968f15129ed81ba08668239fbc4122640e07d930,191117f1ad51d06475be918516e109fd31bc0d71,ae769471042e44fd7f5f5f77bba3d2b54ce5c642,191117f1ad51d06475be918516e109fd31bc0d71,191117f1ad51d06475be918516e109fd31bc0d71,24ff26a38adecff5ef27d4e76fb74caebd1fbb88..b09d4eb52bb95f89d8ba0f65968006fa5564ee67
          #include <asm/uaccess.h>
          #include <asm/ds.h>
          #include <asm/bugs.h>
   +     +#include <asm/cpu.h>
          
          #ifdef CONFIG_X86_64
          #include <asm/topology.h>
          #ifdef CONFIG_X86_LOCAL_APIC
          #include <asm/mpspec.h>
          #include <asm/apic.h>
         -#include <mach_apic.h>
          #endif
          
          static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
                        c->x86_cache_alignment = 128;
          #endif
          
++++++ +++      /* CPUID workaround for 0F33/0F34 CPU */
++++++ +++      if (c->x86 == 0xF && c->x86_model == 0x3
++++++ +++          && (c->x86_mask == 0x3 || c->x86_mask == 0x4))
++++++ +++              c->x86_phys_bits = 36;
++++++ +++
                /*
                 * c->x86_power is 8000_0007 edx. Bit 8 is TSC runs at constant rate
                 * with P/T states and does not stop in deep C-states
                        set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC);
                }
          
         +      /*
         +       * There is a known erratum on Pentium III and Core Solo
         +       * and Core Duo CPUs.
         +       * " Page with PAT set to WC while associated MTRR is UC
         +       *   may consolidate to UC "
         +       * Because of this erratum, it is better to stick with
         +       * setting WC in MTRR rather than using PAT on these CPUs.
         +       *
         +       * Enable PAT WC only on P4, Core 2 or later CPUs.
         +       */
         +      if (c->x86 == 6 && c->x86_model < 15)
         +              clear_cpu_cap(c, X86_FEATURE_PAT);
          }
          
          #ifdef CONFIG_X86_32
@@@@@@@@@@@ -111,28 -111,28 -111,28 -110,6 -111,28 -111,28 -116,28 -111,28 -111,28 -99,6 +116,28 @@@@@@@@@@@ static void __cpuinit trap_init_f00f_bu
          }
          #endif
          
   +     +static void __cpuinit intel_smp_check(struct cpuinfo_x86 *c)
   +     +{
   +     +#ifdef CONFIG_SMP
   +     +      /* calling is from identify_secondary_cpu() ? */
   +     +      if (c->cpu_index == boot_cpu_id)
   +     +              return;
   +     +
   +     +      /*
   +     +       * Mask B, Pentium, but not Pentium MMX
   +     +       */
   +     +      if (c->x86 == 5 &&
   +     +          c->x86_mask >= 1 && c->x86_mask <= 4 &&
   +     +          c->x86_model <= 3) {
   +     +              /*
   +     +               * Remember we have B step Pentia with bugs
   +     +               */
   +     +              WARN_ONCE(1, "WARNING: SMP operation may be unreliable"
   +     +                                  "with B stepping processors.\n");
   +     +      }
   +     +#endif
   +     +}
   +     +
          static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c)
          {
                unsigned long lo, hi;
                 */
                if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) {
                        rdmsr(MSR_IA32_MISC_ENABLE, lo, hi);
         -              if ((lo & (1<<9)) == 0) {
         +              if ((lo & MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE) == 0) {
                                printk (KERN_INFO "CPU: C0 stepping P4 Xeon detected.\n");
                                printk (KERN_INFO "CPU: Disabling hardware prefetching (Errata 037)\n");
         -                      lo |= (1<<9);   /* Disable hw prefetching */
         +                      lo |= MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE;
                                wrmsr (MSR_IA32_MISC_ENABLE, lo, hi);
                        }
                }
          #ifdef CONFIG_X86_NUMAQ
                numaq_tsc_disable();
          #endif
   +     +
   +     +      intel_smp_check(c);
          }
          #else
          static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c)
@@@@@@@@@@@ -410,7 -410,7 -410,7 -385,7 -410,7 -410,7 -415,7 -410,7 -410,7 -374,7 +415,7 @@@@@@@@@@@ static unsigned int __cpuinit intel_siz
          }
          #endif
          
---- -----static struct cpu_dev intel_cpu_dev __cpuinitdata = {
++++ +++++static const struct cpu_dev __cpuinitconst intel_cpu_dev = {
                .c_vendor       = "Intel",
                .c_ident        = { "GenuineIntel" },
          #ifdef CONFIG_X86_32
diff --combined arch/x86/mm/pat.c
index 2ed37158012dc0017879730c9cd4d00e4a45d8cf,2ed37158012dc0017879730c9cd4d00e4a45d8cf,2ed37158012dc0017879730c9cd4d00e4a45d8cf,2ed37158012dc0017879730c9cd4d00e4a45d8cf,2ed37158012dc0017879730c9cd4d00e4a45d8cf,2ed37158012dc0017879730c9cd4d00e4a45d8cf,2ed37158012dc0017879730c9cd4d00e4a45d8cf,2ed37158012dc0017879730c9cd4d00e4a45d8cf,2ed37158012dc0017879730c9cd4d00e4a45d8cf,21bc1f787ae2cd75e50bc2a58a9ff1f9b5f8ed3b..640339ee4fb2ae7ab79c02302cf26d0647966344
          #ifdef CONFIG_X86_PAT
          int __read_mostly pat_enabled = 1;
          
         -void __cpuinit pat_disable(char *reason)
         +void __cpuinit pat_disable(const char *reason)
          {
                pat_enabled = 0;
                printk(KERN_INFO "%s\n", reason);
@@@@@@@@@@@ -43,11 -43,11 -43,11 -43,11 -43,11 -43,11 -43,11 -43,11 -43,11 -43,6 +43,11 @@@@@@@@@@@ static int __init nopat(char *str
                return 0;
          }
          early_param("nopat", nopat);
         +#else
         +static inline void pat_disable(const char *reason)
         +{
         +      (void)reason;
         +}
          #endif
          
          
@@@@@@@@@@@ -84,20 -84,20 -84,20 -84,20 -84,20 -84,20 -84,20 -84,20 -84,20 -79,16 +84,20 @@@@@@@@@@@ void pat_init(void
                if (!pat_enabled)
                        return;
          
         -      /* Paranoia check. */
         -      if (!cpu_has_pat && boot_pat_state) {
         -              /*
         -               * If this happens we are on a secondary CPU, but
         -               * switched to PAT on the boot CPU. We have no way to
         -               * undo PAT.
         -               */
         -              printk(KERN_ERR "PAT enabled, "
         -                     "but not supported by secondary CPU\n");
         -              BUG();
         +      if (!cpu_has_pat) {
         +              if (!boot_pat_state) {
         +                      pat_disable("PAT not supported by CPU.");
         +                      return;
         +              } else {
         +                      /*
         +                       * If this happens we are on a secondary CPU, but
         +                       * switched to PAT on the boot CPU. We have no way to
         +                       * undo PAT.
         +                       */
         +                      printk(KERN_ERR "PAT enabled, "
         +                             "but not supported by secondary CPU\n");
         +                      BUG();
         +              }
                }
          
                /* Set PWT to Write-Combining. All other bits stay the same */
@@@@@@@@@@@ -634,33 -634,33 -634,33 -634,33 -634,33 -634,33 -634,33 -634,33 -634,33 -625,6 +634,33 @@@@@@@@@@@ void unmap_devmem(unsigned long pfn, un
                free_memtype(addr, addr + size);
          }
          
         +/*
         + * Change the memory type for the physial address range in kernel identity
         + * mapping space if that range is a part of identity map.
         + */
         +int kernel_map_sync_memtype(u64 base, unsigned long size, unsigned long flags)
         +{
         +      unsigned long id_sz;
         +
         +      if (!pat_enabled || base >= __pa(high_memory))
         +              return 0;
         +
         +      id_sz = (__pa(high_memory) < base + size) ?
         +                              __pa(high_memory) - base :
         +                              size;
         +
         +      if (ioremap_change_attr((unsigned long)__va(base), id_sz, flags) < 0) {
         +              printk(KERN_INFO
         +                      "%s:%d ioremap_change_attr failed %s "
         +                      "for %Lx-%Lx\n",
         +                      current->comm, current->pid,
         +                      cattr_name(flags),
         +                      base, (unsigned long long)(base + size));
         +              return -EINVAL;
         +      }
         +      return 0;
         +}
         +
          /*
           * Internal interface to reserve a range of physical memory with prot.
           * Reserved non RAM regions only and after successful reserve_memtype,
@@@@@@@@@@@ -670,17 -670,17 -670,17 -670,17 -670,17 -670,17 -670,17 -670,17 -670,17 -634,18 +670,18 @@@@@@@@@@@ static int reserve_pfn_range(u64 paddr
                                        int strict_prot)
          {
                int is_ram = 0;
         -      int id_sz, ret;
         +      int ret;
                unsigned long flags;
                unsigned long want_flags = (pgprot_val(*vma_prot) & _PAGE_CACHE_MASK);
          
                is_ram = pat_pagerange_is_ram(paddr, paddr + size);
          
                /*
---------        * reserve_pfn_range() doesn't support RAM pages.
+++++++++        * reserve_pfn_range() doesn't support RAM pages. Maintain the current
+++++++++        * behavior with RAM pages by returning success.
                 */
                if (is_ram != 0)
---------               return -EINVAL;
+++++++++               return 0;
          
                ret = reserve_memtype(paddr, paddr + size, want_flags, &flags);
                if (ret)
                                             flags);
                }
          
         -      /* Need to keep identity mapping in sync */
         -      if (paddr >= __pa(high_memory))
         -              return 0;
         -
         -      id_sz = (__pa(high_memory) < paddr + size) ?
         -                              __pa(high_memory) - paddr :
         -                              size;
         -
         -      if (ioremap_change_attr((unsigned long)__va(paddr), id_sz, flags) < 0) {
         +      if (kernel_map_sync_memtype(paddr, size, flags) < 0) {
                        free_memtype(paddr, paddr + size);
         -              printk(KERN_ERR
         -                      "%s:%d reserve_pfn_range ioremap_change_attr failed %s "
         -                      "for %Lx-%Lx\n",
         -                      current->comm, current->pid,
         -                      cattr_name(flags),
         -                      (unsigned long long)paddr,
         -                      (unsigned long long)(paddr + size));
                        return -EINVAL;
                }
                return 0;