aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikovskiy@suse.de>2008-05-14 11:03:17 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-25 04:55:13 -0400
commit2fddb6e28e903a3ab1704cc5aac01be5a59dc05b (patch)
tree4b24d694fe60ac0be3978b9fb238fe0150328af7 /arch/x86
parentec2cd0a22e2715f776a934e01c4f8ea098324fe1 (diff)
x86: make config_irqsrc not MPspec specific
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/acpi/boot.c43
-rw-r--r--arch/x86/kernel/io_apic_32.c64
-rw-r--r--arch/x86/kernel/io_apic_64.c58
-rw-r--r--arch/x86/kernel/mpparse.c8
4 files changed, 89 insertions, 84 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index a26dd91faf0f..276ec058f683 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -969,14 +969,14 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
969 if ((bus_irq == 0) && (trigger == 3)) 969 if ((bus_irq == 0) && (trigger == 3))
970 trigger = 1; 970 trigger = 1;
971 971
972 mp_irqs[mp_irq_entries].mpc_type = MP_INTSRC; 972 mp_irqs[mp_irq_entries].mp_type = MP_INTSRC;
973 mp_irqs[mp_irq_entries].mpc_irqtype = mp_INT; 973 mp_irqs[mp_irq_entries].mp_irqtype = mp_INT;
974 mp_irqs[mp_irq_entries].mpc_irqflag = (trigger << 2) | polarity; 974 mp_irqs[mp_irq_entries].mp_irqflag = (trigger << 2) | polarity;
975 mp_irqs[mp_irq_entries].mpc_srcbus = MP_ISA_BUS; 975 mp_irqs[mp_irq_entries].mp_srcbus = MP_ISA_BUS;
976 mp_irqs[mp_irq_entries].mpc_srcbusirq = bus_irq; /* IRQ */ 976 mp_irqs[mp_irq_entries].mp_srcbusirq = bus_irq; /* IRQ */
977 mp_irqs[mp_irq_entries].mpc_dstapic = 977 mp_irqs[mp_irq_entries].mp_dstapic =
978 mp_ioapics[ioapic].mp_apicid; /* APIC ID */ 978 mp_ioapics[ioapic].mp_apicid; /* APIC ID */
979 mp_irqs[mp_irq_entries].mpc_dstirq = pin; /* INTIN# */ 979 mp_irqs[mp_irq_entries].mp_dstirq = pin; /* INTIN# */
980 980
981 if (++mp_irq_entries == MAX_IRQ_SOURCES) 981 if (++mp_irq_entries == MAX_IRQ_SOURCES)
982 panic("Max # of irq sources exceeded!!\n"); 982 panic("Max # of irq sources exceeded!!\n");
@@ -1012,12 +1012,11 @@ void __init mp_config_acpi_legacy_irqs(void)
1012 if (ioapic < 0) 1012 if (ioapic < 0)
1013 return; 1013 return;
1014 1014
1015 mp_irqs[mp_irq_entries].mpc_type = MP_INTSRC; 1015 mp_irqs[mp_irq_entries].mp_type = MP_INTSRC;
1016 mp_irqs[mp_irq_entries].mpc_irqflag = 0; /* Conforming */ 1016 mp_irqs[mp_irq_entries].mp_irqflag = 0; /* Conforming */
1017 mp_irqs[mp_irq_entries].mpc_srcbus = MP_ISA_BUS; 1017 mp_irqs[mp_irq_entries].mp_srcbus = MP_ISA_BUS;
1018#ifdef CONFIG_X86_IO_APIC 1018 mp_irqs[mp_irq_entries].mp_dstapic = mp_ioapics[ioapic].mp_apicid;
1019 mp_irqs[mp_irq_entries].mpc_dstapic = mp_ioapics[ioapic].mp_apicid; 1019
1020#endif
1021 /* 1020 /*
1022 * Use the default configuration for the IRQs 0-15. Unless 1021 * Use the default configuration for the IRQs 0-15. Unless
1023 * overridden by (MADT) interrupt source override entries. 1022 * overridden by (MADT) interrupt source override entries.
@@ -1026,17 +1025,17 @@ void __init mp_config_acpi_legacy_irqs(void)
1026 int idx; 1025 int idx;
1027 1026
1028 for (idx = 0; idx < mp_irq_entries; idx++) { 1027 for (idx = 0; idx < mp_irq_entries; idx++) {
1029 struct mpc_config_intsrc *irq = mp_irqs + idx; 1028 struct mp_config_intsrc *irq = mp_irqs + idx;
1030 1029
1031 /* Do we already have a mapping for this ISA IRQ? */ 1030 /* Do we already have a mapping for this ISA IRQ? */
1032 if (irq->mpc_srcbus == MP_ISA_BUS 1031 if (irq->mp_srcbus == MP_ISA_BUS
1033 && irq->mpc_srcbusirq == i) 1032 && irq->mp_srcbusirq == i)
1034 break; 1033 break;
1035 1034
1036 /* Do we already have a mapping for this IOAPIC pin */ 1035 /* Do we already have a mapping for this IOAPIC pin */
1037 if ((irq->mpc_dstapic == 1036 if ((irq->mp_dstapic ==
1038 mp_irqs[mp_irq_entries].mpc_dstapic) && 1037 mp_irqs[mp_irq_entries].mp_dstapic) &&
1039 (irq->mpc_dstirq == i)) 1038 (irq->mp_dstirq == i))
1040 break; 1039 break;
1041 } 1040 }
1042 1041
@@ -1045,9 +1044,9 @@ void __init mp_config_acpi_legacy_irqs(void)
1045 continue; /* IRQ already used */ 1044 continue; /* IRQ already used */
1046 } 1045 }
1047 1046
1048 mp_irqs[mp_irq_entries].mpc_irqtype = mp_INT; 1047 mp_irqs[mp_irq_entries].mp_irqtype = mp_INT;
1049 mp_irqs[mp_irq_entries].mpc_srcbusirq = i; /* Identity mapped */ 1048 mp_irqs[mp_irq_entries].mp_srcbusirq = i; /* Identity mapped */
1050 mp_irqs[mp_irq_entries].mpc_dstirq = i; 1049 mp_irqs[mp_irq_entries].mp_dstirq = i;
1051 1050
1052 if (++mp_irq_entries == MAX_IRQ_SOURCES) 1051 if (++mp_irq_entries == MAX_IRQ_SOURCES)
1053 panic("Max # of irq sources exceeded!!\n"); 1052 panic("Max # of irq sources exceeded!!\n");
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index 5af1b717236c..ea68c3e5ba1d 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -76,7 +76,7 @@ struct mp_config_ioapic mp_ioapics[MAX_IO_APICS];
76int nr_ioapics; 76int nr_ioapics;
77 77
78/* MP IRQ source entries */ 78/* MP IRQ source entries */
79struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; 79struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
80 80
81/* # of MP IRQ source entries */ 81/* # of MP IRQ source entries */
82int mp_irq_entries; 82int mp_irq_entries;
@@ -801,10 +801,10 @@ static int find_irq_entry(int apic, int pin, int type)
801 int i; 801 int i;
802 802
803 for (i = 0; i < mp_irq_entries; i++) 803 for (i = 0; i < mp_irq_entries; i++)
804 if (mp_irqs[i].mpc_irqtype == type && 804 if (mp_irqs[i].mp_irqtype == type &&
805 (mp_irqs[i].mpc_dstapic == mp_ioapics[apic].mp_apicid || 805 (mp_irqs[i].mp_dstapic == mp_ioapics[apic].mp_apicid ||
806 mp_irqs[i].mpc_dstapic == MP_APIC_ALL) && 806 mp_irqs[i].mp_dstapic == MP_APIC_ALL) &&
807 mp_irqs[i].mpc_dstirq == pin) 807 mp_irqs[i].mp_dstirq == pin)
808 return i; 808 return i;
809 809
810 return -1; 810 return -1;
@@ -818,13 +818,13 @@ static int __init find_isa_irq_pin(int irq, int type)
818 int i; 818 int i;
819 819
820 for (i = 0; i < mp_irq_entries; i++) { 820 for (i = 0; i < mp_irq_entries; i++) {
821 int lbus = mp_irqs[i].mpc_srcbus; 821 int lbus = mp_irqs[i].mp_srcbus;
822 822
823 if (test_bit(lbus, mp_bus_not_pci) && 823 if (test_bit(lbus, mp_bus_not_pci) &&
824 (mp_irqs[i].mpc_irqtype == type) && 824 (mp_irqs[i].mp_irqtype == type) &&
825 (mp_irqs[i].mpc_srcbusirq == irq)) 825 (mp_irqs[i].mp_srcbusirq == irq))
826 826
827 return mp_irqs[i].mpc_dstirq; 827 return mp_irqs[i].mp_dstirq;
828 } 828 }
829 return -1; 829 return -1;
830} 830}
@@ -834,17 +834,17 @@ static int __init find_isa_irq_apic(int irq, int type)
834 int i; 834 int i;
835 835
836 for (i = 0; i < mp_irq_entries; i++) { 836 for (i = 0; i < mp_irq_entries; i++) {
837 int lbus = mp_irqs[i].mpc_srcbus; 837 int lbus = mp_irqs[i].mp_srcbus;
838 838
839 if (test_bit(lbus, mp_bus_not_pci) && 839 if (test_bit(lbus, mp_bus_not_pci) &&
840 (mp_irqs[i].mpc_irqtype == type) && 840 (mp_irqs[i].mp_irqtype == type) &&
841 (mp_irqs[i].mpc_srcbusirq == irq)) 841 (mp_irqs[i].mp_srcbusirq == irq))
842 break; 842 break;
843 } 843 }
844 if (i < mp_irq_entries) { 844 if (i < mp_irq_entries) {
845 int apic; 845 int apic;
846 for(apic = 0; apic < nr_ioapics; apic++) { 846 for(apic = 0; apic < nr_ioapics; apic++) {
847 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mpc_dstapic) 847 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mp_dstapic)
848 return apic; 848 return apic;
849 } 849 }
850 } 850 }
@@ -869,23 +869,23 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
869 return -1; 869 return -1;
870 } 870 }
871 for (i = 0; i < mp_irq_entries; i++) { 871 for (i = 0; i < mp_irq_entries; i++) {
872 int lbus = mp_irqs[i].mpc_srcbus; 872 int lbus = mp_irqs[i].mp_srcbus;
873 873
874 for (apic = 0; apic < nr_ioapics; apic++) 874 for (apic = 0; apic < nr_ioapics; apic++)
875 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mpc_dstapic || 875 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mp_dstapic ||
876 mp_irqs[i].mpc_dstapic == MP_APIC_ALL) 876 mp_irqs[i].mp_dstapic == MP_APIC_ALL)
877 break; 877 break;
878 878
879 if (!test_bit(lbus, mp_bus_not_pci) && 879 if (!test_bit(lbus, mp_bus_not_pci) &&
880 !mp_irqs[i].mpc_irqtype && 880 !mp_irqs[i].mp_irqtype &&
881 (bus == lbus) && 881 (bus == lbus) &&
882 (slot == ((mp_irqs[i].mpc_srcbusirq >> 2) & 0x1f))) { 882 (slot == ((mp_irqs[i].mp_srcbusirq >> 2) & 0x1f))) {
883 int irq = pin_2_irq(i,apic,mp_irqs[i].mpc_dstirq); 883 int irq = pin_2_irq(i,apic,mp_irqs[i].mp_dstirq);
884 884
885 if (!(apic || IO_APIC_IRQ(irq))) 885 if (!(apic || IO_APIC_IRQ(irq)))
886 continue; 886 continue;
887 887
888 if (pin == (mp_irqs[i].mpc_srcbusirq & 3)) 888 if (pin == (mp_irqs[i].mp_srcbusirq & 3))
889 return irq; 889 return irq;
890 /* 890 /*
891 * Use the first all-but-pin matching entry as a 891 * Use the first all-but-pin matching entry as a
@@ -952,7 +952,7 @@ static int EISA_ELCR(unsigned int irq)
952 * EISA conforming in the MP table, that means its trigger type must 952 * EISA conforming in the MP table, that means its trigger type must
953 * be read in from the ELCR */ 953 * be read in from the ELCR */
954 954
955#define default_EISA_trigger(idx) (EISA_ELCR(mp_irqs[idx].mpc_srcbusirq)) 955#define default_EISA_trigger(idx) (EISA_ELCR(mp_irqs[idx].mp_srcbusirq))
956#define default_EISA_polarity(idx) default_ISA_polarity(idx) 956#define default_EISA_polarity(idx) default_ISA_polarity(idx)
957 957
958/* PCI interrupts are always polarity one level triggered, 958/* PCI interrupts are always polarity one level triggered,
@@ -969,13 +969,13 @@ static int EISA_ELCR(unsigned int irq)
969 969
970static int MPBIOS_polarity(int idx) 970static int MPBIOS_polarity(int idx)
971{ 971{
972 int bus = mp_irqs[idx].mpc_srcbus; 972 int bus = mp_irqs[idx].mp_srcbus;
973 int polarity; 973 int polarity;
974 974
975 /* 975 /*
976 * Determine IRQ line polarity (high active or low active): 976 * Determine IRQ line polarity (high active or low active):
977 */ 977 */
978 switch (mp_irqs[idx].mpc_irqflag & 3) 978 switch (mp_irqs[idx].mp_irqflag & 3)
979 { 979 {
980 case 0: /* conforms, ie. bus-type dependent polarity */ 980 case 0: /* conforms, ie. bus-type dependent polarity */
981 { 981 {
@@ -1012,13 +1012,13 @@ static int MPBIOS_polarity(int idx)
1012 1012
1013static int MPBIOS_trigger(int idx) 1013static int MPBIOS_trigger(int idx)
1014{ 1014{
1015 int bus = mp_irqs[idx].mpc_srcbus; 1015 int bus = mp_irqs[idx].mp_srcbus;
1016 int trigger; 1016 int trigger;
1017 1017
1018 /* 1018 /*
1019 * Determine IRQ trigger mode (edge or level sensitive): 1019 * Determine IRQ trigger mode (edge or level sensitive):
1020 */ 1020 */
1021 switch ((mp_irqs[idx].mpc_irqflag>>2) & 3) 1021 switch ((mp_irqs[idx].mp_irqflag>>2) & 3)
1022 { 1022 {
1023 case 0: /* conforms, ie. bus-type dependent */ 1023 case 0: /* conforms, ie. bus-type dependent */
1024 { 1024 {
@@ -1097,16 +1097,16 @@ static inline int irq_trigger(int idx)
1097static int pin_2_irq(int idx, int apic, int pin) 1097static int pin_2_irq(int idx, int apic, int pin)
1098{ 1098{
1099 int irq, i; 1099 int irq, i;
1100 int bus = mp_irqs[idx].mpc_srcbus; 1100 int bus = mp_irqs[idx].mp_srcbus;
1101 1101
1102 /* 1102 /*
1103 * Debugging check, we are in big trouble if this message pops up! 1103 * Debugging check, we are in big trouble if this message pops up!
1104 */ 1104 */
1105 if (mp_irqs[idx].mpc_dstirq != pin) 1105 if (mp_irqs[idx].mp_dstirq != pin)
1106 printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n"); 1106 printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n");
1107 1107
1108 if (test_bit(bus, mp_bus_not_pci)) 1108 if (test_bit(bus, mp_bus_not_pci))
1109 irq = mp_irqs[idx].mpc_srcbusirq; 1109 irq = mp_irqs[idx].mp_srcbusirq;
1110 else { 1110 else {
1111 /* 1111 /*
1112 * PCI IRQs are mapped in order 1112 * PCI IRQs are mapped in order
@@ -1793,8 +1793,8 @@ static void __init setup_ioapic_ids_from_mpc(void)
1793 */ 1793 */
1794 if (old_id != mp_ioapics[apic].mp_apicid) 1794 if (old_id != mp_ioapics[apic].mp_apicid)
1795 for (i = 0; i < mp_irq_entries; i++) 1795 for (i = 0; i < mp_irq_entries; i++)
1796 if (mp_irqs[i].mpc_dstapic == old_id) 1796 if (mp_irqs[i].mp_dstapic == old_id)
1797 mp_irqs[i].mpc_dstapic 1797 mp_irqs[i].mp_dstapic
1798 = mp_ioapics[apic].mp_apicid; 1798 = mp_ioapics[apic].mp_apicid;
1799 1799
1800 /* 1800 /*
@@ -2810,8 +2810,8 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)
2810 return -1; 2810 return -1;
2811 2811
2812 for (i = 0; i < mp_irq_entries; i++) 2812 for (i = 0; i < mp_irq_entries; i++)
2813 if (mp_irqs[i].mpc_irqtype == mp_INT && 2813 if (mp_irqs[i].mp_irqtype == mp_INT &&
2814 mp_irqs[i].mpc_srcbusirq == bus_irq) 2814 mp_irqs[i].mp_srcbusirq == bus_irq)
2815 break; 2815 break;
2816 if (i >= mp_irq_entries) 2816 if (i >= mp_irq_entries)
2817 return -1; 2817 return -1;
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 4555ad8c2070..e7f1476ed537 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -108,7 +108,7 @@ struct mp_config_ioapic mp_ioapics[MAX_IO_APICS];
108int nr_ioapics; 108int nr_ioapics;
109 109
110/* MP IRQ source entries */ 110/* MP IRQ source entries */
111struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; 111struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
112 112
113/* # of MP IRQ source entries */ 113/* # of MP IRQ source entries */
114int mp_irq_entries; 114int mp_irq_entries;
@@ -453,10 +453,10 @@ static int find_irq_entry(int apic, int pin, int type)
453 int i; 453 int i;
454 454
455 for (i = 0; i < mp_irq_entries; i++) 455 for (i = 0; i < mp_irq_entries; i++)
456 if (mp_irqs[i].mpc_irqtype == type && 456 if (mp_irqs[i].mp_irqtype == type &&
457 (mp_irqs[i].mpc_dstapic == mp_ioapics[apic].mp_apicid || 457 (mp_irqs[i].mp_dstapic == mp_ioapics[apic].mp_apicid ||
458 mp_irqs[i].mpc_dstapic == MP_APIC_ALL) && 458 mp_irqs[i].mp_dstapic == MP_APIC_ALL) &&
459 mp_irqs[i].mpc_dstirq == pin) 459 mp_irqs[i].mp_dstirq == pin)
460 return i; 460 return i;
461 461
462 return -1; 462 return -1;
@@ -470,13 +470,13 @@ static int __init find_isa_irq_pin(int irq, int type)
470 int i; 470 int i;
471 471
472 for (i = 0; i < mp_irq_entries; i++) { 472 for (i = 0; i < mp_irq_entries; i++) {
473 int lbus = mp_irqs[i].mpc_srcbus; 473 int lbus = mp_irqs[i].mp_srcbus;
474 474
475 if (test_bit(lbus, mp_bus_not_pci) && 475 if (test_bit(lbus, mp_bus_not_pci) &&
476 (mp_irqs[i].mpc_irqtype == type) && 476 (mp_irqs[i].mp_irqtype == type) &&
477 (mp_irqs[i].mpc_srcbusirq == irq)) 477 (mp_irqs[i].mp_srcbusirq == irq))
478 478
479 return mp_irqs[i].mpc_dstirq; 479 return mp_irqs[i].mp_dstirq;
480 } 480 }
481 return -1; 481 return -1;
482} 482}
@@ -486,17 +486,17 @@ static int __init find_isa_irq_apic(int irq, int type)
486 int i; 486 int i;
487 487
488 for (i = 0; i < mp_irq_entries; i++) { 488 for (i = 0; i < mp_irq_entries; i++) {
489 int lbus = mp_irqs[i].mpc_srcbus; 489 int lbus = mp_irqs[i].mp_srcbus;
490 490
491 if (test_bit(lbus, mp_bus_not_pci) && 491 if (test_bit(lbus, mp_bus_not_pci) &&
492 (mp_irqs[i].mpc_irqtype == type) && 492 (mp_irqs[i].mp_irqtype == type) &&
493 (mp_irqs[i].mpc_srcbusirq == irq)) 493 (mp_irqs[i].mp_srcbusirq == irq))
494 break; 494 break;
495 } 495 }
496 if (i < mp_irq_entries) { 496 if (i < mp_irq_entries) {
497 int apic; 497 int apic;
498 for(apic = 0; apic < nr_ioapics; apic++) { 498 for(apic = 0; apic < nr_ioapics; apic++) {
499 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mpc_dstapic) 499 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mp_dstapic)
500 return apic; 500 return apic;
501 } 501 }
502 } 502 }
@@ -521,23 +521,23 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
521 return -1; 521 return -1;
522 } 522 }
523 for (i = 0; i < mp_irq_entries; i++) { 523 for (i = 0; i < mp_irq_entries; i++) {
524 int lbus = mp_irqs[i].mpc_srcbus; 524 int lbus = mp_irqs[i].mp_srcbus;
525 525
526 for (apic = 0; apic < nr_ioapics; apic++) 526 for (apic = 0; apic < nr_ioapics; apic++)
527 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mpc_dstapic || 527 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mp_dstapic ||
528 mp_irqs[i].mpc_dstapic == MP_APIC_ALL) 528 mp_irqs[i].mp_dstapic == MP_APIC_ALL)
529 break; 529 break;
530 530
531 if (!test_bit(lbus, mp_bus_not_pci) && 531 if (!test_bit(lbus, mp_bus_not_pci) &&
532 !mp_irqs[i].mpc_irqtype && 532 !mp_irqs[i].mp_irqtype &&
533 (bus == lbus) && 533 (bus == lbus) &&
534 (slot == ((mp_irqs[i].mpc_srcbusirq >> 2) & 0x1f))) { 534 (slot == ((mp_irqs[i].mp_srcbusirq >> 2) & 0x1f))) {
535 int irq = pin_2_irq(i,apic,mp_irqs[i].mpc_dstirq); 535 int irq = pin_2_irq(i,apic,mp_irqs[i].mp_dstirq);
536 536
537 if (!(apic || IO_APIC_IRQ(irq))) 537 if (!(apic || IO_APIC_IRQ(irq)))
538 continue; 538 continue;
539 539
540 if (pin == (mp_irqs[i].mpc_srcbusirq & 3)) 540 if (pin == (mp_irqs[i].mp_srcbusirq & 3))
541 return irq; 541 return irq;
542 /* 542 /*
543 * Use the first all-but-pin matching entry as a 543 * Use the first all-but-pin matching entry as a
@@ -565,13 +565,13 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
565 565
566static int MPBIOS_polarity(int idx) 566static int MPBIOS_polarity(int idx)
567{ 567{
568 int bus = mp_irqs[idx].mpc_srcbus; 568 int bus = mp_irqs[idx].mp_srcbus;
569 int polarity; 569 int polarity;
570 570
571 /* 571 /*
572 * Determine IRQ line polarity (high active or low active): 572 * Determine IRQ line polarity (high active or low active):
573 */ 573 */
574 switch (mp_irqs[idx].mpc_irqflag & 3) 574 switch (mp_irqs[idx].mp_irqflag & 3)
575 { 575 {
576 case 0: /* conforms, ie. bus-type dependent polarity */ 576 case 0: /* conforms, ie. bus-type dependent polarity */
577 if (test_bit(bus, mp_bus_not_pci)) 577 if (test_bit(bus, mp_bus_not_pci))
@@ -607,13 +607,13 @@ static int MPBIOS_polarity(int idx)
607 607
608static int MPBIOS_trigger(int idx) 608static int MPBIOS_trigger(int idx)
609{ 609{
610 int bus = mp_irqs[idx].mpc_srcbus; 610 int bus = mp_irqs[idx].mp_srcbus;
611 int trigger; 611 int trigger;
612 612
613 /* 613 /*
614 * Determine IRQ trigger mode (edge or level sensitive): 614 * Determine IRQ trigger mode (edge or level sensitive):
615 */ 615 */
616 switch ((mp_irqs[idx].mpc_irqflag>>2) & 3) 616 switch ((mp_irqs[idx].mp_irqflag>>2) & 3)
617 { 617 {
618 case 0: /* conforms, ie. bus-type dependent */ 618 case 0: /* conforms, ie. bus-type dependent */
619 if (test_bit(bus, mp_bus_not_pci)) 619 if (test_bit(bus, mp_bus_not_pci))
@@ -660,16 +660,16 @@ static inline int irq_trigger(int idx)
660static int pin_2_irq(int idx, int apic, int pin) 660static int pin_2_irq(int idx, int apic, int pin)
661{ 661{
662 int irq, i; 662 int irq, i;
663 int bus = mp_irqs[idx].mpc_srcbus; 663 int bus = mp_irqs[idx].mp_srcbus;
664 664
665 /* 665 /*
666 * Debugging check, we are in big trouble if this message pops up! 666 * Debugging check, we are in big trouble if this message pops up!
667 */ 667 */
668 if (mp_irqs[idx].mpc_dstirq != pin) 668 if (mp_irqs[idx].mp_dstirq != pin)
669 printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n"); 669 printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n");
670 670
671 if (test_bit(bus, mp_bus_not_pci)) { 671 if (test_bit(bus, mp_bus_not_pci)) {
672 irq = mp_irqs[idx].mpc_srcbusirq; 672 irq = mp_irqs[idx].mp_srcbusirq;
673 } else { 673 } else {
674 /* 674 /*
675 * PCI IRQs are mapped in order 675 * PCI IRQs are mapped in order
@@ -2242,8 +2242,8 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)
2242 return -1; 2242 return -1;
2243 2243
2244 for (i = 0; i < mp_irq_entries; i++) 2244 for (i = 0; i < mp_irq_entries; i++)
2245 if (mp_irqs[i].mpc_irqtype == mp_INT && 2245 if (mp_irqs[i].mp_irqtype == mp_INT &&
2246 mp_irqs[i].mpc_srcbusirq == bus_irq) 2246 mp_irqs[i].mp_srcbusirq == bus_irq)
2247 break; 2247 break;
2248 if (i >= mp_irq_entries) 2248 if (i >= mp_irq_entries)
2249 return -1; 2249 return -1;
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 9f1e5bf7f0fb..59f051db236d 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -186,12 +186,18 @@ static void __init MP_ioapic_info(struct mpc_config_ioapic *m)
186 186
187static void __init MP_intsrc_info(struct mpc_config_intsrc *m) 187static void __init MP_intsrc_info(struct mpc_config_intsrc *m)
188{ 188{
189 mp_irqs[mp_irq_entries] = *m;
190 printk(KERN_INFO "Int: type %d, pol %d, trig %d, bus %02x," 189 printk(KERN_INFO "Int: type %d, pol %d, trig %d, bus %02x,"
191 " IRQ %02x, APIC ID %x, APIC INT %02x\n", 190 " IRQ %02x, APIC ID %x, APIC INT %02x\n",
192 m->mpc_irqtype, m->mpc_irqflag & 3, 191 m->mpc_irqtype, m->mpc_irqflag & 3,
193 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, 192 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus,
194 m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq); 193 m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq);
194 mp_irqs[mp_irq_entries].mp_dstapic = m->mpc_dstapic;
195 mp_irqs[mp_irq_entries].mp_type = m->mpc_type;
196 mp_irqs[mp_irq_entries].mp_irqtype = m->mpc_irqtype;
197 mp_irqs[mp_irq_entries].mp_irqflag = m->mpc_irqflag;
198 mp_irqs[mp_irq_entries].mp_srcbus = m->mpc_srcbus;
199 mp_irqs[mp_irq_entries].mp_srcbusirq = m->mpc_srcbusirq;
200 mp_irqs[mp_irq_entries].mp_dstirq = m->mpc_dstirq;
195 if (++mp_irq_entries == MAX_IRQ_SOURCES) 201 if (++mp_irq_entries == MAX_IRQ_SOURCES)
196 panic("Max # of irq sources exceeded!!\n"); 202 panic("Max # of irq sources exceeded!!\n");
197} 203}