diff options
Diffstat (limited to 'arch/i386/kernel')
24 files changed, 224 insertions, 177 deletions
diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile index 267ca48e1b6c..d51c7313cae8 100644 --- a/arch/i386/kernel/acpi/Makefile +++ b/arch/i386/kernel/acpi/Makefile | |||
@@ -3,6 +3,6 @@ obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o | |||
3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o | 3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o |
4 | 4 | ||
5 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | 5 | ifneq ($(CONFIG_ACPI_PROCESSOR),) |
6 | obj-y += cstate.o | 6 | obj-y += cstate.o processor.o |
7 | endif | 7 | endif |
8 | 8 | ||
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 2111529dea77..79577f0ace98 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -248,10 +248,17 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end) | |||
248 | 248 | ||
249 | acpi_table_print_madt_entry(header); | 249 | acpi_table_print_madt_entry(header); |
250 | 250 | ||
251 | /* Register even disabled CPUs for cpu hotplug */ | 251 | /* Record local apic id only when enabled */ |
252 | 252 | if (processor->flags.enabled) | |
253 | x86_acpiid_to_apicid[processor->acpi_id] = processor->id; | 253 | x86_acpiid_to_apicid[processor->acpi_id] = processor->id; |
254 | 254 | ||
255 | /* | ||
256 | * We need to register disabled CPU as well to permit | ||
257 | * counting disabled CPUs. This allows us to size | ||
258 | * cpus_possible_map more accurately, to permit | ||
259 | * to not preallocating memory for all NR_CPUS | ||
260 | * when we use CPU hotplug. | ||
261 | */ | ||
255 | mp_register_lapic(processor->id, /* APIC ID */ | 262 | mp_register_lapic(processor->id, /* APIC ID */ |
256 | processor->flags.enabled); /* Enabled? */ | 263 | processor->flags.enabled); /* Enabled? */ |
257 | 264 | ||
@@ -464,7 +471,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) | |||
464 | * success: return IRQ number (>=0) | 471 | * success: return IRQ number (>=0) |
465 | * failure: return < 0 | 472 | * failure: return < 0 |
466 | */ | 473 | */ |
467 | int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | 474 | int acpi_register_gsi(u32 gsi, int triggering, int polarity) |
468 | { | 475 | { |
469 | unsigned int irq; | 476 | unsigned int irq; |
470 | unsigned int plat_gsi = gsi; | 477 | unsigned int plat_gsi = gsi; |
@@ -476,14 +483,14 @@ int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | |||
476 | if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { | 483 | if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { |
477 | extern void eisa_set_level_irq(unsigned int irq); | 484 | extern void eisa_set_level_irq(unsigned int irq); |
478 | 485 | ||
479 | if (edge_level == ACPI_LEVEL_SENSITIVE) | 486 | if (triggering == ACPI_LEVEL_SENSITIVE) |
480 | eisa_set_level_irq(gsi); | 487 | eisa_set_level_irq(gsi); |
481 | } | 488 | } |
482 | #endif | 489 | #endif |
483 | 490 | ||
484 | #ifdef CONFIG_X86_IO_APIC | 491 | #ifdef CONFIG_X86_IO_APIC |
485 | if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { | 492 | if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { |
486 | plat_gsi = mp_register_gsi(gsi, edge_level, active_high_low); | 493 | plat_gsi = mp_register_gsi(gsi, triggering, polarity); |
487 | } | 494 | } |
488 | #endif | 495 | #endif |
489 | acpi_gsi_to_irq(plat_gsi, &irq); | 496 | acpi_gsi_to_irq(plat_gsi, &irq); |
diff --git a/arch/i386/kernel/acpi/cstate.c b/arch/i386/kernel/acpi/cstate.c index 4c3036ba65df..25db49ef1770 100644 --- a/arch/i386/kernel/acpi/cstate.c +++ b/arch/i386/kernel/acpi/cstate.c | |||
@@ -14,64 +14,6 @@ | |||
14 | #include <acpi/processor.h> | 14 | #include <acpi/processor.h> |
15 | #include <asm/acpi.h> | 15 | #include <asm/acpi.h> |
16 | 16 | ||
17 | static void acpi_processor_power_init_intel_pdc(struct acpi_processor_power | ||
18 | *pow) | ||
19 | { | ||
20 | struct acpi_object_list *obj_list; | ||
21 | union acpi_object *obj; | ||
22 | u32 *buf; | ||
23 | |||
24 | /* allocate and initialize pdc. It will be used later. */ | ||
25 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
26 | if (!obj_list) { | ||
27 | printk(KERN_ERR "Memory allocation error\n"); | ||
28 | return; | ||
29 | } | ||
30 | |||
31 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
32 | if (!obj) { | ||
33 | printk(KERN_ERR "Memory allocation error\n"); | ||
34 | kfree(obj_list); | ||
35 | return; | ||
36 | } | ||
37 | |||
38 | buf = kmalloc(12, GFP_KERNEL); | ||
39 | if (!buf) { | ||
40 | printk(KERN_ERR "Memory allocation error\n"); | ||
41 | kfree(obj); | ||
42 | kfree(obj_list); | ||
43 | return; | ||
44 | } | ||
45 | |||
46 | buf[0] = ACPI_PDC_REVISION_ID; | ||
47 | buf[1] = 1; | ||
48 | buf[2] = ACPI_PDC_C_CAPABILITY_SMP; | ||
49 | |||
50 | obj->type = ACPI_TYPE_BUFFER; | ||
51 | obj->buffer.length = 12; | ||
52 | obj->buffer.pointer = (u8 *) buf; | ||
53 | obj_list->count = 1; | ||
54 | obj_list->pointer = obj; | ||
55 | pow->pdc = obj_list; | ||
56 | |||
57 | return; | ||
58 | } | ||
59 | |||
60 | /* Initialize _PDC data based on the CPU vendor */ | ||
61 | void acpi_processor_power_init_pdc(struct acpi_processor_power *pow, | ||
62 | unsigned int cpu) | ||
63 | { | ||
64 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
65 | |||
66 | pow->pdc = NULL; | ||
67 | if (c->x86_vendor == X86_VENDOR_INTEL) | ||
68 | acpi_processor_power_init_intel_pdc(pow); | ||
69 | |||
70 | return; | ||
71 | } | ||
72 | |||
73 | EXPORT_SYMBOL(acpi_processor_power_init_pdc); | ||
74 | |||
75 | /* | 17 | /* |
76 | * Initialize bm_flags based on the CPU cache properties | 18 | * Initialize bm_flags based on the CPU cache properties |
77 | * On SMP it depends on cache configuration | 19 | * On SMP it depends on cache configuration |
diff --git a/arch/i386/kernel/acpi/processor.c b/arch/i386/kernel/acpi/processor.c new file mode 100644 index 000000000000..9f4cc02717ec --- /dev/null +++ b/arch/i386/kernel/acpi/processor.c | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * arch/i386/kernel/acpi/processor.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Intel Corporation | ||
5 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | ||
6 | * - Added _PDC for platforms with Intel CPUs | ||
7 | */ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/module.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/acpi.h> | ||
13 | |||
14 | #include <acpi/processor.h> | ||
15 | #include <asm/acpi.h> | ||
16 | |||
17 | static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) | ||
18 | { | ||
19 | struct acpi_object_list *obj_list; | ||
20 | union acpi_object *obj; | ||
21 | u32 *buf; | ||
22 | |||
23 | /* allocate and initialize pdc. It will be used later. */ | ||
24 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
25 | if (!obj_list) { | ||
26 | printk(KERN_ERR "Memory allocation error\n"); | ||
27 | return; | ||
28 | } | ||
29 | |||
30 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
31 | if (!obj) { | ||
32 | printk(KERN_ERR "Memory allocation error\n"); | ||
33 | kfree(obj_list); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | buf = kmalloc(12, GFP_KERNEL); | ||
38 | if (!buf) { | ||
39 | printk(KERN_ERR "Memory allocation error\n"); | ||
40 | kfree(obj); | ||
41 | kfree(obj_list); | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | buf[0] = ACPI_PDC_REVISION_ID; | ||
46 | buf[1] = 1; | ||
47 | buf[2] = ACPI_PDC_C_CAPABILITY_SMP; | ||
48 | |||
49 | if (cpu_has(c, X86_FEATURE_EST)) | ||
50 | buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP; | ||
51 | |||
52 | obj->type = ACPI_TYPE_BUFFER; | ||
53 | obj->buffer.length = 12; | ||
54 | obj->buffer.pointer = (u8 *) buf; | ||
55 | obj_list->count = 1; | ||
56 | obj_list->pointer = obj; | ||
57 | pr->pdc = obj_list; | ||
58 | |||
59 | return; | ||
60 | } | ||
61 | |||
62 | /* Initialize _PDC data based on the CPU vendor */ | ||
63 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | ||
64 | { | ||
65 | unsigned int cpu = pr->id; | ||
66 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
67 | |||
68 | pr->pdc = NULL; | ||
69 | if (c->x86_vendor == X86_VENDOR_INTEL) | ||
70 | init_intel_pdc(pr, c); | ||
71 | |||
72 | return; | ||
73 | } | ||
74 | |||
75 | EXPORT_SYMBOL(arch_acpi_processor_init_pdc); | ||
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index acd3f1e34ca6..98a5c23cf3df 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -75,8 +75,10 @@ void ack_bad_irq(unsigned int irq) | |||
75 | * holds up an irq slot - in excessive cases (when multiple | 75 | * holds up an irq slot - in excessive cases (when multiple |
76 | * unexpected vectors occur) that might lock up the APIC | 76 | * unexpected vectors occur) that might lock up the APIC |
77 | * completely. | 77 | * completely. |
78 | * But only ack when the APIC is enabled -AK | ||
78 | */ | 79 | */ |
79 | ack_APIC_irq(); | 80 | if (!cpu_has_apic) |
81 | ack_APIC_irq(); | ||
80 | } | 82 | } |
81 | 83 | ||
82 | void __init apic_intr_init(void) | 84 | void __init apic_intr_init(void) |
@@ -1303,6 +1305,7 @@ int __init APIC_init_uniprocessor (void) | |||
1303 | if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { | 1305 | if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { |
1304 | printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", | 1306 | printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", |
1305 | boot_cpu_physical_apicid); | 1307 | boot_cpu_physical_apicid); |
1308 | clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); | ||
1306 | return -1; | 1309 | return -1; |
1307 | } | 1310 | } |
1308 | 1311 | ||
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index 333578a4e91a..0810f81f2a05 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c | |||
@@ -282,3 +282,11 @@ int __init amd_init_cpu(void) | |||
282 | } | 282 | } |
283 | 283 | ||
284 | //early_arch_initcall(amd_init_cpu); | 284 | //early_arch_initcall(amd_init_cpu); |
285 | |||
286 | static int __init amd_exit_cpu(void) | ||
287 | { | ||
288 | cpu_devs[X86_VENDOR_AMD] = NULL; | ||
289 | return 0; | ||
290 | } | ||
291 | |||
292 | late_initcall(amd_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/centaur.c b/arch/i386/kernel/cpu/centaur.c index 394814e57672..f52669ecb93f 100644 --- a/arch/i386/kernel/cpu/centaur.c +++ b/arch/i386/kernel/cpu/centaur.c | |||
@@ -405,10 +405,6 @@ static void __init init_centaur(struct cpuinfo_x86 *c) | |||
405 | winchip2_protect_mcr(); | 405 | winchip2_protect_mcr(); |
406 | #endif | 406 | #endif |
407 | break; | 407 | break; |
408 | case 10: | ||
409 | name="4"; | ||
410 | /* no info on the WC4 yet */ | ||
411 | break; | ||
412 | default: | 408 | default: |
413 | name="??"; | 409 | name="??"; |
414 | } | 410 | } |
@@ -474,3 +470,11 @@ int __init centaur_init_cpu(void) | |||
474 | } | 470 | } |
475 | 471 | ||
476 | //early_arch_initcall(centaur_init_cpu); | 472 | //early_arch_initcall(centaur_init_cpu); |
473 | |||
474 | static int __init centaur_exit_cpu(void) | ||
475 | { | ||
476 | cpu_devs[X86_VENDOR_CENTAUR] = NULL; | ||
477 | return 0; | ||
478 | } | ||
479 | |||
480 | late_initcall(centaur_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 15aee26ec2b6..7eb9213734a3 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -44,6 +44,7 @@ static void default_init(struct cpuinfo_x86 * c) | |||
44 | 44 | ||
45 | static struct cpu_dev default_cpu = { | 45 | static struct cpu_dev default_cpu = { |
46 | .c_init = default_init, | 46 | .c_init = default_init, |
47 | .c_vendor = "Unknown", | ||
47 | }; | 48 | }; |
48 | static struct cpu_dev * this_cpu = &default_cpu; | 49 | static struct cpu_dev * this_cpu = &default_cpu; |
49 | 50 | ||
@@ -150,6 +151,7 @@ static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | |||
150 | { | 151 | { |
151 | char *v = c->x86_vendor_id; | 152 | char *v = c->x86_vendor_id; |
152 | int i; | 153 | int i; |
154 | static int printed; | ||
153 | 155 | ||
154 | for (i = 0; i < X86_VENDOR_NUM; i++) { | 156 | for (i = 0; i < X86_VENDOR_NUM; i++) { |
155 | if (cpu_devs[i]) { | 157 | if (cpu_devs[i]) { |
@@ -159,10 +161,17 @@ static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | |||
159 | c->x86_vendor = i; | 161 | c->x86_vendor = i; |
160 | if (!early) | 162 | if (!early) |
161 | this_cpu = cpu_devs[i]; | 163 | this_cpu = cpu_devs[i]; |
162 | break; | 164 | return; |
163 | } | 165 | } |
164 | } | 166 | } |
165 | } | 167 | } |
168 | if (!printed) { | ||
169 | printed++; | ||
170 | printk(KERN_ERR "CPU: Vendor unknown, using generic init.\n"); | ||
171 | printk(KERN_ERR "CPU: Your system may be unstable.\n"); | ||
172 | } | ||
173 | c->x86_vendor = X86_VENDOR_UNKNOWN; | ||
174 | this_cpu = &default_cpu; | ||
166 | } | 175 | } |
167 | 176 | ||
168 | 177 | ||
diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig index 0f1eb507233b..26892d2099b0 100644 --- a/arch/i386/kernel/cpu/cpufreq/Kconfig +++ b/arch/i386/kernel/cpu/cpufreq/Kconfig | |||
@@ -96,6 +96,7 @@ config X86_POWERNOW_K8_ACPI | |||
96 | 96 | ||
97 | config X86_GX_SUSPMOD | 97 | config X86_GX_SUSPMOD |
98 | tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" | 98 | tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" |
99 | depends on PCI | ||
99 | help | 100 | help |
100 | This add the CPUFreq driver for NatSemi Geode processors which | 101 | This add the CPUFreq driver for NatSemi Geode processors which |
101 | support suspend modulation. | 102 | support suspend modulation. |
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 7975e79d5fa4..3852d0a4c1b5 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -295,68 +295,6 @@ acpi_cpufreq_guess_freq ( | |||
295 | } | 295 | } |
296 | 296 | ||
297 | 297 | ||
298 | /* | ||
299 | * acpi_processor_cpu_init_pdc_est - let BIOS know about the SMP capabilities | ||
300 | * of this driver | ||
301 | * @perf: processor-specific acpi_io_data struct | ||
302 | * @cpu: CPU being initialized | ||
303 | * | ||
304 | * To avoid issues with legacy OSes, some BIOSes require to be informed of | ||
305 | * the SMP capabilities of OS P-state driver. Here we set the bits in _PDC | ||
306 | * accordingly, for Enhanced Speedstep. Actual call to _PDC is done in | ||
307 | * driver/acpi/processor.c | ||
308 | */ | ||
309 | static void | ||
310 | acpi_processor_cpu_init_pdc_est( | ||
311 | struct acpi_processor_performance *perf, | ||
312 | unsigned int cpu, | ||
313 | struct acpi_object_list *obj_list | ||
314 | ) | ||
315 | { | ||
316 | union acpi_object *obj; | ||
317 | u32 *buf; | ||
318 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
319 | dprintk("acpi_processor_cpu_init_pdc_est\n"); | ||
320 | |||
321 | if (!cpu_has(c, X86_FEATURE_EST)) | ||
322 | return; | ||
323 | |||
324 | /* Initialize pdc. It will be used later. */ | ||
325 | if (!obj_list) | ||
326 | return; | ||
327 | |||
328 | if (!(obj_list->count && obj_list->pointer)) | ||
329 | return; | ||
330 | |||
331 | obj = obj_list->pointer; | ||
332 | if ((obj->buffer.length == 12) && obj->buffer.pointer) { | ||
333 | buf = (u32 *)obj->buffer.pointer; | ||
334 | buf[0] = ACPI_PDC_REVISION_ID; | ||
335 | buf[1] = 1; | ||
336 | buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; | ||
337 | perf->pdc = obj_list; | ||
338 | } | ||
339 | return; | ||
340 | } | ||
341 | |||
342 | |||
343 | /* CPU specific PDC initialization */ | ||
344 | static void | ||
345 | acpi_processor_cpu_init_pdc( | ||
346 | struct acpi_processor_performance *perf, | ||
347 | unsigned int cpu, | ||
348 | struct acpi_object_list *obj_list | ||
349 | ) | ||
350 | { | ||
351 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
352 | dprintk("acpi_processor_cpu_init_pdc\n"); | ||
353 | perf->pdc = NULL; | ||
354 | if (cpu_has(c, X86_FEATURE_EST)) | ||
355 | acpi_processor_cpu_init_pdc_est(perf, cpu, obj_list); | ||
356 | return; | ||
357 | } | ||
358 | |||
359 | |||
360 | static int | 298 | static int |
361 | acpi_cpufreq_cpu_init ( | 299 | acpi_cpufreq_cpu_init ( |
362 | struct cpufreq_policy *policy) | 300 | struct cpufreq_policy *policy) |
@@ -367,14 +305,7 @@ acpi_cpufreq_cpu_init ( | |||
367 | unsigned int result = 0; | 305 | unsigned int result = 0; |
368 | struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; | 306 | struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; |
369 | 307 | ||
370 | union acpi_object arg0 = {ACPI_TYPE_BUFFER}; | ||
371 | u32 arg0_buf[3]; | ||
372 | struct acpi_object_list arg_list = {1, &arg0}; | ||
373 | |||
374 | dprintk("acpi_cpufreq_cpu_init\n"); | 308 | dprintk("acpi_cpufreq_cpu_init\n"); |
375 | /* setup arg_list for _PDC settings */ | ||
376 | arg0.buffer.length = 12; | ||
377 | arg0.buffer.pointer = (u8 *) arg0_buf; | ||
378 | 309 | ||
379 | data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); | 310 | data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); |
380 | if (!data) | 311 | if (!data) |
@@ -382,9 +313,7 @@ acpi_cpufreq_cpu_init ( | |||
382 | 313 | ||
383 | acpi_io_data[cpu] = data; | 314 | acpi_io_data[cpu] = data; |
384 | 315 | ||
385 | acpi_processor_cpu_init_pdc(&data->acpi_data, cpu, &arg_list); | ||
386 | result = acpi_processor_register_performance(&data->acpi_data, cpu); | 316 | result = acpi_processor_register_performance(&data->acpi_data, cpu); |
387 | data->acpi_data.pdc = NULL; | ||
388 | 317 | ||
389 | if (result) | 318 | if (result) |
390 | goto err_free; | 319 | goto err_free; |
diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c index 270f2188d68b..cc73a7ae34bc 100644 --- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -52,6 +52,7 @@ enum { | |||
52 | 52 | ||
53 | 53 | ||
54 | static int has_N44_O17_errata[NR_CPUS]; | 54 | static int has_N44_O17_errata[NR_CPUS]; |
55 | static int has_N60_errata[NR_CPUS]; | ||
55 | static unsigned int stock_freq; | 56 | static unsigned int stock_freq; |
56 | static struct cpufreq_driver p4clockmod_driver; | 57 | static struct cpufreq_driver p4clockmod_driver; |
57 | static unsigned int cpufreq_p4_get(unsigned int cpu); | 58 | static unsigned int cpufreq_p4_get(unsigned int cpu); |
@@ -226,6 +227,12 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
226 | case 0x0f12: | 227 | case 0x0f12: |
227 | has_N44_O17_errata[policy->cpu] = 1; | 228 | has_N44_O17_errata[policy->cpu] = 1; |
228 | dprintk("has errata -- disabling low frequencies\n"); | 229 | dprintk("has errata -- disabling low frequencies\n"); |
230 | break; | ||
231 | |||
232 | case 0x0f29: | ||
233 | has_N60_errata[policy->cpu] = 1; | ||
234 | dprintk("has errata -- disabling frequencies lower than 2ghz\n"); | ||
235 | break; | ||
229 | } | 236 | } |
230 | 237 | ||
231 | /* get max frequency */ | 238 | /* get max frequency */ |
@@ -237,6 +244,8 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
237 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { | 244 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { |
238 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) | 245 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) |
239 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | 246 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; |
247 | else if (has_N60_errata[policy->cpu] && p4clockmod_table[i].frequency < 2000000) | ||
248 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | ||
240 | else | 249 | else |
241 | p4clockmod_table[i].frequency = (stock_freq * i)/8; | 250 | p4clockmod_table[i].frequency = (stock_freq * i)/8; |
242 | } | 251 | } |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index 9a826cde4fd1..c173c0fa117a 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -362,22 +362,10 @@ static struct acpi_processor_performance p; | |||
362 | */ | 362 | */ |
363 | static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) | 363 | static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) |
364 | { | 364 | { |
365 | union acpi_object arg0 = {ACPI_TYPE_BUFFER}; | ||
366 | u32 arg0_buf[3]; | ||
367 | struct acpi_object_list arg_list = {1, &arg0}; | ||
368 | unsigned long cur_freq; | 365 | unsigned long cur_freq; |
369 | int result = 0, i; | 366 | int result = 0, i; |
370 | unsigned int cpu = policy->cpu; | 367 | unsigned int cpu = policy->cpu; |
371 | 368 | ||
372 | /* _PDC settings */ | ||
373 | arg0.buffer.length = 12; | ||
374 | arg0.buffer.pointer = (u8 *) arg0_buf; | ||
375 | arg0_buf[0] = ACPI_PDC_REVISION_ID; | ||
376 | arg0_buf[1] = 1; | ||
377 | arg0_buf[2] = ACPI_PDC_EST_CAPABILITY_SMP_MSR; | ||
378 | |||
379 | p.pdc = &arg_list; | ||
380 | |||
381 | /* register with ACPI core */ | 369 | /* register with ACPI core */ |
382 | if (acpi_processor_register_performance(&p, cpu)) { | 370 | if (acpi_processor_register_performance(&p, cpu)) { |
383 | dprintk(KERN_INFO PFX "obtaining ACPI data failed\n"); | 371 | dprintk(KERN_INFO PFX "obtaining ACPI data failed\n"); |
diff --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c index 75015975d038..00f2e058797c 100644 --- a/arch/i386/kernel/cpu/cyrix.c +++ b/arch/i386/kernel/cpu/cyrix.c | |||
@@ -345,7 +345,7 @@ static void __init init_cyrix(struct cpuinfo_x86 *c) | |||
345 | /* | 345 | /* |
346 | * Handle National Semiconductor branded processors | 346 | * Handle National Semiconductor branded processors |
347 | */ | 347 | */ |
348 | static void __devinit init_nsc(struct cpuinfo_x86 *c) | 348 | static void __init init_nsc(struct cpuinfo_x86 *c) |
349 | { | 349 | { |
350 | /* There may be GX1 processors in the wild that are branded | 350 | /* There may be GX1 processors in the wild that are branded |
351 | * NSC and not Cyrix. | 351 | * NSC and not Cyrix. |
@@ -444,6 +444,14 @@ int __init cyrix_init_cpu(void) | |||
444 | 444 | ||
445 | //early_arch_initcall(cyrix_init_cpu); | 445 | //early_arch_initcall(cyrix_init_cpu); |
446 | 446 | ||
447 | static int __init cyrix_exit_cpu(void) | ||
448 | { | ||
449 | cpu_devs[X86_VENDOR_CYRIX] = NULL; | ||
450 | return 0; | ||
451 | } | ||
452 | |||
453 | late_initcall(cyrix_exit_cpu); | ||
454 | |||
447 | static struct cpu_dev nsc_cpu_dev __initdata = { | 455 | static struct cpu_dev nsc_cpu_dev __initdata = { |
448 | .c_vendor = "NSC", | 456 | .c_vendor = "NSC", |
449 | .c_ident = { "Geode by NSC" }, | 457 | .c_ident = { "Geode by NSC" }, |
@@ -458,3 +466,11 @@ int __init nsc_init_cpu(void) | |||
458 | } | 466 | } |
459 | 467 | ||
460 | //early_arch_initcall(nsc_init_cpu); | 468 | //early_arch_initcall(nsc_init_cpu); |
469 | |||
470 | static int __init nsc_exit_cpu(void) | ||
471 | { | ||
472 | cpu_devs[X86_VENDOR_NSC] = NULL; | ||
473 | return 0; | ||
474 | } | ||
475 | |||
476 | late_initcall(nsc_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index fbfd374aa336..ffe58cee0c48 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
@@ -43,13 +43,23 @@ static struct _cache_table cache_table[] __cpuinitdata = | |||
43 | { 0x2c, LVL_1_DATA, 32 }, /* 8-way set assoc, 64 byte line size */ | 43 | { 0x2c, LVL_1_DATA, 32 }, /* 8-way set assoc, 64 byte line size */ |
44 | { 0x30, LVL_1_INST, 32 }, /* 8-way set assoc, 64 byte line size */ | 44 | { 0x30, LVL_1_INST, 32 }, /* 8-way set assoc, 64 byte line size */ |
45 | { 0x39, LVL_2, 128 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 45 | { 0x39, LVL_2, 128 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
46 | { 0x3a, LVL_2, 192 }, /* 6-way set assoc, sectored cache, 64 byte line size */ | ||
46 | { 0x3b, LVL_2, 128 }, /* 2-way set assoc, sectored cache, 64 byte line size */ | 47 | { 0x3b, LVL_2, 128 }, /* 2-way set assoc, sectored cache, 64 byte line size */ |
47 | { 0x3c, LVL_2, 256 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 48 | { 0x3c, LVL_2, 256 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
49 | { 0x3d, LVL_2, 384 }, /* 6-way set assoc, sectored cache, 64 byte line size */ | ||
50 | { 0x3e, LVL_2, 512 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | ||
48 | { 0x41, LVL_2, 128 }, /* 4-way set assoc, 32 byte line size */ | 51 | { 0x41, LVL_2, 128 }, /* 4-way set assoc, 32 byte line size */ |
49 | { 0x42, LVL_2, 256 }, /* 4-way set assoc, 32 byte line size */ | 52 | { 0x42, LVL_2, 256 }, /* 4-way set assoc, 32 byte line size */ |
50 | { 0x43, LVL_2, 512 }, /* 4-way set assoc, 32 byte line size */ | 53 | { 0x43, LVL_2, 512 }, /* 4-way set assoc, 32 byte line size */ |
51 | { 0x44, LVL_2, 1024 }, /* 4-way set assoc, 32 byte line size */ | 54 | { 0x44, LVL_2, 1024 }, /* 4-way set assoc, 32 byte line size */ |
52 | { 0x45, LVL_2, 2048 }, /* 4-way set assoc, 32 byte line size */ | 55 | { 0x45, LVL_2, 2048 }, /* 4-way set assoc, 32 byte line size */ |
56 | { 0x46, LVL_3, 4096 }, /* 4-way set assoc, 64 byte line size */ | ||
57 | { 0x47, LVL_3, 8192 }, /* 8-way set assoc, 64 byte line size */ | ||
58 | { 0x49, LVL_3, 4096 }, /* 16-way set assoc, 64 byte line size */ | ||
59 | { 0x4a, LVL_3, 6144 }, /* 12-way set assoc, 64 byte line size */ | ||
60 | { 0x4b, LVL_3, 8192 }, /* 16-way set assoc, 64 byte line size */ | ||
61 | { 0x4c, LVL_3, 12288 }, /* 12-way set assoc, 64 byte line size */ | ||
62 | { 0x4d, LVL_3, 16384 }, /* 16-way set assoc, 64 byte line size */ | ||
53 | { 0x60, LVL_1_DATA, 16 }, /* 8-way set assoc, sectored cache, 64 byte line size */ | 63 | { 0x60, LVL_1_DATA, 16 }, /* 8-way set assoc, sectored cache, 64 byte line size */ |
54 | { 0x66, LVL_1_DATA, 8 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 64 | { 0x66, LVL_1_DATA, 8 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
55 | { 0x67, LVL_1_DATA, 16 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 65 | { 0x67, LVL_1_DATA, 16 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
@@ -57,6 +67,7 @@ static struct _cache_table cache_table[] __cpuinitdata = | |||
57 | { 0x70, LVL_TRACE, 12 }, /* 8-way set assoc */ | 67 | { 0x70, LVL_TRACE, 12 }, /* 8-way set assoc */ |
58 | { 0x71, LVL_TRACE, 16 }, /* 8-way set assoc */ | 68 | { 0x71, LVL_TRACE, 16 }, /* 8-way set assoc */ |
59 | { 0x72, LVL_TRACE, 32 }, /* 8-way set assoc */ | 69 | { 0x72, LVL_TRACE, 32 }, /* 8-way set assoc */ |
70 | { 0x73, LVL_TRACE, 64 }, /* 8-way set assoc */ | ||
60 | { 0x78, LVL_2, 1024 }, /* 4-way set assoc, 64 byte line size */ | 71 | { 0x78, LVL_2, 1024 }, /* 4-way set assoc, 64 byte line size */ |
61 | { 0x79, LVL_2, 128 }, /* 8-way set assoc, sectored cache, 64 byte line size */ | 72 | { 0x79, LVL_2, 128 }, /* 8-way set assoc, sectored cache, 64 byte line size */ |
62 | { 0x7a, LVL_2, 256 }, /* 8-way set assoc, sectored cache, 64 byte line size */ | 73 | { 0x7a, LVL_2, 256 }, /* 8-way set assoc, sectored cache, 64 byte line size */ |
@@ -141,6 +152,7 @@ static int __cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_le | |||
141 | return 0; | 152 | return 0; |
142 | } | 153 | } |
143 | 154 | ||
155 | /* will only be called once; __init is safe here */ | ||
144 | static int __init find_num_cache_leaves(void) | 156 | static int __init find_num_cache_leaves(void) |
145 | { | 157 | { |
146 | unsigned int eax, ebx, ecx, edx; | 158 | unsigned int eax, ebx, ecx, edx; |
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c index 1e9db198c440..3b4618bed70d 100644 --- a/arch/i386/kernel/cpu/mtrr/main.c +++ b/arch/i386/kernel/cpu/mtrr/main.c | |||
@@ -44,12 +44,10 @@ | |||
44 | #include <asm/msr.h> | 44 | #include <asm/msr.h> |
45 | #include "mtrr.h" | 45 | #include "mtrr.h" |
46 | 46 | ||
47 | #define MTRR_VERSION "2.0 (20020519)" | ||
48 | |||
49 | u32 num_var_ranges = 0; | 47 | u32 num_var_ranges = 0; |
50 | 48 | ||
51 | unsigned int *usage_table; | 49 | unsigned int *usage_table; |
52 | static DECLARE_MUTEX(main_lock); | 50 | static DECLARE_MUTEX(mtrr_sem); |
53 | 51 | ||
54 | u32 size_or_mask, size_and_mask; | 52 | u32 size_or_mask, size_and_mask; |
55 | 53 | ||
@@ -335,7 +333,7 @@ int mtrr_add_page(unsigned long base, unsigned long size, | |||
335 | /* No CPU hotplug when we change MTRR entries */ | 333 | /* No CPU hotplug when we change MTRR entries */ |
336 | lock_cpu_hotplug(); | 334 | lock_cpu_hotplug(); |
337 | /* Search for existing MTRR */ | 335 | /* Search for existing MTRR */ |
338 | down(&main_lock); | 336 | down(&mtrr_sem); |
339 | for (i = 0; i < num_var_ranges; ++i) { | 337 | for (i = 0; i < num_var_ranges; ++i) { |
340 | mtrr_if->get(i, &lbase, &lsize, <ype); | 338 | mtrr_if->get(i, &lbase, &lsize, <ype); |
341 | if (base >= lbase + lsize) | 339 | if (base >= lbase + lsize) |
@@ -373,7 +371,7 @@ int mtrr_add_page(unsigned long base, unsigned long size, | |||
373 | printk(KERN_INFO "mtrr: no more MTRRs available\n"); | 371 | printk(KERN_INFO "mtrr: no more MTRRs available\n"); |
374 | error = i; | 372 | error = i; |
375 | out: | 373 | out: |
376 | up(&main_lock); | 374 | up(&mtrr_sem); |
377 | unlock_cpu_hotplug(); | 375 | unlock_cpu_hotplug(); |
378 | return error; | 376 | return error; |
379 | } | 377 | } |
@@ -466,7 +464,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size) | |||
466 | max = num_var_ranges; | 464 | max = num_var_ranges; |
467 | /* No CPU hotplug when we change MTRR entries */ | 465 | /* No CPU hotplug when we change MTRR entries */ |
468 | lock_cpu_hotplug(); | 466 | lock_cpu_hotplug(); |
469 | down(&main_lock); | 467 | down(&mtrr_sem); |
470 | if (reg < 0) { | 468 | if (reg < 0) { |
471 | /* Search for existing MTRR */ | 469 | /* Search for existing MTRR */ |
472 | for (i = 0; i < max; ++i) { | 470 | for (i = 0; i < max; ++i) { |
@@ -505,7 +503,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size) | |||
505 | set_mtrr(reg, 0, 0, 0); | 503 | set_mtrr(reg, 0, 0, 0); |
506 | error = reg; | 504 | error = reg; |
507 | out: | 505 | out: |
508 | up(&main_lock); | 506 | up(&mtrr_sem); |
509 | unlock_cpu_hotplug(); | 507 | unlock_cpu_hotplug(); |
510 | return error; | 508 | return error; |
511 | } | 509 | } |
@@ -671,7 +669,6 @@ void __init mtrr_bp_init(void) | |||
671 | break; | 669 | break; |
672 | } | 670 | } |
673 | } | 671 | } |
674 | printk(KERN_INFO "mtrr: v%s\n",MTRR_VERSION); | ||
675 | 672 | ||
676 | if (mtrr_if) { | 673 | if (mtrr_if) { |
677 | set_num_var_ranges(); | 674 | set_num_var_ranges(); |
@@ -688,7 +685,7 @@ void mtrr_ap_init(void) | |||
688 | if (!mtrr_if || !use_intel()) | 685 | if (!mtrr_if || !use_intel()) |
689 | return; | 686 | return; |
690 | /* | 687 | /* |
691 | * Ideally we should hold main_lock here to avoid mtrr entries changed, | 688 | * Ideally we should hold mtrr_sem here to avoid mtrr entries changed, |
692 | * but this routine will be called in cpu boot time, holding the lock | 689 | * but this routine will be called in cpu boot time, holding the lock |
693 | * breaks it. This routine is called in two cases: 1.very earily time | 690 | * breaks it. This routine is called in two cases: 1.very earily time |
694 | * of software resume, when there absolutely isn't mtrr entry changes; | 691 | * of software resume, when there absolutely isn't mtrr entry changes; |
diff --git a/arch/i386/kernel/cpu/nexgen.c b/arch/i386/kernel/cpu/nexgen.c index 30898a260a5c..ad87fa58058d 100644 --- a/arch/i386/kernel/cpu/nexgen.c +++ b/arch/i386/kernel/cpu/nexgen.c | |||
@@ -61,3 +61,11 @@ int __init nexgen_init_cpu(void) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | //early_arch_initcall(nexgen_init_cpu); | 63 | //early_arch_initcall(nexgen_init_cpu); |
64 | |||
65 | static int __init nexgen_exit_cpu(void) | ||
66 | { | ||
67 | cpu_devs[X86_VENDOR_NEXGEN] = NULL; | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | late_initcall(nexgen_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/rise.c b/arch/i386/kernel/cpu/rise.c index 8602425628ca..d08d5a2811c8 100644 --- a/arch/i386/kernel/cpu/rise.c +++ b/arch/i386/kernel/cpu/rise.c | |||
@@ -51,3 +51,11 @@ int __init rise_init_cpu(void) | |||
51 | } | 51 | } |
52 | 52 | ||
53 | //early_arch_initcall(rise_init_cpu); | 53 | //early_arch_initcall(rise_init_cpu); |
54 | |||
55 | static int __init rise_exit_cpu(void) | ||
56 | { | ||
57 | cpu_devs[X86_VENDOR_RISE] = NULL; | ||
58 | return 0; | ||
59 | } | ||
60 | |||
61 | late_initcall(rise_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c index fc426380366b..bdbeb77f4e22 100644 --- a/arch/i386/kernel/cpu/transmeta.c +++ b/arch/i386/kernel/cpu/transmeta.c | |||
@@ -84,7 +84,7 @@ static void __init init_transmeta(struct cpuinfo_x86 *c) | |||
84 | #endif | 84 | #endif |
85 | } | 85 | } |
86 | 86 | ||
87 | static void transmeta_identify(struct cpuinfo_x86 * c) | 87 | static void __init transmeta_identify(struct cpuinfo_x86 * c) |
88 | { | 88 | { |
89 | u32 xlvl; | 89 | u32 xlvl; |
90 | generic_identify(c); | 90 | generic_identify(c); |
@@ -111,3 +111,11 @@ int __init transmeta_init_cpu(void) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | //early_arch_initcall(transmeta_init_cpu); | 113 | //early_arch_initcall(transmeta_init_cpu); |
114 | |||
115 | static int __init transmeta_exit_cpu(void) | ||
116 | { | ||
117 | cpu_devs[X86_VENDOR_TRANSMETA] = NULL; | ||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | late_initcall(transmeta_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/umc.c b/arch/i386/kernel/cpu/umc.c index 264fcad559d5..2cd988f6dc55 100644 --- a/arch/i386/kernel/cpu/umc.c +++ b/arch/i386/kernel/cpu/umc.c | |||
@@ -31,3 +31,11 @@ int __init umc_init_cpu(void) | |||
31 | } | 31 | } |
32 | 32 | ||
33 | //early_arch_initcall(umc_init_cpu); | 33 | //early_arch_initcall(umc_init_cpu); |
34 | |||
35 | static int __init umc_exit_cpu(void) | ||
36 | { | ||
37 | cpu_devs[X86_VENDOR_UMC] = NULL; | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | late_initcall(umc_exit_cpu); | ||
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 91a64016956e..0102f3d50e57 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -1080,7 +1080,7 @@ void __init mp_config_acpi_legacy_irqs (void) | |||
1080 | 1080 | ||
1081 | #define MAX_GSI_NUM 4096 | 1081 | #define MAX_GSI_NUM 4096 |
1082 | 1082 | ||
1083 | int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) | 1083 | int mp_register_gsi (u32 gsi, int triggering, int polarity) |
1084 | { | 1084 | { |
1085 | int ioapic = -1; | 1085 | int ioapic = -1; |
1086 | int ioapic_pin = 0; | 1086 | int ioapic_pin = 0; |
@@ -1129,7 +1129,7 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) | |||
1129 | 1129 | ||
1130 | mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); | 1130 | mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); |
1131 | 1131 | ||
1132 | if (edge_level) { | 1132 | if (triggering == ACPI_LEVEL_SENSITIVE) { |
1133 | /* | 1133 | /* |
1134 | * For PCI devices assign IRQs in order, avoiding gaps | 1134 | * For PCI devices assign IRQs in order, avoiding gaps |
1135 | * due to unused I/O APIC pins. | 1135 | * due to unused I/O APIC pins. |
@@ -1151,8 +1151,8 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) | |||
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, | 1153 | io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, |
1154 | edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1, | 1154 | triggering == ACPI_EDGE_SENSITIVE ? 0 : 1, |
1155 | active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1); | 1155 | polarity == ACPI_ACTIVE_HIGH ? 0 : 1); |
1156 | return gsi; | 1156 | return gsi; |
1157 | } | 1157 | } |
1158 | 1158 | ||
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index d661703ac1cb..63f39a7e2c96 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -138,7 +138,7 @@ static int __init check_nmi_watchdog(void) | |||
138 | if (nmi_watchdog == NMI_LOCAL_APIC) | 138 | if (nmi_watchdog == NMI_LOCAL_APIC) |
139 | smp_call_function(nmi_cpu_busy, (void *)&endflag, 0, 0); | 139 | smp_call_function(nmi_cpu_busy, (void *)&endflag, 0, 0); |
140 | 140 | ||
141 | for (cpu = 0; cpu < NR_CPUS; cpu++) | 141 | for_each_cpu(cpu) |
142 | prev_nmi_count[cpu] = per_cpu(irq_stat, cpu).__nmi_count; | 142 | prev_nmi_count[cpu] = per_cpu(irq_stat, cpu).__nmi_count; |
143 | local_irq_enable(); | 143 | local_irq_enable(); |
144 | mdelay((10*1000)/nmi_hz); // wait 10 ticks | 144 | mdelay((10*1000)/nmi_hz); // wait 10 ticks |
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 2185377fdde1..0480454ebffa 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -297,8 +297,10 @@ void show_regs(struct pt_regs * regs) | |||
297 | 297 | ||
298 | if (user_mode(regs)) | 298 | if (user_mode(regs)) |
299 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); | 299 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); |
300 | printk(" EFLAGS: %08lx %s (%s)\n", | 300 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", |
301 | regs->eflags, print_tainted(), system_utsname.release); | 301 | regs->eflags, print_tainted(), system_utsname.release, |
302 | (int)strcspn(system_utsname.version, " "), | ||
303 | system_utsname.version); | ||
302 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", | 304 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", |
303 | regs->eax,regs->ebx,regs->ecx,regs->edx); | 305 | regs->eax,regs->ebx,regs->ecx,regs->edx); |
304 | printk("ESI: %08lx EDI: %08lx EBP: %08lx", | 306 | printk("ESI: %08lx EDI: %08lx EBP: %08lx", |
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index 47675bbbb316..7c86e3c5f1c1 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c | |||
@@ -45,6 +45,15 @@ static unsigned long last_tsc_high; /* msb 32 bits of Time Stamp Counter */ | |||
45 | static unsigned long long monotonic_base; | 45 | static unsigned long long monotonic_base; |
46 | static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED; | 46 | static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED; |
47 | 47 | ||
48 | /* Avoid compensating for lost ticks before TSCs are synched */ | ||
49 | static int detect_lost_ticks; | ||
50 | static int __init start_lost_tick_compensation(void) | ||
51 | { | ||
52 | detect_lost_ticks = 1; | ||
53 | return 0; | ||
54 | } | ||
55 | late_initcall(start_lost_tick_compensation); | ||
56 | |||
48 | /* convert from cycles(64bits) => nanoseconds (64bits) | 57 | /* convert from cycles(64bits) => nanoseconds (64bits) |
49 | * basic equation: | 58 | * basic equation: |
50 | * ns = cycles / (freq / ns_per_sec) | 59 | * ns = cycles / (freq / ns_per_sec) |
@@ -196,7 +205,8 @@ static void mark_offset_tsc_hpet(void) | |||
196 | 205 | ||
197 | /* lost tick compensation */ | 206 | /* lost tick compensation */ |
198 | offset = hpet_readl(HPET_T0_CMP) - hpet_tick; | 207 | offset = hpet_readl(HPET_T0_CMP) - hpet_tick; |
199 | if (unlikely(((offset - hpet_last) > hpet_tick) && (hpet_last != 0))) { | 208 | if (unlikely(((offset - hpet_last) > hpet_tick) && (hpet_last != 0)) |
209 | && detect_lost_ticks) { | ||
200 | int lost_ticks = (offset - hpet_last) / hpet_tick; | 210 | int lost_ticks = (offset - hpet_last) / hpet_tick; |
201 | jiffies_64 += lost_ticks; | 211 | jiffies_64 += lost_ticks; |
202 | } | 212 | } |
@@ -421,7 +431,7 @@ static void mark_offset_tsc(void) | |||
421 | delta += delay_at_last_interrupt; | 431 | delta += delay_at_last_interrupt; |
422 | lost = delta/(1000000/HZ); | 432 | lost = delta/(1000000/HZ); |
423 | delay = delta%(1000000/HZ); | 433 | delay = delta%(1000000/HZ); |
424 | if (lost >= 2) { | 434 | if (lost >= 2 && detect_lost_ticks) { |
425 | jiffies_64 += lost-1; | 435 | jiffies_64 += lost-1; |
426 | 436 | ||
427 | /* sanity check to ensure we're not always losing ticks */ | 437 | /* sanity check to ensure we're not always losing ticks */ |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 0aaebf3e1cfa..b814dbdcc91e 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -166,7 +166,8 @@ static void show_trace_log_lvl(struct task_struct *task, | |||
166 | stack = (unsigned long*)context->previous_esp; | 166 | stack = (unsigned long*)context->previous_esp; |
167 | if (!stack) | 167 | if (!stack) |
168 | break; | 168 | break; |
169 | printk(KERN_EMERG " =======================\n"); | 169 | printk(log_lvl); |
170 | printk(" =======================\n"); | ||
170 | } | 171 | } |
171 | } | 172 | } |
172 | 173 | ||
@@ -239,9 +240,11 @@ void show_registers(struct pt_regs *regs) | |||
239 | } | 240 | } |
240 | print_modules(); | 241 | print_modules(); |
241 | printk(KERN_EMERG "CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\n" | 242 | printk(KERN_EMERG "CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\n" |
242 | "EFLAGS: %08lx (%s) \n", | 243 | "EFLAGS: %08lx (%s %.*s) \n", |
243 | smp_processor_id(), 0xffff & regs->xcs, regs->eip, | 244 | smp_processor_id(), 0xffff & regs->xcs, regs->eip, |
244 | print_tainted(), regs->eflags, system_utsname.release); | 245 | print_tainted(), regs->eflags, system_utsname.release, |
246 | (int)strcspn(system_utsname.version, " "), | ||
247 | system_utsname.version); | ||
245 | print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip); | 248 | print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip); |
246 | printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", | 249 | printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", |
247 | regs->eax, regs->ebx, regs->ecx, regs->edx); | 250 | regs->eax, regs->ebx, regs->ecx, regs->edx); |