OSDN Git Service

Merge remote-tracking branch 'linus/master' into x86/urgent
authorH. Peter Anvin <hpa@linux.intel.com>
Thu, 19 Jan 2012 20:56:50 +0000 (12:56 -0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 19 Jan 2012 20:56:50 +0000 (12:56 -0800)
1  2 
arch/x86/Kconfig
arch/x86/kernel/tsc.c

diff --combined arch/x86/Kconfig
@@@ -60,8 -60,12 +60,12 @@@ config X8
        select PERF_EVENTS
        select HAVE_PERF_EVENTS_NMI
        select ANON_INODES
+       select HAVE_ALIGNED_STRUCT_PAGE if SLUB && !M386
+       select HAVE_CMPXCHG_LOCAL if !M386
+       select HAVE_CMPXCHG_DOUBLE
        select HAVE_ARCH_KMEMCHECK
        select HAVE_USER_RETURN_NOTIFIER
+       select ARCH_BINFMT_ELF_RANDOMIZE_PIE
        select HAVE_ARCH_JUMP_LABEL
        select HAVE_TEXT_POKE_SMP
        select HAVE_GENERIC_HARDIRQS
@@@ -77,6 -81,7 +81,7 @@@
        select HAVE_BPF_JIT if (X86_64 && NET)
        select CLKEVT_I8253
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
+       select GENERIC_IOMAP
  
  config INSTRUCTION_DECODER
        def_bool (KPROBES || PERF_EVENTS)
@@@ -120,6 -125,16 +125,6 @@@ config HAVE_LATENCYTOP_SUPPOR
  config MMU
        def_bool y
  
 -config ZONE_DMA
 -      bool "DMA memory allocation support" if EXPERT
 -      default y
 -      help
 -        DMA memory allocation support allows devices with less than 32-bit
 -        addressing to allocate within the first 16MB of address space.
 -        Disable if no such devices will be used.
 -
 -        If unsure, say Y.
 -
  config SBUS
        bool
  
@@@ -132,9 -147,6 +137,6 @@@ config NEED_SG_DMA_LENGT
  config GENERIC_ISA_DMA
        def_bool ISA_DMA_API
  
- config GENERIC_IOMAP
-       def_bool y
  config GENERIC_BUG
        def_bool y
        depends on BUG
@@@ -243,16 -255,6 +245,16 @@@ source "kernel/Kconfig.freezer
  
  menu "Processor type and features"
  
 +config ZONE_DMA
 +      bool "DMA memory allocation support" if EXPERT
 +      default y
 +      help
 +        DMA memory allocation support allows devices with less than 32-bit
 +        addressing to allocate within the first 16MB of address space.
 +        Disable if no such devices will be used.
 +
 +        If unsure, say Y.
 +
  source "kernel/time/Kconfig"
  
  config SMP
@@@ -421,12 -423,14 +423,14 @@@ config X86_MRS
        depends on PCI
        depends on PCI_GOANY
        depends on X86_IO_APIC
+       select X86_INTEL_MID
+       select SFI
+       select DW_APB_TIMER
        select APB_TIMER
        select I2C
        select SPI
        select INTEL_SCU_IPC
        select X86_PLATFORM_DEVICES
-       select X86_INTEL_MID
        ---help---
          Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin
          Internet Device(MID) platform. Moorestown consists of two chips:
          nor standard legacy replacement devices/features. e.g. Moorestown does
          not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.
  
+ config X86_MDFLD
+        bool "Medfield MID platform"
+       depends on PCI
+       depends on PCI_GOANY
+       depends on X86_IO_APIC
+       select X86_INTEL_MID
+       select SFI
+       select DW_APB_TIMER
+       select APB_TIMER
+       select I2C
+       select SPI
+       select INTEL_SCU_IPC
+       select X86_PLATFORM_DEVICES
+       ---help---
+         Medfield is Intel's Low Power Intel Architecture (LPIA) based Moblin
+         Internet Device(MID) platform. 
+         Unlike standard x86 PCs, Medfield does not have many legacy devices
+         nor standard legacy replacement devices/features. e.g. Medfield does
+         not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.
  endif
  
  config X86_RDC321X
@@@ -632,7 -656,7 +656,7 @@@ config X86_SUMMIT_NUM
  
  config X86_CYCLONE_TIMER
        def_bool y
-       depends on X86_32_NON_STANDARD
+       depends on X86_SUMMIT
  
  source "arch/x86/Kconfig.cpu"
  
@@@ -660,9 -684,10 +684,10 @@@ config HPET_EMULATE_RT
        depends on HPET_TIMER && (RTC=y || RTC=m || RTC_DRV_CMOS=m || RTC_DRV_CMOS=y)
  
  config APB_TIMER
-        def_bool y if MRST
-        prompt "Langwell APB Timer Support" if X86_MRST
+        def_bool y if X86_INTEL_MID
+        prompt "Intel MID APB Timer Support" if X86_INTEL_MID
         select DW_APB_TIMER
+        depends on X86_INTEL_MID && SFI
         help
           APB timer is the replacement for 8254, HPET on X86 MID platforms.
           The APBT provides a stable time base on SMP
@@@ -1490,6 -1515,13 +1515,13 @@@ config EF
          resultant kernel should continue to boot on existing non-EFI
          platforms.
  
+ config EFI_STUB
+        bool "EFI stub support"
+        depends on EFI
+        ---help---
+           This kernel feature allows a bzImage to be loaded directly
+         by EFI firmware without the use of a bootloader.
  config SECCOMP
        def_bool y
        prompt "Enable seccomp to safely compute untrusted bytecode"
@@@ -1742,7 -1774,7 +1774,7 @@@ source "drivers/sfi/Kconfig
  
  config X86_APM_BOOT
        def_bool y
-       depends on APM || APM_MODULE
+       depends on APM
  
  menuconfig APM
        tristate "APM (Advanced Power Management) BIOS support"
diff --combined arch/x86/kernel/tsc.c
@@@ -290,15 -290,14 +290,15 @@@ static inline int pit_verify_msb(unsign
  static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap)
  {
        int count;
 -      u64 tsc = 0;
 +      u64 tsc = 0, prev_tsc = 0;
  
        for (count = 0; count < 50000; count++) {
                if (!pit_verify_msb(val))
                        break;
 +              prev_tsc = tsc;
                tsc = get_cycles();
        }
 -      *deltap = get_cycles() - tsc;
 +      *deltap = get_cycles() - prev_tsc;
        *tscp = tsc;
  
        /*
   * How many MSB values do we want to see? We aim for
   * a maximum error rate of 500ppm (in practice the
   * real error is much smaller), but refuse to spend
 - * more than 25ms on it.
 + * more than 50ms on it.
   */
 -#define MAX_QUICK_PIT_MS 25
 +#define MAX_QUICK_PIT_MS 50
  #define MAX_QUICK_PIT_ITERATIONS (MAX_QUICK_PIT_MS * PIT_TICK_RATE / 1000 / 256)
  
  static unsigned long quick_pit_calibrate(void)
@@@ -384,12 -383,15 +384,12 @@@ success
         *
         * As a result, we can depend on there not being
         * any odd delays anywhere, and the TSC reads are
 -       * reliable (within the error). We also adjust the
 -       * delta to the middle of the error bars, just
 -       * because it looks nicer.
 +       * reliable (within the error).
         *
         * kHz = ticks / time-in-seconds / 1000;
         * kHz = (t2 - t1) / (I * 256 / PIT_TICK_RATE) / 1000
         * kHz = ((t2 - t1) * PIT_TICK_RATE) / (I * 256 * 1000)
         */
 -      delta += (long)(d2 - d1)/2;
        delta *= PIT_TICK_RATE;
        do_div(delta, i*256*1000);
        printk("Fast TSC calibration using PIT\n");
@@@ -993,3 -995,23 +993,23 @@@ void __init tsc_init(void
        check_system_tsc_reliable();
  }
  
+ #ifdef CONFIG_SMP
+ /*
+  * If we have a constant TSC and are using the TSC for the delay loop,
+  * we can skip clock calibration if another cpu in the same socket has already
+  * been calibrated. This assumes that CONSTANT_TSC applies to all
+  * cpus in the socket - this should be a safe assumption.
+  */
+ unsigned long __cpuinit calibrate_delay_is_known(void)
+ {
+       int i, cpu = smp_processor_id();
+       if (!tsc_disabled && !cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC))
+               return 0;
+       for_each_online_cpu(i)
+               if (cpu_data(i).phys_proc_id == cpu_data(cpu).phys_proc_id)
+                       return cpu_data(i).loops_per_jiffy;
+       return 0;
+ }
+ #endif