]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: unify construct_default_ioirq_mptable
authorAlexey Starikovskiy <astarikovskiy@suse.de>
Fri, 4 Apr 2008 19:42:34 +0000 (23:42 +0400)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:36 +0000 (17:41 +0200)
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/mpparse_32.c
arch/x86/kernel/mpparse_64.c

index c185065c3ebcebaa78fbe4f83add12aae84f1d19..e92c29e5fd4f9d9b856d64dfe0d7dcb543c0dd99 100644 (file)
@@ -436,13 +436,13 @@ static void __init construct_default_ioirq_mptable(int mpc_default_type)
         *  If it does, we assume it's valid.
         */
        if (mpc_default_type == 5) {
-               printk(KERN_INFO
-                      "ISA/PCI bus type with no IRQ information... falling back to ELCR\n");
+               printk(KERN_INFO "ISA/PCI bus type with no IRQ information... "
+                      "falling back to ELCR\n");
 
-               if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2)
-                   || ELCR_trigger(13))
-                       printk(KERN_WARNING
-                              "ELCR contains invalid data... not using ELCR\n");
+               if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2) ||
+                   ELCR_trigger(13))
+                       printk(KERN_ERR "ELCR contains invalid data... "
+                              "not using ELCR\n");
                else {
                        printk(KERN_INFO
                               "Using ELCR to identify PCI interrupts\n");
@@ -523,8 +523,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
        bus.mpc_busid = 0;
        switch (mpc_default_type) {
        default:
-               printk("???\n");
-               printk(KERN_ERR "Unknown standard configuration %d\n",
+               printk(KERN_ERR "???\nUnknown standard configuration %d\n",
                       mpc_default_type);
                /* fall through */
        case 1:
index d188848a893eac8b4ea6df5a8582d43306c29a31..11b74c9b8e017d57701be81163eb3edc25030b03 100644 (file)
@@ -401,10 +401,12 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
         * 2 CPUs, numbered 0 & 1.
         */
        processor.mpc_type = MP_PROCESSOR;
-       processor.mpc_apicver = 0;
+       /* Either an integrated APIC or a discrete 82489DX. */
+       processor.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01;
        processor.mpc_cpuflag = CPU_ENABLED;
-       processor.mpc_cpufeature = 0;
-       processor.mpc_featureflag = 0;
+       processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) |
+           (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask;
+       processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
        processor.mpc_reserved[0] = 0;
        processor.mpc_reserved[1] = 0;
        for (i = 0; i < 2; i++) {
@@ -423,6 +425,14 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
        case 5:
                memcpy(bus.mpc_bustype, "ISA   ", 6);
                break;
+       case 2:
+       case 6:
+       case 3:
+               memcpy(bus.mpc_bustype, "EISA  ", 6);
+               break;
+       case 4:
+       case 7:
+               memcpy(bus.mpc_bustype, "MCA   ", 6);
        }
        MP_bus_info(&bus);
        if (mpc_default_type > 4) {
@@ -433,7 +443,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
 
        ioapic.mpc_type = MP_IOAPIC;
        ioapic.mpc_apicid = 2;
-       ioapic.mpc_apicver = 0;
+       ioapic.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01;
        ioapic.mpc_flags = MPC_APIC_USABLE;
        ioapic.mpc_apicaddr = 0xFEC00000;
        MP_ioapic_info(&ioapic);