diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2008-04-04 15:42:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:36 -0400 |
commit | 62441bf1e0d5153dfb0cf8497df16deacff90789 (patch) | |
tree | dad63fa6e02c2496c66f23edc126bf746e549bff | |
parent | e950bea8bff23c14eb38dc706aadf197ed81abf4 (diff) |
x86: unify construct_default_ioirq_mptable
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/mpparse_32.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse_64.c | 18 |
2 files changed, 21 insertions, 12 deletions
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c index c185065c3ebc..e92c29e5fd4f 100644 --- a/arch/x86/kernel/mpparse_32.c +++ b/arch/x86/kernel/mpparse_32.c | |||
@@ -436,13 +436,13 @@ static void __init construct_default_ioirq_mptable(int mpc_default_type) | |||
436 | * If it does, we assume it's valid. | 436 | * If it does, we assume it's valid. |
437 | */ | 437 | */ |
438 | if (mpc_default_type == 5) { | 438 | if (mpc_default_type == 5) { |
439 | printk(KERN_INFO | 439 | printk(KERN_INFO "ISA/PCI bus type with no IRQ information... " |
440 | "ISA/PCI bus type with no IRQ information... falling back to ELCR\n"); | 440 | "falling back to ELCR\n"); |
441 | 441 | ||
442 | if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2) | 442 | if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2) || |
443 | || ELCR_trigger(13)) | 443 | ELCR_trigger(13)) |
444 | printk(KERN_WARNING | 444 | printk(KERN_ERR "ELCR contains invalid data... " |
445 | "ELCR contains invalid data... not using ELCR\n"); | 445 | "not using ELCR\n"); |
446 | else { | 446 | else { |
447 | printk(KERN_INFO | 447 | printk(KERN_INFO |
448 | "Using ELCR to identify PCI interrupts\n"); | 448 | "Using ELCR to identify PCI interrupts\n"); |
@@ -523,8 +523,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) | |||
523 | bus.mpc_busid = 0; | 523 | bus.mpc_busid = 0; |
524 | switch (mpc_default_type) { | 524 | switch (mpc_default_type) { |
525 | default: | 525 | default: |
526 | printk("???\n"); | 526 | printk(KERN_ERR "???\nUnknown standard configuration %d\n", |
527 | printk(KERN_ERR "Unknown standard configuration %d\n", | ||
528 | mpc_default_type); | 527 | mpc_default_type); |
529 | /* fall through */ | 528 | /* fall through */ |
530 | case 1: | 529 | case 1: |
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c index d188848a893e..11b74c9b8e01 100644 --- a/arch/x86/kernel/mpparse_64.c +++ b/arch/x86/kernel/mpparse_64.c | |||
@@ -401,10 +401,12 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) | |||
401 | * 2 CPUs, numbered 0 & 1. | 401 | * 2 CPUs, numbered 0 & 1. |
402 | */ | 402 | */ |
403 | processor.mpc_type = MP_PROCESSOR; | 403 | processor.mpc_type = MP_PROCESSOR; |
404 | processor.mpc_apicver = 0; | 404 | /* Either an integrated APIC or a discrete 82489DX. */ |
405 | processor.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01; | ||
405 | processor.mpc_cpuflag = CPU_ENABLED; | 406 | processor.mpc_cpuflag = CPU_ENABLED; |
406 | processor.mpc_cpufeature = 0; | 407 | processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | |
407 | processor.mpc_featureflag = 0; | 408 | (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask; |
409 | processor.mpc_featureflag = boot_cpu_data.x86_capability[0]; | ||
408 | processor.mpc_reserved[0] = 0; | 410 | processor.mpc_reserved[0] = 0; |
409 | processor.mpc_reserved[1] = 0; | 411 | processor.mpc_reserved[1] = 0; |
410 | for (i = 0; i < 2; i++) { | 412 | for (i = 0; i < 2; i++) { |
@@ -423,6 +425,14 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) | |||
423 | case 5: | 425 | case 5: |
424 | memcpy(bus.mpc_bustype, "ISA ", 6); | 426 | memcpy(bus.mpc_bustype, "ISA ", 6); |
425 | break; | 427 | break; |
428 | case 2: | ||
429 | case 6: | ||
430 | case 3: | ||
431 | memcpy(bus.mpc_bustype, "EISA ", 6); | ||
432 | break; | ||
433 | case 4: | ||
434 | case 7: | ||
435 | memcpy(bus.mpc_bustype, "MCA ", 6); | ||
426 | } | 436 | } |
427 | MP_bus_info(&bus); | 437 | MP_bus_info(&bus); |
428 | if (mpc_default_type > 4) { | 438 | if (mpc_default_type > 4) { |
@@ -433,7 +443,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) | |||
433 | 443 | ||
434 | ioapic.mpc_type = MP_IOAPIC; | 444 | ioapic.mpc_type = MP_IOAPIC; |
435 | ioapic.mpc_apicid = 2; | 445 | ioapic.mpc_apicid = 2; |
436 | ioapic.mpc_apicver = 0; | 446 | ioapic.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01; |
437 | ioapic.mpc_flags = MPC_APIC_USABLE; | 447 | ioapic.mpc_flags = MPC_APIC_USABLE; |
438 | ioapic.mpc_apicaddr = 0xFEC00000; | 448 | ioapic.mpc_apicaddr = 0xFEC00000; |
439 | MP_ioapic_info(&ioapic); | 449 | MP_ioapic_info(&ioapic); |