Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86...
authorIngo Molnar <mingo@elte.hu>
Tue, 23 Dec 2008 15:27:23 +0000 (16:27 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 23 Dec 2008 15:27:23 +0000 (16:27 +0100)
32 files changed:
1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30 
Documentation/filesystems/proc.txt
Documentation/kernel-parameters.txt
Documentation/x86/x86_64/boot-options.txt
arch/x86/Kconfig
arch/x86/Kconfig.debug
arch/x86/ia32/ia32_signal.c
arch/x86/include/asm/msr.h
arch/x86/include/asm/pgtable.h
arch/x86/include/asm/pgtable_64.h
arch/x86/include/asm/setup.h
arch/x86/include/asm/syscalls.h
arch/x86/include/asm/system.h
arch/x86/kernel/Makefile
arch/x86/kernel/apic.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/ds.c
arch/x86/kernel/entry_64.S
arch/x86/kernel/microcode_core.c
arch/x86/kernel/microcode_intel.c
arch/x86/kernel/nmi.c
arch/x86/kernel/process.c
arch/x86/kernel/reboot.c
arch/x86/kernel/setup.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/time_64.c
arch/x86/kernel/tsc.c
arch/x86/kernel/tsc_sync.c
arch/x86/kernel/vmi_32.c
arch/x86/mm/init_32.c
drivers/firmware/dmi_scan.c
drivers/pci/quirks.c
include/linux/pci.h

Simple merge
                                                that require a timer override, but don't have
                                                HPET
                              
    -  - -       -- -- - -      acpi.debug_layer=       [HW,ACPI]
         -       -- -    -                      Format: <int>
         -       -- -    -                      Each bit of the <int> indicates an ACPI debug layer,
         -       -- -    -                      1: enable, 0: disable. It is useful for boot time
         -       -- -    -                      debugging. After system has booted up, it can be set
         -       -- -    -                      via /sys/module/acpi/parameters/debug_layer.
         -       -- -    -                      CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
         -       -- -    -                      Available bits (add the numbers together) to enable debug output
         -       -- -    -                      for specific parts of the ACPI subsystem:
         -       -- -    -                      0x01 utilities 0x02 hardware 0x04 events 0x08 tables
         -       -- -    -                      0x10 namespace 0x20 parser 0x40 dispatcher
         -       -- -    -                      0x80 executer 0x100 resources 0x200 acpica debugger
         -       -- -    -                      0x400 os services 0x800 acpica disassembler.
         -       -- -    -                      The number can be in decimal or prefixed with 0x in hex.
         -       -- -    -                      Warning: Many of these options can produce a lot of
         -       -- -    -                      output and make your system unusable. Be very careful.
         -       -- -    -    
         -       -- -    -      acpi.debug_level=       [HW,ACPI]
    +  + +       ++ ++ + +      acpi_backlight= [HW,ACPI]
    +  + +       ++ ++ + +                      acpi_backlight=vendor
    +  + +       ++ ++ + +                      acpi_backlight=video
    +  + +       ++ ++ + +                      If set to vendor, prefer vendor specific driver
    +  + +       ++ ++ + +                      (e.g. thinkpad_acpi, sony_acpi, etc.) instead
    +  + +       ++ ++ + +                      of the ACPI video.ko driver.
    +  + +       ++ ++ + +    
    +  + +       ++ ++ + +      acpi_display_output=    [HW,ACPI]
    +  + +       ++ ++ + +                      acpi_display_output=vendor
    +  + +       ++ ++ + +                      acpi_display_output=video
    +  + +       ++ ++ + +                      See above.
    +  + +       ++ ++ + +    
    +  + +       ++ ++ + +      acpi.debug_layer=       [HW,ACPI,ACPI_DEBUG]
    +  + +       ++ ++ + +      acpi.debug_level=       [HW,ACPI,ACPI_DEBUG]
                                                Format: <int>
    -  -             - -                        Each bit of the <int> indicates an ACPI debug layer,
         -                                      Each bit of the <int> indicates an ACPI debug level,
    -  - -           - -                        1: enable, 0: disable. It is useful for boot time
    -  - -           - -                        debugging. After system has booted up, it can be set
    -  -             - -                        via /sys/module/acpi/parameters/debug_layer.
         -                                      via /sys/module/acpi/parameters/debug_level.
    -  - -           - -                        CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
    -  -             - -                        Available bits (add the numbers together) to enable debug output
    -  -             - -                        for specific parts of the ACPI subsystem:
    -  -             - -                        0x01 utilities 0x02 hardware 0x04 events 0x08 tables
    -  -             - -                        0x10 namespace 0x20 parser 0x40 dispatcher
    -  -             - -                        0x80 executer 0x100 resources 0x200 acpica debugger
    -  -             - -                        0x400 os services 0x800 acpica disassembler.
         -                                      Available bits (add the numbers together) to enable different
         -                                      debug output levels of the ACPI subsystem:
         -                                      0x01 error 0x02 warn 0x04 init 0x08 debug object
         -                                      0x10 info 0x20 init names 0x40 parse 0x80 load
         -                                      0x100 dispatch 0x200 execute 0x400 names 0x800 operation region
         -                                      0x1000 bfield 0x2000 tables 0x4000 values 0x8000 objects
         -                                      0x10000 resources 0x20000 user requests 0x40000 package.
    -  - -           - -                        The number can be in decimal or prefixed with 0x in hex.
    -  - -           - -                        Warning: Many of these options can produce a lot of
    -  - -           - -                        output and make your system unusable. Be very careful.
    -  -             - -      
    -  -             - -        acpi.debug_level=       [HW,ACPI]
    -  -             - -                        Format: <int>
    -  -         -- -- - -                      Each bit of the <int> indicates an ACPI debug level,
    -  -         -- -- - -                      which corresponds to the level in an ACPI_DEBUG_PRINT
    -  -         -- -- - -                      statement.  After system has booted up, this mask
    -  -         -- -- - -                      can be set via /sys/module/acpi/parameters/debug_level.
    -  -         -- -- - -    
    -  -         -- -- - -                      CONFIG_ACPI_DEBUG must be enabled for this to produce
    -  -         -- -- - -                      any output.  The number can be in decimal or prefixed
    -  -         -- -- - -                      with 0x in hex.  Some of these options produce so much
    -  -         -- -- - -                      output that the system is unusable.
    -  -         -- -- - -    
    -  -         -- -- - -                      The following global components are defined by the
    -  -         -- -- - -                      ACPI CA:
    -  -         -- -- - -                             0x01 error
    -  -         -- -- - -                             0x02 warn
    -  -         -- -- - -                             0x04 init
    -  -         -- -- - -                             0x08 debug object
    -  -         -- -- - -                             0x10 info
    -  -         -- -- - -                             0x20 init names
    -  -         -- -- - -                             0x40 parse
    -  -         -- -- - -                             0x80 load
    -  -         -- -- - -                            0x100 dispatch
    -  -         -- -- - -                            0x200 execute
    -  -         -- -- - -                            0x400 names
    -  -         -- -- - -                            0x800 operation region
    -  -         -- -- - -                           0x1000 bfield
    -  -         -- -- - -                           0x2000 tables
    -  -         -- -- - -                           0x4000 values
    -  -         -- -- - -                           0x8000 objects
    -  -         -- -- - -                          0x10000 resources
    -  -         -- -- - -                          0x20000 user requests
    -  -         -- -- - -                          0x40000 package
    -  -         -- -- - -                      The number can be in decimal or prefixed with 0x in hex.
    -  -         -- -- - -                      Warning: Many of these options can produce a lot of
    -  -         -- -- - -                      output and make your system unusable. Be very careful.
    +  + +       ++ ++ + +                      CONFIG_ACPI_DEBUG must be enabled to produce any ACPI
    +  + +       ++ ++ + +                      debug output.  Bits in debug_layer correspond to a
    +  + +       ++ ++ + +                      _COMPONENT in an ACPI source file, e.g.,
    +  + +       ++ ++ + +                          #define _COMPONENT ACPI_PCI_COMPONENT
    +  + +       ++ ++ + +                      Bits in debug_level correspond to a level in
    +  + +       ++ ++ + +                      ACPI_DEBUG_PRINT statements, e.g.,
    +  + +       ++ ++ + +                          ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
    +  + +       ++ ++ + +                      See Documentation/acpi/debug.txt for more information
    +  + +       ++ ++ + +                      about debug layers and levels.
    +  + +       ++ ++ + +    
    +  + +       ++ ++ + +                      Enable AML "Debug" output, i.e., stores to the Debug
    +  + +       ++ ++ + +                      object while interpreting AML:
    +  + +       ++ ++ + +                          acpi.debug_layer=0xffffffff acpi.debug_level=0x2
    +  + +       ++ ++ + +                      Enable PCI/PCI interrupt routing info messages:
    +  + +       ++ ++ + +                          acpi.debug_layer=0x400000 acpi.debug_level=0x4
    +  + +       ++ ++ + +                      Enable all messages related to ACPI hardware:
    +  + +       ++ ++ + +                          acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
    +  + +       ++ ++ + +    
    +  + +       ++ ++ + +                      Some values produce so much output that the system is
    +  + +       ++ ++ + +                      unusable.  The "log_buf_len" parameter may be useful
    +  + +       ++ ++ + +                      if you need to capture more output.
         +                    
         +                      acpi.power_nocheck=     [HW,ACPI]
         +                                      Format: 1/0 enable/disable the check of power state.
         +                                      On some bogus BIOS the _PSC object/_STA object of
         +                                      power resource can't return the correct device power
         +                                      state. In such case it is unneccessary to check its
         +                                      power state again in power transition.
         +                                      1 : disable the power state check
                              
                                acpi_pm_good    [X86-32,X86-64]
                                                Override the pmtimer bug detection: force the kernel
                                                See arch/parisc/kernel/pdc_chassis.c
                              
                                pf.             [PARIDE]
    -  - -       -- -- - -                      See Documentation/paride.txt.
    +  + +       ++ ++ + +                      See Documentation/blockdev/paride.txt.
                              
                                pg.             [PARIDE]
    -  - -       -- -- - -                      See Documentation/paride.txt.
    +  + +       ++ ++ + +                      See Documentation/blockdev/paride.txt.
                              
                                pirq=           [SMP,APIC] Manual mp-table setup
         -       -- -    -                      See Documentation/i386/IO-APIC.txt.
         +       ++ +    +                      See Documentation/x86/i386/IO-APIC.txt.
                              
                                plip=           [PPT,NET] Parallel port network link
                                                Format: { parport<nr> | timid | 0 }
                              config ARCH_PHYS_ADDR_T_64BIT
                                     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
++++++++++++++++ +++++++++++++    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".
++++++++++++++++ +++++++++++++
                              # Common NUMA Features
                              config NUMA
-------- ---------------------  bool "Numa Memory Allocation and Scheduler Support (EXPERIMENTAL)"
++++++++ +++++++++++++++++++++  bool "Numa Memory Allocation and Scheduler Support"
                                depends on SMP
    -                           depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && BROKEN)
    +                           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
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -11,7 -11,7 -11,7 -11,7 -11,7 -11,8 -11,7 -11,7 -11,7 -11,6 -11,7 -11,7 -11,7 -11,7 -11,7 -11,7 -11,7 -11,6 -11,7 -11,7 -11,6 -11,7 -11,7 -11,7 -11,7 -11,6 -11,7 -11,7 -11,7 -11,7 +11,8 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ifdef CONFIG_FUNCTION_TRACE
                              CFLAGS_REMOVE_tsc.o = -pg
                              CFLAGS_REMOVE_rtc.o = -pg
                              CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
         +       +  +    +    CFLAGS_REMOVE_ftrace.o = -pg
+++++ ++++++++++++++++++++++++CFLAGS_REMOVE_early_printk.o = -pg
                              endif
                              
                              #
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -23,9 -23,9 -23,9 -23,9 -23,9 -24,9 -23,9 -23,9 -23,9 -22,9 -23,9 -23,9 -23,9 -23,9 -23,9 -23,9 -23,9 -22,9 -23,9 -23,9 -22,9 -23,9 -23,9 -23,9 -23,9 -22,9 -23,9 -23,9 -23,9 -23,9 +24,9 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ CFLAGS_vsyscall_64.o  := $(PROFILING) -g
                              CFLAGS_hpet.o             := $(nostackp)
                              CFLAGS_tsc.o              := $(nostackp)
                              
------------------------- ----obj-y                     := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o
+++++++++++++++++++++++++ ++++obj-y                     := process_$(BITS).o signal.o entry_$(BITS).o
                              obj-y                     += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
--------- --------------------obj-y                     += time_$(BITS).o ioport.o ldt.o
+++++++++ ++++++++++++++++++++obj-y                     += time_$(BITS).o ioport.o ldt.o dumpstack.o
                              obj-y                     += setup.o i8259.o irqinit_$(BITS).o setup_percpu.o
                              obj-$(CONFIG_X86_VISWS)   += visws_quirks.o
                              obj-$(CONFIG_X86_32)      += probe_roms_32.o
Simple merge
Simple merge
                                struct ds_context **p_context =
                                        (task ? &task->thread.ds_ctx : &this_system_context);
                                struct ds_context *context = *p_context;
    ++++ +   ++  ++ ++ + ++     unsigned long irq;
                              
                                if (!context) {
     --      --           -             spin_unlock(&ds_lock);
     --      --           -   
                                        context = kzalloc(sizeof(*context), GFP_KERNEL);
    ---- -   --  -- -- - --   
     --      --           -             if (!context) {
     --      --           -                     spin_lock(&ds_lock);
     ++      ++           +             if (!context)
                                                return NULL;
     --      --           -             }
                              
                                        context->ds = kzalloc(ds_cfg.sizeof_ds, GFP_KERNEL);
                                        if (!context->ds) {
                                                return NULL;
                                        }
                              
    -  - -       -- -- - -              *p_context = context;
     --      --           -             spin_lock(&ds_lock);
     --      --           -             /*
     --      --           -              * Check for race - another CPU could have allocated
     --      --           -              * it meanwhile:
     --      --           -              */
    ++++ +   ++  ++ ++ + ++             spin_lock_irqsave(&ds_lock, irq);
     ++      ++           +   
    -  - -       -- -- - -              context->this = p_context;
    -  - -       -- -- - -              context->task = task;
    +  + +       ++ ++ + +              if (*p_context) {
    +  + +       ++ ++ + +                      kfree(context->ds);
    +  + +       ++ ++ + +                      kfree(context);
     --      --           -                     return *p_context;
     --      --           -             }
                     +        
    -  - -       -- -  - -              if (task)
    -  - -       -- -  - -                      set_tsk_thread_flag(task, TIF_DS_AREA_MSR);
     --      --           -             *p_context = context;
    ++++ +   ++  ++ ++ + ++                     context = *p_context;
    ++++ +   ++  ++ ++ + ++             } else {
    ++++ +   ++  ++ ++ + ++                     *p_context = context;
                              
    -  - -       -- -  - -              if (!task || (task == current))
    -  - -       -- -  - -                      wrmsr(MSR_IA32_DS_AREA, (unsigned long)context->ds, 0);
     --      --           -             context->this = p_context;
     --      --           -             context->task = task;
                     -                  if (task)
                     -                          set_tsk_thread_flag(task, TIF_DS_AREA_MSR);
    ++++ +   ++  ++ ++ + ++                     context->this = p_context;
    ++++ +   ++  ++ ++ + ++                     context->task = task;
                              
    -  - -       -- -  - -              get_tracer(task);
     --      --           -             if (task)
     --      --           -                     set_tsk_thread_flag(task, TIF_DS_AREA_MSR);
                     -                  if (!task || (task == current))
                     -                          wrmsr(MSR_IA32_DS_AREA, (unsigned long)context->ds, 0);
    ++++ +   ++  ++ ++ + ++                     if (task)
    ++++ +   ++  ++ ++ + ++                             set_tsk_thread_flag(task, TIF_DS_AREA_MSR);
    +  + +       ++ +  + +    
     --      --           -             if (!task || (task == current))
     --      --           -                     wrmsr(MSR_IA32_DS_AREA, (unsigned long)context->ds, 0);
     --      --           -   
     --      --      -    -             get_tracer(task);
    ++++ +   ++  ++ ++ + ++                     if (!task || (task == current))
    ++++ +   ++  ++ ++ + ++                             wrmsrl(MSR_IA32_DS_AREA,
    ++++ +   ++  ++ ++ + ++                                    (unsigned long)context->ds);
    ++++ +   ++  ++ ++ + ++             }
    ++++ +   ++  ++ ++ + ++             spin_unlock_irqrestore(&ds_lock, irq);
                                }
                              
                                context->count++;
                                        return -EOPNOTSUPP;
                              
                              
    ---- -   --  -- -- - --     spin_lock(&ds_lock);
    -  - -       -- -- - -    
    -  - -       -- -- - -      if (!check_tracer(task))
    -  - -       -- -- - -              return -EPERM;
    ---- -   --  -- -- - --   
    ---- -   --  -- -- - --     error = -ENOMEM;
                                context = ds_alloc_context(task);
                                if (!context)
     --      --           -             goto out_unlock;
    ++++ +   ++  ++ ++ + ++             return -ENOMEM;
    ++++ +   ++  ++ ++ + ++   
    ++++ +   ++  ++ ++ + ++     spin_lock_irqsave(&ds_lock, irq);
    +  + +       ++ ++ + +    
    +  + +       ++ ++ + +      error = -EPERM;
    +  + +       ++ ++ + +      if (!check_tracer(task))
                                        goto out_unlock;
                              
    ++++ +   ++  ++ ++ + ++     get_tracer(task);
    ++++ +   ++  ++ ++ + ++   
                                error = -EALREADY;
                                if (context->owner[qual] == current)
    ---- -   --  -- -- - --             goto out_unlock;
    ++++ +   ++  ++ ++ + ++             goto out_put_tracer;
                                error = -EPERM;
                                if (context->owner[qual] != NULL)
    ---- -   --  -- -- - --             goto out_unlock;
    ++++ +   ++  ++ ++ + ++             goto out_put_tracer;
                                context->owner[qual] = current;
                              
    ---- -   --  -- -- - --     spin_unlock(&ds_lock);
    ++++ +   ++  ++ ++ + ++     spin_unlock_irqrestore(&ds_lock, irq);
                              
                              
                                error = -ENOMEM;
                                call schedule_tail
                                GET_THREAD_INFO(%rcx)
                                testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx)
+++++ ++++++++++++++++++++++++  CFI_REMEMBER_STATE
                                jnz rff_trace
-- ---------------------------rff_action:       
++ +++++++++++++++++++++++++++rff_action:
                                RESTORE_REST
                                testl $3,CS-ARGOFFSET(%rsp)     # from kernel_thread?
                                je   int_ret_from_sys_call
Simple merge
Simple merge
Simple merge
Simple merge
                                                reboot_type = BOOT_KBD;
                                                break;
                              
----------------------- ------
                                        case BOOT_EFI:
                                                if (efi_enabled)
----------------------- ------                          efi.reset_system(reboot_mode ? EFI_RESET_WARM : EFI_RESET_COLD,
+++++++++++++++++++++++ ++++++                          efi.reset_system(reboot_mode ?
+++++++++++++++++++++++ ++++++                                           EFI_RESET_WARM :
+++++++++++++++++++++++ ++++++                                           EFI_RESET_COLD,
                                                                         EFI_SUCCESS, 0, NULL);
+++++++++++++++++++++++ ++++++                  reboot_type = BOOT_KBD;
+++++++++++++++++++++++ ++++++                  break;
       + +       ++ +    +    
+++++++++++++++++++++++ ++++++          case BOOT_CF9:
+++++++++++++++++++++++ ++++++                  port_cf9_safe = true;
+++++++++++++++++++++++ ++++++                  /* fall through */
+++++++ + +++++++  + ++ + ++++
+++++++++++++++++++++++ ++++++          case BOOT_CF9_COND:
+++++++++++++++++++++++ ++++++                  if (port_cf9_safe) {
+++++++++++++++++++++++ ++++++                          u8 cf9 = inb(0xcf9) & ~6;
+++++++++++++++++++++++ ++++++                          outb(cf9|2, 0xcf9); /* Request hard reset */
+++++++++++++++++++++++ ++++++                          udelay(50);
+++++++++++++++++++++++ ++++++                          outb(cf9|6, 0xcf9); /* Actually do the reset */
+++++++++++++++++++++++ ++++++                          udelay(50);
+++++++++++++++++++++++ ++++++                  }
                                                reboot_type = BOOT_KBD;
                                                break;
                                        }
                              early_param("elfcorehdr", setup_elfcorehdr);
                              #endif
                              
---------------------- -------static struct x86_quirks default_x86_quirks __initdata;
-------------- ------- -------
-------------- ------- -------struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
-------------- ------- -------
-------------- ------- -------/*
-------------- ------- ------- * Some BIOSes seem to corrupt the low 64k of memory during events
-------------- ------- ------- * like suspend/resume and unplugging an HDMI cable.  Reserve all
-------------- ------- ------- * remaining free memory in that area and fill it with a distinct
-------------- ------- ------- * pattern.
-------------- ------- ------- */
-------------- ------- -------#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
-------------- ------- -------#define MAX_SCAN_AREAS    8
-------------- ------- -------
-------------- ------- -------static int __read_mostly memory_corruption_check = -1;
-------------- ------- -------
-------------- ------- -------static unsigned __read_mostly corruption_check_size = 64*1024;
-------------- ------- -------static unsigned __read_mostly corruption_check_period = 60; /* seconds */
-------------- ------- -------
-------------- ------- -------static struct e820entry scan_areas[MAX_SCAN_AREAS];
-------------- ------- -------static int num_scan_areas;
-------------- ------- -------
-------------- ------- -------
-------------- ------- -------static int set_corruption_check(char *arg)
  ----- --- -- ---- -- ------ {
  ----- --- -- ---- -- ------   char *end;
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------   memory_corruption_check = simple_strtol(arg, &end, 10);
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------   return (*end == 0) ? 0 : -EINVAL;
  ----- --- -- ---- -- ------ }
  ----- --- -- ---- -- ------ early_param("memory_corruption_check", set_corruption_check);
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------ static int set_corruption_check_period(char *arg)
  ----- --- -- ---- -- ------ {
  ----- --- -- ---- -- ------   char *end;
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------   corruption_check_period = simple_strtoul(arg, &end, 10);
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------   return (*end == 0) ? 0 : -EINVAL;
  ----- --- -- ---- -- ------ }
  ----- --- -- ---- -- ------ early_param("memory_corruption_check_period", set_corruption_check_period);
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------ static int set_corruption_check_size(char *arg)
  ----- --- -- ---- -- ------ {
  ----- --- -- ---- -- ------   char *end;
  ----- --- -- ---- -- ------   unsigned size;
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------   size = memparse(arg, &end);
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------   if (*end == '\0')
  ----- --- -- ---- -- ------           corruption_check_size = size;
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------   return (size == corruption_check_size) ? 0 : -EINVAL;
  ----- --- -- ---- -- ------ }
  ----- --- -- ---- -- ------ early_param("memory_corruption_check_size", set_corruption_check_size);
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------ static void __init setup_bios_corruption_check(void)
++++++++++++++++++++++ +++++++static int __init default_update_genapic(void)
              +               {
--     -   -       -         -  char *end;
--     -   -       -         -
--     -   -       -         -  memory_corruption_check = simple_strtol(arg, &end, 10);
--     -   -       -         -
--     -   -       -         -  return (*end == 0) ? 0 : -EINVAL;
--     -   -       -         -}
--     -   -       -         -early_param("memory_corruption_check", set_corruption_check);
--     -   -       -         -
--     -   -       -         -static int set_corruption_check_period(char *arg)
--     -   -       -         -{
--     -   -       -         -  char *end;
--     -   -       -         -
--     -   -       -         -  corruption_check_period = simple_strtoul(arg, &end, 10);
--     -   -       -         -
--     -   -       -         -  return (*end == 0) ? 0 : -EINVAL;
--     -   -       -         -}
--     -   -       -         -early_param("memory_corruption_check_period", set_corruption_check_period);
--     -   -       -         -
--     -   -       -         -static int set_corruption_check_size(char *arg)
--     -   -       -         -{
--     -   -       -         -  char *end;
--     -   -       -         -  unsigned size;
--     -   -       -         -
--     -   -       -         -  size = memparse(arg, &end);
--     -   -       -         -
--     -   -       -         -  if (*end == '\0')
--     -   -       -         -          corruption_check_size = size;
--     -   -       -         -
--     -   -       -         -  return (size == corruption_check_size) ? 0 : -EINVAL;
--     -   -       -         -}
--     -   -       -         -early_param("memory_corruption_check_size", set_corruption_check_size);
--     -   -       -         -
--     -   -       -         -
--     -   -       -         -static void __init setup_bios_corruption_check(void)
--     -   -       -         -{
-------------- ------- -------  u64 addr = PAGE_SIZE;   /* assume first page is reserved anyway */
-------------- ------- -------
-------------- ------- -------  if (memory_corruption_check == -1) {
-------------- ------- -------          memory_corruption_check =
-------------- ------- -------#ifdef CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
-------------- ------- -------                  1
-------------- ------- -------#else
-------------- ------- -------                  0
++++++++++++++++++++++ +++++++#ifdef CONFIG_X86_SMP
++++++++++++++++++++++ +++++++# if defined(CONFIG_X86_GENERICARCH) || defined(CONFIG_X86_64)
++++++++++++++++++++++ +++++++  genapic->wakeup_cpu = wakeup_secondary_cpu_via_init;
++++++++++++++++++++++ +++++++# endif
              +               #endif
-------------- ------- -------                  ;
-------------- ------- -------  }
------- ------ ------- -------
------- ------ ------- -------  if (corruption_check_size == 0)
------- ------ ------- -------          memory_corruption_check = 0;
------- ------ ------- -------
------- ------ ------- -------  if (!memory_corruption_check)
------- ------ ------- -------          return;
------- ------ ------- -------
------- ------ ------- -------  corruption_check_size = round_up(corruption_check_size, PAGE_SIZE);
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------   while(addr < corruption_check_size && num_scan_areas < MAX_SCAN_AREAS) {
  ----- --- -- ---- -- ------           u64 size;
  ----- --- -- ---- -- ------           addr = find_e820_area_size(addr, &size, PAGE_SIZE);
  ----- --- -- ---- -- ------ 
  ----- --- -- ---- -- ------           if (addr == 0)
  ----- --- -- ---- -- ------                   break;
              +               
       -                        if (corruption_check_size == 0)
       -                                memory_corruption_check = 0;
       -                      
       -                        if (!memory_corruption_check)
       -                                return;
       -                      
       -                        corruption_check_size = round_up(corruption_check_size, PAGE_SIZE);
       -                      
--     -   -       -         -  while(addr < corruption_check_size && num_scan_areas < MAX_SCAN_AREAS) {
--     -   -       -         -          u64 size;
--     -   -       -         -          addr = find_e820_area_size(addr, &size, PAGE_SIZE);
--     -   -       -         -
--     -   -       -         -          if (addr == 0)
--     -   -       -         -                  break;
--     -   -       -         -
-------------- ------- -------          if ((addr + size) > corruption_check_size)
-------------- ------- -------                  size = corruption_check_size - addr;
-------------- ------- -------
-------------- ------- -------          if (size == 0)
-------------- ------- -------                  break;
-------------- ------- -------
-------------- ------- -------          e820_update_range(addr, size, E820_RAM, E820_RESERVED);
-------------- ------- -------          scan_areas[num_scan_areas].addr = addr;
-------------- ------- -------          scan_areas[num_scan_areas].size = size;
-------------- ------- -------          num_scan_areas++;
-------------- ------- -------
-------------- ------- -------          /* Assume we've already mapped this early memory */
-------------- ------- -------          memset(__va(addr), 0, size);
-------------- ------- -------
-------------- ------- -------          addr += size;
-------------- ------- -------  }
-------------- ------- -------
-------------- ------- -------  printk(KERN_INFO "Scanning %d areas for low memory corruption\n",
-------------- ------- -------         num_scan_areas);
-------------- ------- -------  update_e820();
-------------- ------- -------}
-------------- ------- -------
-------------- ------- -------static struct timer_list periodic_check_timer;
-------------- ------- -------
-------------- ------- -------void check_for_bios_corruption(void)
-------------- ------- -------{
-------------- ------- -------  int i;
-------------- ------- -------  int corruption = 0;
-------------- ------- -------
-------------- ------- -------  if (!memory_corruption_check)
-------------- ------- -------          return;
-------------- ------- -------
-------------- ------- -------  for(i = 0; i < num_scan_areas; i++) {
-------------- ------- -------          unsigned long *addr = __va(scan_areas[i].addr);
-------------- ------- -------          unsigned long size = scan_areas[i].size;
-------------- ------- -------
-------------- ------- -------          for(; size; addr++, size -= sizeof(unsigned long)) {
-------------- ------- -------                  if (!*addr)
-------------- ------- -------                          continue;
-------------- ------- -------                  printk(KERN_ERR "Corrupted low memory at %p (%lx phys) = %08lx\n",
-------------- ------- -------                         addr, __pa(addr), *addr);
-------------- ------- -------                  corruption = 1;
-------------- ------- -------                  *addr = 0;
-------------- ------- -------          }
-------------- ------- -------  }
-------------- ------- -------
-------------- ------- -------  WARN(corruption, KERN_ERR "Memory corruption detected in low memory\n");
-------------- ------- -------}
-------------- ------- -------
-------------- ------- -------static void periodic_check_for_corruption(unsigned long data)
-------------- ------- -------{
-------------- ------- -------  check_for_bios_corruption();
-------------- ------- -------  mod_timer(&periodic_check_timer, round_jiffies(jiffies + corruption_check_period*HZ));
++++++++++++++++++++++ +++++++  return 0;
              +               }
              +               
-------------- ------- -------void start_periodic_check_for_corruption(void)
-------------- ------- -------{
-------------- ------- -------  if (!memory_corruption_check || corruption_check_period == 0)
-------------- ------- -------          return;
-------------- ------- -------
-------------- ------- -------  printk(KERN_INFO "Scanning for low memory corruption every %d seconds\n",
-------------- ------- -------         corruption_check_period);
++++++++++++++++++++++ +++++++static struct x86_quirks default_x86_quirks __initdata = {
++++++++++++++++++++++ +++++++  .update_genapic         = default_update_genapic,
++++++++++++++++++++++ +++++++};
                              
-------------- ------- -------  init_timer(&periodic_check_timer);
-------------- ------- -------  periodic_check_timer.function = &periodic_check_for_corruption;
-------------- ------- -------  periodic_check_for_corruption(0);
-------------- ------- -------}
-------------- ------- -------#endif
++++++++++++++ +++++++ +++++++struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
                              
                      -       /*
                      -        * Some BIOSes seem to corrupt the low 64k of memory during events
                      -        * like suspend/resume and unplugging an HDMI cable.  Reserve all
                      -        * remaining free memory in that area and fill it with a distinct
                      -        * pattern.
                      -        */
                      -       #ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
                      -       #define MAX_SCAN_AREAS    8
                      -       
                      -       static int __read_mostly memory_corruption_check = -1;
                      -       
                      -       static unsigned __read_mostly corruption_check_size = 64*1024;
                      -       static unsigned __read_mostly corruption_check_period = 60; /* seconds */
                      -       
                      -       static struct e820entry scan_areas[MAX_SCAN_AREAS];
                      -       static int num_scan_areas;
                      -       
                      -       
                      -       static int set_corruption_check(char *arg)
                      -       {
                      -         char *end;
                      -       
                      -         memory_corruption_check = simple_strtol(arg, &end, 10);
                      -       
                      -         return (*end == 0) ? 0 : -EINVAL;
                      -       }
                      -       early_param("memory_corruption_check", set_corruption_check);
                      -       
                      -       static int set_corruption_check_period(char *arg)
                      -       {
                      -         char *end;
                      -       
                      -         corruption_check_period = simple_strtoul(arg, &end, 10);
                      -       
                      -         return (*end == 0) ? 0 : -EINVAL;
                      -       }
                      -       early_param("memory_corruption_check_period", set_corruption_check_period);
                      -       
                      -       static int set_corruption_check_size(char *arg)
                      -       {
                      -         char *end;
                      -         unsigned size;
                      -       
                      -         size = memparse(arg, &end);
                      -       
                      -         if (*end == '\0')
                      -                 corruption_check_size = size;
                      -       
                      -         return (size == corruption_check_size) ? 0 : -EINVAL;
                      -       }
                      -       early_param("memory_corruption_check_size", set_corruption_check_size);
                      -       
                      -       
                      -       static void __init setup_bios_corruption_check(void)
                      -       {
                      -         u64 addr = PAGE_SIZE;   /* assume first page is reserved anyway */
                      -       
                      -         if (memory_corruption_check == -1) {
                      -                 memory_corruption_check =
                      -       #ifdef CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
                      -                         1
                      -       #else
                      -                         0
                      -       #endif
                      -                         ;
                      -         }
                      -       
                      -         if (corruption_check_size == 0)
                      -                 memory_corruption_check = 0;
                      -       
                      -         if (!memory_corruption_check)
                      -                 return;
                      -       
                      -         corruption_check_size = round_up(corruption_check_size, PAGE_SIZE);
                      -       
                      -         while(addr < corruption_check_size && num_scan_areas < MAX_SCAN_AREAS) {
                      -                 u64 size;
                      -                 addr = find_e820_area_size(addr, &size, PAGE_SIZE);
                      -       
                      -                 if (addr == 0)
                      -                         break;
                      -       
                      -                 if ((addr + size) > corruption_check_size)
                      -                         size = corruption_check_size - addr;
                      -       
                      -                 if (size == 0)
                      -                         break;
                      -       
                      -                 e820_update_range(addr, size, E820_RAM, E820_RESERVED);
                      -                 scan_areas[num_scan_areas].addr = addr;
                      -                 scan_areas[num_scan_areas].size = size;
                      -                 num_scan_areas++;
                      -       
                      -                 /* Assume we've already mapped this early memory */
                      -                 memset(__va(addr), 0, size);
                      -       
                      -                 addr += size;
                      -         }
                      -       
                      -         printk(KERN_INFO "Scanning %d areas for low memory corruption\n",
                      -                num_scan_areas);
                      -         update_e820();
                      -       }
                      -       
                      -       static struct timer_list periodic_check_timer;
                      -       
                      -       void check_for_bios_corruption(void)
                      -       {
                      -         int i;
                      -         int corruption = 0;
                      -       
                      -         if (!memory_corruption_check)
                      -                 return;
                      -       
                      -         for(i = 0; i < num_scan_areas; i++) {
                      -                 unsigned long *addr = __va(scan_areas[i].addr);
                      -                 unsigned long size = scan_areas[i].size;
                      -       
                      -                 for(; size; addr++, size -= sizeof(unsigned long)) {
                      -                         if (!*addr)
                      -                                 continue;
                      -                         printk(KERN_ERR "Corrupted low memory at %p (%lx phys) = %08lx\n",
                      -                                addr, __pa(addr), *addr);
                      -                         corruption = 1;
                      -                         *addr = 0;
                      -                 }
                      -         }
                      -       
                      -         WARN(corruption, KERN_ERR "Memory corruption detected in low memory\n");
                      -       }
                      -       
                      -       static void periodic_check_for_corruption(unsigned long data)
                      -       {
                      -         check_for_bios_corruption();
                      -         mod_timer(&periodic_check_timer, round_jiffies(jiffies + corruption_check_period*HZ));
                      -       }
                      -       
                      -       void start_periodic_check_for_corruption(void)
                      -       {
                      -         if (!memory_corruption_check || corruption_check_period == 0)
                      -                 return;
                      -       
                      -         printk(KERN_INFO "Scanning for low memory corruption every %d seconds\n",
                      -                corruption_check_period);
                      -       
                      -         init_timer(&periodic_check_timer);
                      -         periodic_check_timer.function = &periodic_check_for_corruption;
                      -         periodic_check_for_corruption(0);
                      -       }
                      -       #endif
                      -       
++++++++++++++ +++++++++++++++#ifdef CONFIG_X86_RESERVE_LOW_64K
                              static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
                              {
                                printk(KERN_NOTICE
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge