Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 12 Nov 2013 01:46:43 +0000 (10:46 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 12 Nov 2013 01:46:43 +0000 (10:46 +0900)
Pull x86 cpu changes from Ingo Molnar:
 "The biggest change that stands out is the increase of the
  CONFIG_NR_CPUS range from 4096 to 8192 - as real hardware out there
  already went beyond 4k CPUs ...

  We only allow more than 512 CPUs if offstack cpumasks are enabled.

  CONFIG_MAXSMP=y remains to be the 'you are nuts!' extreme testcase,
  which now means a max of 8192 CPUs"

* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/cpu: Increase max CPU count to 8192
  x86/cpu: Allow higher NR_CPUS values
  x86/cpu: Always print SMP information in /proc/cpuinfo
  x86/cpu: Track legacy CPU model data only on 32-bit kernels

1  2 
arch/x86/Kconfig
arch/x86/kernel/cpu/common.c

diff --combined arch/x86/Kconfig
@@@ -123,7 -123,6 +123,7 @@@ config X8
        select COMPAT_OLD_SIGACTION if IA32_EMULATION
        select RTC_LIB
        select HAVE_DEBUG_STACKOVERFLOW
 +      select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64
  
  config INSTRUCTION_DECODER
        def_bool y
@@@ -826,14 -825,16 +826,16 @@@ config MAXSM
  config NR_CPUS
        int "Maximum number of CPUs" if SMP && !MAXSMP
        range 2 8 if SMP && X86_32 && !X86_BIGSMP
-       range 2 512 if SMP && !MAXSMP
+       range 2 512 if SMP && !MAXSMP && !CPUMASK_OFFSTACK
+       range 2 8192 if SMP && !MAXSMP && CPUMASK_OFFSTACK && X86_64
        default "1" if !SMP
-       default "4096" if MAXSMP
+       default "8192" if MAXSMP
        default "32" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000)
        default "8" if SMP
        ---help---
          This allows you to specify the maximum number of CPUs which this
-         kernel will support.  The maximum supported value is 512 and the
+         kernel will support.  If CPUMASK_OFFSTACK is enabled, the maximum
+         supported value is 4096, otherwise the maximum value is 512.  The
          minimum value which makes sense is 2.
  
          This is purely to save memory - each supported CPU adds
@@@ -346,7 -346,8 +346,8 @@@ static void filter_cpuid_features(struc
  /* Look up CPU names by table lookup. */
  static const char *table_lookup_model(struct cpuinfo_x86 *c)
  {
-       const struct cpu_model_info *info;
+ #ifdef CONFIG_X86_32
+       const struct legacy_cpu_model_info *info;
  
        if (c->x86_model >= 16)
                return NULL;    /* Range check */
        if (!this_cpu)
                return NULL;
  
-       info = this_cpu->c_models;
+       info = this_cpu->legacy_models;
  
-       while (info && info->family) {
+       while (info->family) {
                if (info->family == c->x86)
                        return info->model_names[c->x86_model];
                info++;
        }
+ #endif
        return NULL;            /* Not found */
  }
  
@@@ -450,8 -452,8 +452,8 @@@ void cpu_detect_cache_sizes(struct cpui
        c->x86_tlbsize += ((ebx >> 16) & 0xfff) + (ebx & 0xfff);
  #else
        /* do processor-specific cache resizing */
-       if (this_cpu->c_size_cache)
-               l2size = this_cpu->c_size_cache(c, l2size);
+       if (this_cpu->legacy_cache_size)
+               l2size = this_cpu->legacy_cache_size(c, l2size);
  
        /* Allow user to override all this if necessary. */
        if (cachesize_override != -1)
@@@ -1095,9 -1097,6 +1097,9 @@@ DEFINE_PER_CPU(char *, irq_stack_ptr) 
  
  DEFINE_PER_CPU(unsigned int, irq_count) __visible = -1;
  
 +DEFINE_PER_CPU(int, __preempt_count) = INIT_PREEMPT_COUNT;
 +EXPORT_PER_CPU_SYMBOL(__preempt_count);
 +
  DEFINE_PER_CPU(struct task_struct *, fpu_owner_task);
  
  /*
@@@ -1172,8 -1171,6 +1174,8 @@@ void debug_stack_reset(void
  
  DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task;
  EXPORT_PER_CPU_SYMBOL(current_task);
 +DEFINE_PER_CPU(int, __preempt_count) = INIT_PREEMPT_COUNT;
 +EXPORT_PER_CPU_SYMBOL(__preempt_count);
  DEFINE_PER_CPU(struct task_struct *, fpu_owner_task);
  
  #ifdef CONFIG_CC_STACKPROTECTOR