diff options
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/addon_cpuid_features.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/e_powersaver.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_64.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_amd_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_intel_64.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/p4.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perfctr-watchdog.c | 2 |
12 files changed, 32 insertions, 34 deletions
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index e48640cfac0..6882a735d9c 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <asm/pat.h> | 7 | #include <asm/pat.h> |
8 | #include <asm/processor.h> | 8 | #include <asm/processor.h> |
9 | 9 | ||
10 | #include <asm/genapic.h> | 10 | #include <asm/apic.h> |
11 | 11 | ||
12 | struct cpuid_bit { | 12 | struct cpuid_bit { |
13 | u16 feature; | 13 | u16 feature; |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index ff4d7b9e32e..25423a5b80e 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -12,8 +12,6 @@ | |||
12 | # include <asm/cacheflush.h> | 12 | # include <asm/cacheflush.h> |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #include <asm/genapic.h> | ||
16 | |||
17 | #include "cpu.h" | 15 | #include "cpu.h" |
18 | 16 | ||
19 | #ifdef CONFIG_X86_32 | 17 | #ifdef CONFIG_X86_32 |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 4db150ed446..826d5c87627 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -23,11 +23,9 @@ | |||
23 | #include <asm/smp.h> | 23 | #include <asm/smp.h> |
24 | #include <asm/cpu.h> | 24 | #include <asm/cpu.h> |
25 | #include <asm/cpumask.h> | 25 | #include <asm/cpumask.h> |
26 | #ifdef CONFIG_X86_LOCAL_APIC | ||
27 | #include <asm/mpspec.h> | ||
28 | #include <asm/apic.h> | 26 | #include <asm/apic.h> |
29 | #include <asm/genapic.h> | 27 | |
30 | #include <asm/genapic.h> | 28 | #ifdef CONFIG_X86_LOCAL_APIC |
31 | #include <asm/uv/uv.h> | 29 | #include <asm/uv/uv.h> |
32 | #endif | 30 | #endif |
33 | 31 | ||
@@ -1051,7 +1049,7 @@ void __cpuinit cpu_init(void) | |||
1051 | barrier(); | 1049 | barrier(); |
1052 | 1050 | ||
1053 | check_efer(); | 1051 | check_efer(); |
1054 | if (cpu != 0 && x2apic) | 1052 | if (cpu != 0) |
1055 | enable_x2apic(); | 1053 | enable_x2apic(); |
1056 | 1054 | ||
1057 | /* | 1055 | /* |
diff --git a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c index c2f930d8664..41ab3f064cb 100644 --- a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c +++ b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c | |||
@@ -204,12 +204,12 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
204 | } | 204 | } |
205 | /* Enable Enhanced PowerSaver */ | 205 | /* Enable Enhanced PowerSaver */ |
206 | rdmsrl(MSR_IA32_MISC_ENABLE, val); | 206 | rdmsrl(MSR_IA32_MISC_ENABLE, val); |
207 | if (!(val & 1 << 16)) { | 207 | if (!(val & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
208 | val |= 1 << 16; | 208 | val |= MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP; |
209 | wrmsrl(MSR_IA32_MISC_ENABLE, val); | 209 | wrmsrl(MSR_IA32_MISC_ENABLE, val); |
210 | /* Can be locked at 0 */ | 210 | /* Can be locked at 0 */ |
211 | rdmsrl(MSR_IA32_MISC_ENABLE, val); | 211 | rdmsrl(MSR_IA32_MISC_ENABLE, val); |
212 | if (!(val & 1 << 16)) { | 212 | if (!(val & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
213 | printk(KERN_INFO "eps: Can't enable Enhanced PowerSaver\n"); | 213 | printk(KERN_INFO "eps: Can't enable Enhanced PowerSaver\n"); |
214 | return -ENODEV; | 214 | return -ENODEV; |
215 | } | 215 | } |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index fb039cd345d..6428aa17b40 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -1157,8 +1157,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1157 | data->cpu = pol->cpu; | 1157 | data->cpu = pol->cpu; |
1158 | data->currpstate = HW_PSTATE_INVALID; | 1158 | data->currpstate = HW_PSTATE_INVALID; |
1159 | 1159 | ||
1160 | rc = powernow_k8_cpu_init_acpi(data); | 1160 | if (powernow_k8_cpu_init_acpi(data)) { |
1161 | if (rc) { | ||
1162 | /* | 1161 | /* |
1163 | * Use the PSB BIOS structure. This is only availabe on | 1162 | * Use the PSB BIOS structure. This is only availabe on |
1164 | * an UP version, and is deprecated by AMD. | 1163 | * an UP version, and is deprecated by AMD. |
@@ -1176,17 +1175,20 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1176 | "ACPI maintainers and complain to your BIOS " | 1175 | "ACPI maintainers and complain to your BIOS " |
1177 | "vendor.\n"); | 1176 | "vendor.\n"); |
1178 | #endif | 1177 | #endif |
1179 | goto err_out; | 1178 | kfree(data); |
1179 | return -ENODEV; | ||
1180 | } | 1180 | } |
1181 | if (pol->cpu != 0) { | 1181 | if (pol->cpu != 0) { |
1182 | printk(KERN_ERR FW_BUG PFX "No ACPI _PSS objects for " | 1182 | printk(KERN_ERR FW_BUG PFX "No ACPI _PSS objects for " |
1183 | "CPU other than CPU0. Complain to your BIOS " | 1183 | "CPU other than CPU0. Complain to your BIOS " |
1184 | "vendor.\n"); | 1184 | "vendor.\n"); |
1185 | goto err_out; | 1185 | kfree(data); |
1186 | return -ENODEV; | ||
1186 | } | 1187 | } |
1187 | rc = find_psb_table(data); | 1188 | rc = find_psb_table(data); |
1188 | if (rc) { | 1189 | if (rc) { |
1189 | goto err_out; | 1190 | kfree(data); |
1191 | return -ENODEV; | ||
1190 | } | 1192 | } |
1191 | /* Take a crude guess here. | 1193 | /* Take a crude guess here. |
1192 | * That guess was in microseconds, so multiply with 1000 */ | 1194 | * That guess was in microseconds, so multiply with 1000 */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index f08998278a3..c9f1fdc0283 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -390,14 +390,14 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
390 | enable it if not. */ | 390 | enable it if not. */ |
391 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 391 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
392 | 392 | ||
393 | if (!(l & (1<<16))) { | 393 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
394 | l |= (1<<16); | 394 | l |= MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP; |
395 | dprintk("trying to enable Enhanced SpeedStep (%x)\n", l); | 395 | dprintk("trying to enable Enhanced SpeedStep (%x)\n", l); |
396 | wrmsr(MSR_IA32_MISC_ENABLE, l, h); | 396 | wrmsr(MSR_IA32_MISC_ENABLE, l, h); |
397 | 397 | ||
398 | /* check to see if it stuck */ | 398 | /* check to see if it stuck */ |
399 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 399 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
400 | if (!(l & (1<<16))) { | 400 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
401 | printk(KERN_INFO PFX | 401 | printk(KERN_INFO PFX |
402 | "couldn't enable Enhanced SpeedStep\n"); | 402 | "couldn't enable Enhanced SpeedStep\n"); |
403 | return -ENODEV; | 403 | return -ENODEV; |
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 1f137a87d4b..25c559ba8d5 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #ifdef CONFIG_X86_LOCAL_APIC | 24 | #ifdef CONFIG_X86_LOCAL_APIC |
25 | #include <asm/mpspec.h> | 25 | #include <asm/mpspec.h> |
26 | #include <asm/apic.h> | 26 | #include <asm/apic.h> |
27 | #include <asm/genapic.h> | ||
28 | #endif | 27 | #endif |
29 | 28 | ||
30 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) | 29 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) |
@@ -147,10 +146,10 @@ static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c) | |||
147 | */ | 146 | */ |
148 | if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) { | 147 | if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) { |
149 | rdmsr(MSR_IA32_MISC_ENABLE, lo, hi); | 148 | rdmsr(MSR_IA32_MISC_ENABLE, lo, hi); |
150 | if ((lo & (1<<9)) == 0) { | 149 | if ((lo & MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE) == 0) { |
151 | printk (KERN_INFO "CPU: C0 stepping P4 Xeon detected.\n"); | 150 | printk (KERN_INFO "CPU: C0 stepping P4 Xeon detected.\n"); |
152 | printk (KERN_INFO "CPU: Disabling hardware prefetching (Errata 037)\n"); | 151 | printk (KERN_INFO "CPU: Disabling hardware prefetching (Errata 037)\n"); |
153 | lo |= (1<<9); /* Disable hw prefetching */ | 152 | lo |= MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE; |
154 | wrmsr (MSR_IA32_MISC_ENABLE, lo, hi); | 153 | wrmsr (MSR_IA32_MISC_ENABLE, lo, hi); |
155 | } | 154 | } |
156 | } | 155 | } |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 1c838032fd3..fe79985ce0f 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -295,11 +295,11 @@ void do_machine_check(struct pt_regs * regs, long error_code) | |||
295 | * If we know that the error was in user space, send a | 295 | * If we know that the error was in user space, send a |
296 | * SIGBUS. Otherwise, panic if tolerance is low. | 296 | * SIGBUS. Otherwise, panic if tolerance is low. |
297 | * | 297 | * |
298 | * do_exit() takes an awful lot of locks and has a slight | 298 | * force_sig() takes an awful lot of locks and has a slight |
299 | * risk of deadlocking. | 299 | * risk of deadlocking. |
300 | */ | 300 | */ |
301 | if (user_space) { | 301 | if (user_space) { |
302 | do_exit(SIGBUS); | 302 | force_sig(SIGBUS, current); |
303 | } else if (panic_on_oops || tolerant < 2) { | 303 | } else if (panic_on_oops || tolerant < 2) { |
304 | mce_panic("Uncorrected machine check", | 304 | mce_panic("Uncorrected machine check", |
305 | &panicm, mcestart); | 305 | &panicm, mcestart); |
@@ -490,7 +490,7 @@ static void __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c) | |||
490 | 490 | ||
491 | } | 491 | } |
492 | 492 | ||
493 | static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c) | 493 | static void mce_cpu_features(struct cpuinfo_x86 *c) |
494 | { | 494 | { |
495 | switch (c->x86_vendor) { | 495 | switch (c->x86_vendor) { |
496 | case X86_VENDOR_INTEL: | 496 | case X86_VENDOR_INTEL: |
@@ -734,6 +734,7 @@ __setup("mce=", mcheck_enable); | |||
734 | static int mce_resume(struct sys_device *dev) | 734 | static int mce_resume(struct sys_device *dev) |
735 | { | 735 | { |
736 | mce_init(NULL); | 736 | mce_init(NULL); |
737 | mce_cpu_features(¤t_cpu_data); | ||
737 | return 0; | 738 | return 0; |
738 | } | 739 | } |
739 | 740 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c index 4772e91e824..9817506dd46 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c | |||
@@ -121,7 +121,7 @@ static long threshold_restart_bank(void *_tr) | |||
121 | } | 121 | } |
122 | 122 | ||
123 | /* cpu init entry point, called from mce.c with preempt off */ | 123 | /* cpu init entry point, called from mce.c with preempt off */ |
124 | void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c) | 124 | void mce_amd_feature_init(struct cpuinfo_x86 *c) |
125 | { | 125 | { |
126 | unsigned int bank, block; | 126 | unsigned int bank, block; |
127 | unsigned int cpu = smp_processor_id(); | 127 | unsigned int cpu = smp_processor_id(); |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c index 5e8c79e748a..aa5e287c98e 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c | |||
@@ -31,7 +31,7 @@ asmlinkage void smp_thermal_interrupt(void) | |||
31 | irq_exit(); | 31 | irq_exit(); |
32 | } | 32 | } |
33 | 33 | ||
34 | static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | 34 | static void intel_init_thermal(struct cpuinfo_x86 *c) |
35 | { | 35 | { |
36 | u32 l, h; | 36 | u32 l, h; |
37 | int tm2 = 0; | 37 | int tm2 = 0; |
@@ -49,13 +49,13 @@ static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | |||
49 | */ | 49 | */ |
50 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 50 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
51 | h = apic_read(APIC_LVTTHMR); | 51 | h = apic_read(APIC_LVTTHMR); |
52 | if ((l & (1 << 3)) && (h & APIC_DM_SMI)) { | 52 | if ((l & MSR_IA32_MISC_ENABLE_TM1) && (h & APIC_DM_SMI)) { |
53 | printk(KERN_DEBUG | 53 | printk(KERN_DEBUG |
54 | "CPU%d: Thermal monitoring handled by SMI\n", cpu); | 54 | "CPU%d: Thermal monitoring handled by SMI\n", cpu); |
55 | return; | 55 | return; |
56 | } | 56 | } |
57 | 57 | ||
58 | if (cpu_has(c, X86_FEATURE_TM2) && (l & (1 << 13))) | 58 | if (cpu_has(c, X86_FEATURE_TM2) && (l & MSR_IA32_MISC_ENABLE_TM2)) |
59 | tm2 = 1; | 59 | tm2 = 1; |
60 | 60 | ||
61 | if (h & APIC_VECTOR_MASK) { | 61 | if (h & APIC_VECTOR_MASK) { |
@@ -73,7 +73,7 @@ static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | |||
73 | wrmsr(MSR_IA32_THERM_INTERRUPT, l | 0x03, h); | 73 | wrmsr(MSR_IA32_THERM_INTERRUPT, l | 0x03, h); |
74 | 74 | ||
75 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 75 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
76 | wrmsr(MSR_IA32_MISC_ENABLE, l | (1 << 3), h); | 76 | wrmsr(MSR_IA32_MISC_ENABLE, l | MSR_IA32_MISC_ENABLE_TM1, h); |
77 | 77 | ||
78 | l = apic_read(APIC_LVTTHMR); | 78 | l = apic_read(APIC_LVTTHMR); |
79 | apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); | 79 | apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); |
@@ -85,7 +85,7 @@ static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | |||
85 | return; | 85 | return; |
86 | } | 86 | } |
87 | 87 | ||
88 | void __cpuinit mce_intel_feature_init(struct cpuinfo_x86 *c) | 88 | void mce_intel_feature_init(struct cpuinfo_x86 *c) |
89 | { | 89 | { |
90 | intel_init_thermal(c); | 90 | intel_init_thermal(c); |
91 | } | 91 | } |
diff --git a/arch/x86/kernel/cpu/mcheck/p4.c b/arch/x86/kernel/cpu/mcheck/p4.c index 9b60fce09f7..f53bdcbaf38 100644 --- a/arch/x86/kernel/cpu/mcheck/p4.c +++ b/arch/x86/kernel/cpu/mcheck/p4.c | |||
@@ -85,7 +85,7 @@ static void intel_init_thermal(struct cpuinfo_x86 *c) | |||
85 | */ | 85 | */ |
86 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 86 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
87 | h = apic_read(APIC_LVTTHMR); | 87 | h = apic_read(APIC_LVTTHMR); |
88 | if ((l & (1<<3)) && (h & APIC_DM_SMI)) { | 88 | if ((l & MSR_IA32_MISC_ENABLE_TM1) && (h & APIC_DM_SMI)) { |
89 | printk(KERN_DEBUG "CPU%d: Thermal monitoring handled by SMI\n", | 89 | printk(KERN_DEBUG "CPU%d: Thermal monitoring handled by SMI\n", |
90 | cpu); | 90 | cpu); |
91 | return; /* -EBUSY */ | 91 | return; /* -EBUSY */ |
@@ -111,7 +111,7 @@ static void intel_init_thermal(struct cpuinfo_x86 *c) | |||
111 | vendor_thermal_interrupt = intel_thermal_interrupt; | 111 | vendor_thermal_interrupt = intel_thermal_interrupt; |
112 | 112 | ||
113 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 113 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
114 | wrmsr(MSR_IA32_MISC_ENABLE, l | (1<<3), h); | 114 | wrmsr(MSR_IA32_MISC_ENABLE, l | MSR_IA32_MISC_ENABLE_TM1, h); |
115 | 115 | ||
116 | l = apic_read(APIC_LVTTHMR); | 116 | l = apic_read(APIC_LVTTHMR); |
117 | apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); | 117 | apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); |
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c index 9abd48b2267..f6c70a164e3 100644 --- a/arch/x86/kernel/cpu/perfctr-watchdog.c +++ b/arch/x86/kernel/cpu/perfctr-watchdog.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/nmi.h> | 19 | #include <linux/nmi.h> |
20 | #include <linux/kprobes.h> | 20 | #include <linux/kprobes.h> |
21 | 21 | ||
22 | #include <asm/apic.h> | 22 | #include <asm/genapic.h> |
23 | #include <asm/intel_arch_perfmon.h> | 23 | #include <asm/intel_arch_perfmon.h> |
24 | 24 | ||
25 | struct nmi_watchdog_ctlblk { | 25 | struct nmi_watchdog_ctlblk { |