Merge branch 'x86/cpufeature' into irq/numa
authorIngo Molnar <mingo@elte.hu>
Mon, 1 Jun 2009 20:29:35 +0000 (22:29 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 1 Jun 2009 20:30:01 +0000 (22:30 +0200)
Merge reason: irq/numa didnt build because this commit:

  2759c32: x86: don't call read_apic_id if !cpu_has_apic

Had a dependency on x86/cpufeature changes. Pull in that
(small) branch to fix the dependency.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
1  2 
arch/x86/kernel/cpu/common.c

index c2fa56a3ae13822cb686c91743aa58b83b0452f8,e7fd5c4935a3596be428ea110b057e65d9ef03fe..b0517aa2bd3b37455c265bb415517f2a38eef20d
@@@ -114,13 -114,6 +114,13 @@@ DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_
  } };
  EXPORT_PER_CPU_SYMBOL_GPL(gdt_page);
  
 +static int __init x86_xsave_setup(char *s)
 +{
 +      setup_clear_cpu_cap(X86_FEATURE_XSAVE);
 +      return 1;
 +}
 +__setup("noxsave", x86_xsave_setup);
 +
  #ifdef CONFIG_X86_32
  static int cachesize_override __cpuinitdata = -1;
  static int disable_x86_serial_nr __cpuinitdata = 1;
@@@ -299,7 -292,8 +299,8 @@@ static const char *__cpuinit table_look
        return NULL;            /* Not found */
  }
  
- __u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata;
+ __u32 cpu_caps_cleared[NCAPINTS] __cpuinitdata;
+ __u32 cpu_caps_set[NCAPINTS] __cpuinitdata;
  
  void load_percpu_segment(int cpu)
  {
@@@ -768,12 -762,6 +769,12 @@@ static void __cpuinit identify_cpu(stru
        if (this_cpu->c_identify)
                this_cpu->c_identify(c);
  
 +      /* Clear/Set all flags overriden by options, after probe */
 +      for (i = 0; i < NCAPINTS; i++) {
 +              c->x86_capability[i] &= ~cpu_caps_cleared[i];
 +              c->x86_capability[i] |= cpu_caps_set[i];
 +      }
 +
  #ifdef CONFIG_X86_64
        c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
  #endif
  #endif
  
        init_hypervisor(c);
+       /*
+        * Clear/Set all flags overriden by options, need do it
+        * before following smp all cpus cap AND.
+        */
+       for (i = 0; i < NCAPINTS; i++) {
+               c->x86_capability[i] &= ~cpu_caps_cleared[i];
+               c->x86_capability[i] |= cpu_caps_set[i];
+       }
        /*
         * On SMP, boot_cpu_data holds the common feature set between
         * all CPUs; so make sure that we indicate which features are
                        boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
        }
  
-       /* Clear all flags overriden by options */
-       for (i = 0; i < NCAPINTS; i++)
-               c->x86_capability[i] &= ~cleared_cpu_caps[i];
  #ifdef CONFIG_X86_MCE
        /* Init Machine Check Exception if available. */
        mcheck_init(c);
@@@ -1216,8 -1210,6 +1223,8 @@@ void __cpuinit cpu_init(void
        load_TR_desc();
        load_LDT(&init_mm.context);
  
 +      t->x86_tss.io_bitmap_base = offsetof(struct tss_struct, io_bitmap);
 +
  #ifdef CONFIG_DOUBLEFAULT
        /* Set up doublefault TSS pointer in the GDT */
        __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);