diff options
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/amd_64.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/centaur_64.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common_64.c | 14 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel_64.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_64.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/non-fatal.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perfctr-watchdog.c | 4 |
9 files changed, 25 insertions, 34 deletions
diff --git a/arch/x86/kernel/cpu/amd_64.c b/arch/x86/kernel/cpu/amd_64.c index bd182b7616ee..7c36fb8a28d4 100644 --- a/arch/x86/kernel/cpu/amd_64.c +++ b/arch/x86/kernel/cpu/amd_64.c | |||
@@ -200,6 +200,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
200 | * benefit in doing so. | 200 | * benefit in doing so. |
201 | */ | 201 | */ |
202 | if (!rdmsrl_safe(MSR_K8_TSEG_ADDR, &tseg)) { | 202 | if (!rdmsrl_safe(MSR_K8_TSEG_ADDR, &tseg)) { |
203 | printk(KERN_DEBUG "tseg: %010llx\n", tseg); | ||
203 | if ((tseg>>PMD_SHIFT) < | 204 | if ((tseg>>PMD_SHIFT) < |
204 | (max_low_pfn_mapped>>(PMD_SHIFT-PAGE_SHIFT)) || | 205 | (max_low_pfn_mapped>>(PMD_SHIFT-PAGE_SHIFT)) || |
205 | ((tseg>>PMD_SHIFT) < | 206 | ((tseg>>PMD_SHIFT) < |
diff --git a/arch/x86/kernel/cpu/centaur_64.c b/arch/x86/kernel/cpu/centaur_64.c index 2026d2119cdb..1d181c40e2e1 100644 --- a/arch/x86/kernel/cpu/centaur_64.c +++ b/arch/x86/kernel/cpu/centaur_64.c | |||
@@ -16,16 +16,6 @@ static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c) | |||
16 | 16 | ||
17 | static void __cpuinit init_centaur(struct cpuinfo_x86 *c) | 17 | static void __cpuinit init_centaur(struct cpuinfo_x86 *c) |
18 | { | 18 | { |
19 | /* Cache sizes */ | ||
20 | unsigned n; | ||
21 | |||
22 | n = c->extended_cpuid_level; | ||
23 | if (n >= 0x80000008) { | ||
24 | unsigned eax = cpuid_eax(0x80000008); | ||
25 | c->x86_virt_bits = (eax >> 8) & 0xff; | ||
26 | c->x86_phys_bits = eax & 0xff; | ||
27 | } | ||
28 | |||
29 | if (c->x86 == 0x6 && c->x86_model >= 0xf) { | 19 | if (c->x86 == 0x6 && c->x86_model >= 0xf) { |
30 | c->x86_cache_alignment = c->x86_clflush_size * 2; | 20 | c->x86_cache_alignment = c->x86_clflush_size * 2; |
31 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); | 21 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); |
diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c index e7bf3c2dc5fe..c6bee77ca9e6 100644 --- a/arch/x86/kernel/cpu/common_64.c +++ b/arch/x86/kernel/cpu/common_64.c | |||
@@ -98,7 +98,7 @@ int __cpuinit get_model_name(struct cpuinfo_x86 *c) | |||
98 | 98 | ||
99 | void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) | 99 | void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) |
100 | { | 100 | { |
101 | unsigned int n, dummy, eax, ebx, ecx, edx; | 101 | unsigned int n, dummy, ebx, ecx, edx; |
102 | 102 | ||
103 | n = c->extended_cpuid_level; | 103 | n = c->extended_cpuid_level; |
104 | 104 | ||
@@ -121,11 +121,6 @@ void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) | |||
121 | printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n", | 121 | printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n", |
122 | c->x86_cache_size, ecx & 0xFF); | 122 | c->x86_cache_size, ecx & 0xFF); |
123 | } | 123 | } |
124 | if (n >= 0x80000008) { | ||
125 | cpuid(0x80000008, &eax, &dummy, &dummy, &dummy); | ||
126 | c->x86_virt_bits = (eax >> 8) & 0xff; | ||
127 | c->x86_phys_bits = eax & 0xff; | ||
128 | } | ||
129 | } | 124 | } |
130 | 125 | ||
131 | void __cpuinit detect_ht(struct cpuinfo_x86 *c) | 126 | void __cpuinit detect_ht(struct cpuinfo_x86 *c) |
@@ -314,6 +309,13 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) | |||
314 | if (c->extended_cpuid_level >= 0x80000007) | 309 | if (c->extended_cpuid_level >= 0x80000007) |
315 | c->x86_power = cpuid_edx(0x80000007); | 310 | c->x86_power = cpuid_edx(0x80000007); |
316 | 311 | ||
312 | if (c->extended_cpuid_level >= 0x80000008) { | ||
313 | u32 eax = cpuid_eax(0x80000008); | ||
314 | |||
315 | c->x86_virt_bits = (eax >> 8) & 0xff; | ||
316 | c->x86_phys_bits = eax & 0xff; | ||
317 | } | ||
318 | |||
317 | /* Assume all 64-bit CPUs support 32-bit syscall */ | 319 | /* Assume all 64-bit CPUs support 32-bit syscall */ |
318 | set_cpu_cap(c, X86_FEATURE_SYSCALL32); | 320 | set_cpu_cap(c, X86_FEATURE_SYSCALL32); |
319 | 321 | ||
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index fe9224c51d37..70609efdf1da 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -226,6 +226,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
226 | 226 | ||
227 | if (cpu_has_bts) | 227 | if (cpu_has_bts) |
228 | ds_init_intel(c); | 228 | ds_init_intel(c); |
229 | |||
230 | #ifdef CONFIG_X86_NUMAQ | ||
231 | numaq_tsc_disable(); | ||
232 | #endif | ||
229 | } | 233 | } |
230 | 234 | ||
231 | static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 *c, unsigned int size) | 235 | static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 *c, unsigned int size) |
diff --git a/arch/x86/kernel/cpu/intel_64.c b/arch/x86/kernel/cpu/intel_64.c index 02f773399e39..1019c58d39f0 100644 --- a/arch/x86/kernel/cpu/intel_64.c +++ b/arch/x86/kernel/cpu/intel_64.c | |||
@@ -54,9 +54,6 @@ static void __cpuinit srat_detect_node(void) | |||
54 | 54 | ||
55 | static void __cpuinit init_intel(struct cpuinfo_x86 *c) | 55 | static void __cpuinit init_intel(struct cpuinfo_x86 *c) |
56 | { | 56 | { |
57 | /* Cache sizes */ | ||
58 | unsigned n; | ||
59 | |||
60 | init_intel_cacheinfo(c); | 57 | init_intel_cacheinfo(c); |
61 | if (c->cpuid_level > 9) { | 58 | if (c->cpuid_level > 9) { |
62 | unsigned eax = cpuid_eax(10); | 59 | unsigned eax = cpuid_eax(10); |
@@ -78,13 +75,6 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
78 | if (cpu_has_bts) | 75 | if (cpu_has_bts) |
79 | ds_init_intel(c); | 76 | ds_init_intel(c); |
80 | 77 | ||
81 | n = c->extended_cpuid_level; | ||
82 | if (n >= 0x80000008) { | ||
83 | unsigned eax = cpuid_eax(0x80000008); | ||
84 | c->x86_virt_bits = (eax >> 8) & 0xff; | ||
85 | c->x86_phys_bits = eax & 0xff; | ||
86 | } | ||
87 | |||
88 | if (c->x86 == 15) | 78 | if (c->x86 == 15) |
89 | c->x86_cache_alignment = c->x86_clflush_size * 2; | 79 | c->x86_cache_alignment = c->x86_clflush_size * 2; |
90 | if (c->x86 == 6) | 80 | if (c->x86 == 6) |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 501ca1cea27d..c4a7ec31394c 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/smp_lock.h> | ||
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
13 | #include <linux/rcupdate.h> | 14 | #include <linux/rcupdate.h> |
14 | #include <linux/kallsyms.h> | 15 | #include <linux/kallsyms.h> |
@@ -363,7 +364,7 @@ static void mcheck_check_cpu(void *info) | |||
363 | 364 | ||
364 | static void mcheck_timer(struct work_struct *work) | 365 | static void mcheck_timer(struct work_struct *work) |
365 | { | 366 | { |
366 | on_each_cpu(mcheck_check_cpu, NULL, 1, 1); | 367 | on_each_cpu(mcheck_check_cpu, NULL, 1); |
367 | 368 | ||
368 | /* | 369 | /* |
369 | * Alert userspace if needed. If we logged an MCE, reduce the | 370 | * Alert userspace if needed. If we logged an MCE, reduce the |
@@ -532,10 +533,12 @@ static int open_exclu; /* already open exclusive? */ | |||
532 | 533 | ||
533 | static int mce_open(struct inode *inode, struct file *file) | 534 | static int mce_open(struct inode *inode, struct file *file) |
534 | { | 535 | { |
536 | lock_kernel(); | ||
535 | spin_lock(&mce_state_lock); | 537 | spin_lock(&mce_state_lock); |
536 | 538 | ||
537 | if (open_exclu || (open_count && (file->f_flags & O_EXCL))) { | 539 | if (open_exclu || (open_count && (file->f_flags & O_EXCL))) { |
538 | spin_unlock(&mce_state_lock); | 540 | spin_unlock(&mce_state_lock); |
541 | unlock_kernel(); | ||
539 | return -EBUSY; | 542 | return -EBUSY; |
540 | } | 543 | } |
541 | 544 | ||
@@ -544,6 +547,7 @@ static int mce_open(struct inode *inode, struct file *file) | |||
544 | open_count++; | 547 | open_count++; |
545 | 548 | ||
546 | spin_unlock(&mce_state_lock); | 549 | spin_unlock(&mce_state_lock); |
550 | unlock_kernel(); | ||
547 | 551 | ||
548 | return nonseekable_open(inode, file); | 552 | return nonseekable_open(inode, file); |
549 | } | 553 | } |
@@ -617,7 +621,7 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize, | |||
617 | * Collect entries that were still getting written before the | 621 | * Collect entries that were still getting written before the |
618 | * synchronize. | 622 | * synchronize. |
619 | */ | 623 | */ |
620 | on_each_cpu(collect_tscs, cpu_tsc, 1, 1); | 624 | on_each_cpu(collect_tscs, cpu_tsc, 1); |
621 | for (i = next; i < MCE_LOG_LEN; i++) { | 625 | for (i = next; i < MCE_LOG_LEN; i++) { |
622 | if (mcelog.entry[i].finished && | 626 | if (mcelog.entry[i].finished && |
623 | mcelog.entry[i].tsc < cpu_tsc[mcelog.entry[i].cpu]) { | 627 | mcelog.entry[i].tsc < cpu_tsc[mcelog.entry[i].cpu]) { |
@@ -742,7 +746,7 @@ static void mce_restart(void) | |||
742 | if (next_interval) | 746 | if (next_interval) |
743 | cancel_delayed_work(&mcheck_work); | 747 | cancel_delayed_work(&mcheck_work); |
744 | /* Timer race is harmless here */ | 748 | /* Timer race is harmless here */ |
745 | on_each_cpu(mce_init, NULL, 1, 1); | 749 | on_each_cpu(mce_init, NULL, 1); |
746 | next_interval = check_interval * HZ; | 750 | next_interval = check_interval * HZ; |
747 | if (next_interval) | 751 | if (next_interval) |
748 | schedule_delayed_work(&mcheck_work, | 752 | schedule_delayed_work(&mcheck_work, |
diff --git a/arch/x86/kernel/cpu/mcheck/non-fatal.c b/arch/x86/kernel/cpu/mcheck/non-fatal.c index 00ccb6c14ec2..cc1fccdd31e0 100644 --- a/arch/x86/kernel/cpu/mcheck/non-fatal.c +++ b/arch/x86/kernel/cpu/mcheck/non-fatal.c | |||
@@ -59,7 +59,7 @@ static DECLARE_DELAYED_WORK(mce_work, mce_work_fn); | |||
59 | 59 | ||
60 | static void mce_work_fn(struct work_struct *work) | 60 | static void mce_work_fn(struct work_struct *work) |
61 | { | 61 | { |
62 | on_each_cpu(mce_checkregs, NULL, 1, 1); | 62 | on_each_cpu(mce_checkregs, NULL, 1); |
63 | schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE)); | 63 | schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE)); |
64 | } | 64 | } |
65 | 65 | ||
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 105afe12beb0..6f23969c8faf 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -223,7 +223,7 @@ static void set_mtrr(unsigned int reg, unsigned long base, | |||
223 | atomic_set(&data.gate,0); | 223 | atomic_set(&data.gate,0); |
224 | 224 | ||
225 | /* Start the ball rolling on other CPUs */ | 225 | /* Start the ball rolling on other CPUs */ |
226 | if (smp_call_function(ipi_handler, &data, 1, 0) != 0) | 226 | if (smp_call_function(ipi_handler, &data, 0) != 0) |
227 | panic("mtrr: timed out waiting for other CPUs\n"); | 227 | panic("mtrr: timed out waiting for other CPUs\n"); |
228 | 228 | ||
229 | local_irq_save(flags); | 229 | local_irq_save(flags); |
@@ -1682,7 +1682,7 @@ void mtrr_ap_init(void) | |||
1682 | */ | 1682 | */ |
1683 | void mtrr_save_state(void) | 1683 | void mtrr_save_state(void) |
1684 | { | 1684 | { |
1685 | smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); | 1685 | smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1); |
1686 | } | 1686 | } |
1687 | 1687 | ||
1688 | static int __init mtrr_init_finialize(void) | 1688 | static int __init mtrr_init_finialize(void) |
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c index 2e9bef6e3aa3..6d4bdc02388a 100644 --- a/arch/x86/kernel/cpu/perfctr-watchdog.c +++ b/arch/x86/kernel/cpu/perfctr-watchdog.c | |||
@@ -189,7 +189,7 @@ void disable_lapic_nmi_watchdog(void) | |||
189 | if (atomic_read(&nmi_active) <= 0) | 189 | if (atomic_read(&nmi_active) <= 0) |
190 | return; | 190 | return; |
191 | 191 | ||
192 | on_each_cpu(stop_apic_nmi_watchdog, NULL, 0, 1); | 192 | on_each_cpu(stop_apic_nmi_watchdog, NULL, 1); |
193 | 193 | ||
194 | if (wd_ops) | 194 | if (wd_ops) |
195 | wd_ops->unreserve(); | 195 | wd_ops->unreserve(); |
@@ -213,7 +213,7 @@ void enable_lapic_nmi_watchdog(void) | |||
213 | return; | 213 | return; |
214 | } | 214 | } |
215 | 215 | ||
216 | on_each_cpu(setup_apic_nmi_watchdog, NULL, 0, 1); | 216 | on_each_cpu(setup_apic_nmi_watchdog, NULL, 1); |
217 | touch_nmi_watchdog(); | 217 | touch_nmi_watchdog(); |
218 | } | 218 | } |
219 | 219 | ||