Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Jan 2012 03:13:40 +0000 (19:13 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Jan 2012 03:13:40 +0000 (19:13 -0800)
* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/intel config: Fix the APB_TIMER selection
  x86/mrst: Add additional debug prints for pb_keys
  x86/intel config: Revamp configuration to allow for Moorestown and Medfield
  x86/intel/scu/ipc: Match the changes in the x86 configuration
  x86/apb: Fix configuration constraints
  x86: Fix INTEL_MID silly
  x86/Kconfig: Cyclone-timer depends on x86-summit
  x86: Reduce clock calibration time during slave cpu startup
  x86/config: Revamp configuration for MID devices
  x86/sfi: Kill the IRQ as id hack

1  2 
arch/x86/Kconfig
arch/x86/Kconfig.debug
arch/x86/kernel/early_printk.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/tsc.c
drivers/rtc/Kconfig

diff --combined arch/x86/Kconfig
index 2513da0e6b67d838715b49c101157d1611bcb445,78fbb346959be1b606154da4f78f20e0528e249b..a150f4c35e945035001047136e704f01fb7f1e73
@@@ -26,8 -26,6 +26,8 @@@ config X8
        select HAVE_IOREMAP_PROT
        select HAVE_KPROBES
        select HAVE_MEMBLOCK
 +      select HAVE_MEMBLOCK_NODE_MAP
 +      select ARCH_DISCARD_MEMBLOCK
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARCH_WANT_FRAME_POINTERS
        select HAVE_DMA_ATTRS
@@@ -62,7 -60,6 +62,7 @@@
        select ANON_INODES
        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
@@@ -78,7 -75,6 +78,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)
@@@ -144,6 -140,9 +144,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
@@@ -205,6 -204,9 +205,6 @@@ config ZONE_DMA3
        bool
        default X86_64
  
 -config ARCH_POPULATES_NODE_MAP
 -      def_bool y
 -
  config AUDIT_ARCH
        bool
        default X86_64
@@@ -341,7 -343,6 +341,7 @@@ config X86_EXTENDED_PLATFOR
  
          If you enable this option then you'll be able to select support
          for the following (non-PC) 64 bit x86 platforms:
 +              Numascale NumaChip
                ScaleMP vSMP
                SGI Ultraviolet
  
  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_NUMACHIP
 +      bool "Numascale NumaChip"
 +      depends on X86_64
 +      depends on X86_EXTENDED_PLATFORM
 +      depends on NUMA
 +      depends on SMP
 +      depends on X86_X2APIC
 +      depends on !EDAC_AMD64
 +      ---help---
 +        Adds support for Numascale NumaChip large-SMP systems. Needed to
 +        enable more than ~168 cores.
 +        If you don't have one of these, you should say N here.
  
  config X86_VSMP
        bool "ScaleMP vSMP"
@@@ -420,12 -409,14 +420,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
@@@ -631,7 -642,7 +653,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"
  
@@@ -659,9 -670,10 +681,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
@@@ -1489,13 -1501,6 +1512,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"
@@@ -1748,7 -1753,7 +1771,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/Kconfig.debug
index aa4158f3ce62cafc6a605f7f0790010acc449d1f,28c3c73ab208b1060f28d56523cd937e2f87fdb8..e46c2147397f56ef25896f58139190dd9cb40899
@@@ -43,9 -43,9 +43,9 @@@ config EARLY_PRINT
          with klogd/syslogd or the X server. You should normally N here,
          unless you want to debug such a crash.
  
- config EARLY_PRINTK_MRST
-       bool "Early printk for MRST platform support"
-       depends on EARLY_PRINTK && X86_MRST
+ config EARLY_PRINTK_INTEL_MID
+       bool "Early printk for Intel MID platform support"
+       depends on EARLY_PRINTK && X86_INTEL_MID
  
  config EARLY_PRINTK_DBGP
        bool "Early printk via EHCI debug port"
@@@ -63,11 -63,8 +63,11 @@@ config DEBUG_STACKOVERFLO
        bool "Check for stack overflows"
        depends on DEBUG_KERNEL
        ---help---
 -        This option will cause messages to be printed if free stack space
 -        drops below a certain limit.
 +        Say Y here if you want to check the overflows of kernel, IRQ
 +        and exception stacks. This option will cause messages of the
 +        stacks in detail when free stack space drops below a certain
 +        limit.
 +        If in doubt, say "N".
  
  config X86_PTDUMP
        bool "Export kernel pagetable layout to userspace via debugfs"
@@@ -287,16 -284,4 +287,16 @@@ config DEBUG_STRICT_USER_COPY_CHECK
  
          If unsure, or if you run an older (pre 4.4) gcc, say N.
  
 +config DEBUG_NMI_SELFTEST
 +      bool "NMI Selftest"
 +      depends on DEBUG_KERNEL && X86_LOCAL_APIC
 +      ---help---
 +        Enabling this option turns on a quick NMI selftest to verify
 +        that the NMI behaves correctly.
 +
 +        This might help diagnose strange hangs that rely on NMI to
 +        function properly.
 +
 +        If unsure, say N.
 +
  endmenu
index 9d42a52d233150c40a1652c574212e67c0a68708,7a53da03086fbaaa2d796854d9a94611a0fd1bb1..9b9f18b4991849f7cc1923441bea2d5f5359886c
@@@ -240,14 -240,14 +240,14 @@@ static int __init setup_early_printk(ch
                if (!strncmp(buf, "xen", 3))
                        early_console_register(&xenboot_console, keep);
  #endif
- #ifdef CONFIG_EARLY_PRINTK_MRST
+ #ifdef CONFIG_EARLY_PRINTK_INTEL_MID
                if (!strncmp(buf, "mrst", 4)) {
                        mrst_early_console_init();
                        early_console_register(&early_mrst_console, keep);
                }
  
                if (!strncmp(buf, "hsu", 3)) {
 -                      hsu_early_console_init();
 +                      hsu_early_console_init(buf + 3);
                        early_console_register(&early_hsu_console, keep);
                }
  #endif
index 79f636bc44c6ca9f50852eae371a9fa8ac447a61,00eef55c8327916597aef8bfa39c14e4c4a45be5..66d250c00d115bbaae4c7ab0917ce9c0dfe89643
@@@ -207,22 -207,28 +207,28 @@@ static void __cpuinit smp_callin(void
         * Need to setup vector mappings before we enable interrupts.
         */
        setup_vector_irq(smp_processor_id());
+       /*
+        * Save our processor parameters. Note: this information
+        * is needed for clock calibration.
+        */
+       smp_store_cpu_info(cpuid);
        /*
         * Get our bogomips.
+        * Update loops_per_jiffy in cpu_data. Previous call to
+        * smp_store_cpu_info() stored a value that is close but not as
+        * accurate as the value just calculated.
         *
         * Need to enable IRQs because it can take longer and then
         * the NMI watchdog might kill us.
         */
        local_irq_enable();
        calibrate_delay();
+       cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy;
        local_irq_disable();
        pr_debug("Stack at about %p\n", &cpuid);
  
-       /*
-        * Save our processor parameters
-        */
-       smp_store_cpu_info(cpuid);
        /*
         * This must be done before setting cpu_online_mask
         * or calling notify_cpu_starting.
@@@ -840,8 -846,7 +846,8 @@@ int __cpuinit native_cpu_up(unsigned in
        pr_debug("++++++++++++++++++++=_---CPU UP  %u\n", cpu);
  
        if (apicid == BAD_APICID || apicid == boot_cpu_physical_apicid ||
 -          !physid_isset(apicid, phys_cpu_present_map)) {
 +          !physid_isset(apicid, phys_cpu_present_map) ||
 +          (!x2apic_mode && apicid >= 255)) {
                printk(KERN_ERR "%s: bad cpu %d\n", __func__, cpu);
                return -EINVAL;
        }
@@@ -1143,7 -1148,6 +1149,7 @@@ void __init native_smp_cpus_done(unsign
  {
        pr_debug("Boot done.\n");
  
 +      nmi_selftest();
        impress_friends();
  #ifdef CONFIG_X86_IO_APIC
        setup_ioapic_dest();
diff --combined arch/x86/kernel/tsc.c
index 2c9cf0fd78f59a66d1c802d26a4956319f1b9c1b,490fb330be87bae0239f523cfd20286e33edf9f6..c0dd5b603749057db73420caacc321d5d714338f
@@@ -35,7 -35,7 +35,7 @@@ static int __read_mostly tsc_unstable
     erroneous rdtsc usage on !cpu_has_tsc processors */
  static int __read_mostly tsc_disabled = -1;
  
 -static int tsc_clocksource_reliable;
 +int tsc_clocksource_reliable;
  /*
   * Scheduler clock - returns current time in nanosec units.
   */
@@@ -178,11 -178,11 +178,11 @@@ static unsigned long calc_pmtimer_ref(u
  }
  
  #define CAL_MS                10
 -#define CAL_LATCH     (CLOCK_TICK_RATE / (1000 / CAL_MS))
 +#define CAL_LATCH     (PIT_TICK_RATE / (1000 / CAL_MS))
  #define CAL_PIT_LOOPS 1000
  
  #define CAL2_MS               50
 -#define CAL2_LATCH    (CLOCK_TICK_RATE / (1000 / CAL2_MS))
 +#define CAL2_LATCH    (PIT_TICK_RATE / (1000 / CAL2_MS))
  #define CAL2_PIT_LOOPS        5000
  
  
@@@ -995,3 -995,23 +995,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
diff --combined drivers/rtc/Kconfig
index 877cf6fdcf24be411a0b8c081d5019b4ce3b7d77,3a125b835546e692e3a9c70cd25434fd54398f90..e19a4031f45e9b3ad3e1e677afa2dffd271bb4fc
@@@ -498,9 -498,9 +498,9 @@@ config RTC_DRV_CMO
          will be called rtc-cmos.
  
  config RTC_DRV_VRTC
-       tristate "Virtual RTC for Moorestown platforms"
-       depends on X86_MRST
-       default y if X86_MRST
+       tristate "Virtual RTC for Intel MID platforms"
+       depends on X86_INTEL_MID
+       default y if X86_INTEL_MID
  
        help
        Say "yes" here to get direct support for the real time clock
@@@ -774,7 -774,7 +774,7 @@@ config RTC_DRV_EP93X
  
  config RTC_DRV_SA1100
        tristate "SA11x0/PXA2xx"
 -      depends on ARCH_SA1100 || ARCH_PXA
 +      depends on ARCH_SA1100 || ARCH_PXA || ARCH_MMP
        help
          If you say Y here you will get access to the real time clock
          built into your SA11x0 or PXA2xx CPU.