diff options
Diffstat (limited to 'arch/i386/kernel')
| -rw-r--r-- | arch/i386/kernel/acpi/boot.c | 13 | ||||
| -rw-r--r-- | arch/i386/kernel/apic.c | 5 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/amd.c | 8 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/centaur.c | 8 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/common.c | 11 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/cyrix.c | 18 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/intel_cacheinfo.c | 1 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/nexgen.c | 8 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/rise.c | 8 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/transmeta.c | 10 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/umc.c | 8 | ||||
| -rw-r--r-- | arch/i386/kernel/nmi.c | 2 | ||||
| -rw-r--r-- | arch/i386/kernel/process.c | 6 | ||||
| -rw-r--r-- | arch/i386/kernel/syscall_table.S | 1 | ||||
| -rw-r--r-- | arch/i386/kernel/traps.c | 9 |
15 files changed, 103 insertions, 13 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index f21fa0d4482f..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 | ||
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index acd3f1e34ca6..f39e09ef64ec 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 0dd92a23d622..f52669ecb93f 100644 --- a/arch/i386/kernel/cpu/centaur.c +++ b/arch/i386/kernel/cpu/centaur.c | |||
| @@ -470,3 +470,11 @@ int __init centaur_init_cpu(void) | |||
| 470 | } | 470 | } |
| 471 | 471 | ||
| 472 | //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/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 af591c73345f..ffe58cee0c48 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
| @@ -152,6 +152,7 @@ static int __cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_le | |||
| 152 | return 0; | 152 | return 0; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | /* will only be called once; __init is safe here */ | ||
| 155 | static int __init find_num_cache_leaves(void) | 156 | static int __init find_num_cache_leaves(void) |
| 156 | { | 157 | { |
| 157 | unsigned int eax, ebx, ecx, edx; | 158 | unsigned int eax, ebx, ecx, edx; |
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/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/syscall_table.S b/arch/i386/kernel/syscall_table.S index 1b665928336b..5a8b3fb6d27b 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S | |||
| @@ -309,3 +309,4 @@ ENTRY(sys_call_table) | |||
| 309 | .long sys_faccessat | 309 | .long sys_faccessat |
| 310 | .long sys_pselect6 | 310 | .long sys_pselect6 |
| 311 | .long sys_ppoll | 311 | .long sys_ppoll |
| 312 | .long sys_unshare /* 310 */ | ||
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); |
