Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: disable mwait for AMD family 10H/11H CPUs
x86: fix crash on cpu hotplug on pat-incapable machines
x86: remove mwait capability C-state check

+28 -10
+27 -9
arch/x86/kernel/process.c
··· 99 local_irq_enable(); 100 } 101 102 - 103 - static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c) 104 - { 105 - if (force_mwait) 106 - return 1; 107 - /* Any C1 states supported? */ 108 - return c->cpuid_level >= 5 && ((cpuid_edx(5) >> 4) & 0xf) > 0; 109 - } 110 - 111 /* 112 * On SMP it's slightly faster (but much more power-consuming!) 113 * to poll the ->work.need_resched flag instead of waiting for the ··· 108 { 109 local_irq_enable(); 110 cpu_relax(); 111 } 112 113 void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
··· 99 local_irq_enable(); 100 } 101 102 /* 103 * On SMP it's slightly faster (but much more power-consuming!) 104 * to poll the ->work.need_resched flag instead of waiting for the ··· 117 { 118 local_irq_enable(); 119 cpu_relax(); 120 + } 121 + 122 + /* 123 + * mwait selection logic: 124 + * 125 + * It depends on the CPU. For AMD CPUs that support MWAIT this is 126 + * wrong. Family 0x10 and 0x11 CPUs will enter C1 on HLT. Powersavings 127 + * then depend on a clock divisor and current Pstate of the core. If 128 + * all cores of a processor are in halt state (C1) the processor can 129 + * enter the C1E (C1 enhanced) state. If mwait is used this will never 130 + * happen. 131 + * 132 + * idle=mwait overrides this decision and forces the usage of mwait. 133 + */ 134 + static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c) 135 + { 136 + if (force_mwait) 137 + return 1; 138 + 139 + if (c->x86_vendor == X86_VENDOR_AMD) { 140 + switch(c->x86) { 141 + case 0x10: 142 + case 0x11: 143 + return 0; 144 + } 145 + } 146 + return 1; 147 } 148 149 void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
+1 -1
arch/x86/mm/pat.c
··· 28 #ifdef CONFIG_X86_PAT 29 int __read_mostly pat_wc_enabled = 1; 30 31 - void __init pat_disable(char *reason) 32 { 33 pat_wc_enabled = 0; 34 printk(KERN_INFO "%s\n", reason);
··· 28 #ifdef CONFIG_X86_PAT 29 int __read_mostly pat_wc_enabled = 1; 30 31 + void __cpuinit pat_disable(char *reason) 32 { 33 pat_wc_enabled = 0; 34 printk(KERN_INFO "%s\n", reason);