diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2008-04-04 15:42:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:35 -0400 |
commit | f8924e770e048429ae13bfabe1ddad9bf1e64df7 (patch) | |
tree | e7b5c11623411ad41c541d78705087237831979b | |
parent | 746f2244065ddfbe0c5d339e309db4d2b48f185b (diff) |
x86: unify mp_bus_info
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 | 38 |
2 files changed, 40 insertions, 13 deletions
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c index 9a9819b2c5f5..9120573e2616 100644 --- a/arch/x86/kernel/mpparse_32.c +++ b/arch/x86/kernel/mpparse_32.c | |||
@@ -124,8 +124,12 @@ static void __init MP_bus_info(struct mpc_config_bus *m) | |||
124 | } | 124 | } |
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | set_bit(m->mpc_busid, mp_bus_not_pci); | 127 | if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) { |
128 | if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) { | 128 | set_bit(m->mpc_busid, mp_bus_not_pci); |
129 | #if defined(CONFIG_EISA) || defined (CONFIG_MCA) | ||
130 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; | ||
131 | #endif | ||
132 | } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) { | ||
129 | #ifdef CONFIG_X86_NUMAQ | 133 | #ifdef CONFIG_X86_NUMAQ |
130 | mpc_oem_pci_bus(m, translation_table[mpc_record]); | 134 | mpc_oem_pci_bus(m, translation_table[mpc_record]); |
131 | #endif | 135 | #endif |
@@ -134,16 +138,13 @@ static void __init MP_bus_info(struct mpc_config_bus *m) | |||
134 | mp_current_pci_id++; | 138 | mp_current_pci_id++; |
135 | #if defined(CONFIG_EISA) || defined (CONFIG_MCA) | 139 | #if defined(CONFIG_EISA) || defined (CONFIG_MCA) |
136 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI; | 140 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI; |
137 | } else if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) { | ||
138 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; | ||
139 | } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA) - 1) == 0) { | 141 | } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA) - 1) == 0) { |
140 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA; | 142 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA; |
141 | } else if (strncmp(str, BUSTYPE_MCA, sizeof(BUSTYPE_MCA) - 1) == 0) { | 143 | } else if (strncmp(str, BUSTYPE_MCA, sizeof(BUSTYPE_MCA) - 1) == 0) { |
142 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA; | 144 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA; |
143 | } else { | ||
144 | printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str); | ||
145 | #endif | 145 | #endif |
146 | } | 146 | } else |
147 | printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str); | ||
147 | } | 148 | } |
148 | 149 | ||
149 | #ifdef CONFIG_X86_IO_APIC | 150 | #ifdef CONFIG_X86_IO_APIC |
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c index 5c916383bb71..831097f2022a 100644 --- a/arch/x86/kernel/mpparse_64.c +++ b/arch/x86/kernel/mpparse_64.c | |||
@@ -92,17 +92,43 @@ static void __init MP_bus_info(struct mpc_config_bus *m) | |||
92 | 92 | ||
93 | memcpy(str, m->mpc_bustype, 6); | 93 | memcpy(str, m->mpc_bustype, 6); |
94 | str[6] = 0; | 94 | str[6] = 0; |
95 | |||
96 | #ifdef CONFIG_X86_NUMAQ | ||
97 | mpc_oem_bus_info(m, str, translation_table[mpc_record]); | ||
98 | #else | ||
95 | Dprintk("Bus #%d is %s\n", m->mpc_busid, str); | 99 | Dprintk("Bus #%d is %s\n", m->mpc_busid, str); |
100 | #endif | ||
101 | |||
102 | #if MAX_MP_BUSSES < 256 | ||
103 | if (m->mpc_busid >= MAX_MP_BUSSES) { | ||
104 | printk(KERN_WARNING "MP table busid value (%d) for bustype %s " | ||
105 | " is too large, max. supported is %d\n", | ||
106 | m->mpc_busid, str, MAX_MP_BUSSES - 1); | ||
107 | return; | ||
108 | } | ||
109 | #endif | ||
96 | 110 | ||
97 | if (strncmp(str, "ISA", 3) == 0) { | 111 | if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) { |
98 | set_bit(m->mpc_busid, mp_bus_not_pci); | 112 | set_bit(m->mpc_busid, mp_bus_not_pci); |
99 | } else if (strncmp(str, "PCI", 3) == 0) { | 113 | #if defined(CONFIG_EISA) || defined (CONFIG_MCA) |
114 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; | ||
115 | #endif | ||
116 | } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) { | ||
117 | #ifdef CONFIG_X86_NUMAQ | ||
118 | mpc_oem_pci_bus(m, translation_table[mpc_record]); | ||
119 | #endif | ||
100 | clear_bit(m->mpc_busid, mp_bus_not_pci); | 120 | clear_bit(m->mpc_busid, mp_bus_not_pci); |
101 | mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id; | 121 | mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id; |
102 | mp_current_pci_id++; | 122 | mp_current_pci_id++; |
103 | } else { | 123 | #if defined(CONFIG_EISA) || defined (CONFIG_MCA) |
104 | printk(KERN_ERR "Unknown bustype %s\n", str); | 124 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI; |
105 | } | 125 | } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA) - 1) == 0) { |
126 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA; | ||
127 | } else if (strncmp(str, BUSTYPE_MCA, sizeof(BUSTYPE_MCA) - 1) == 0) { | ||
128 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA; | ||
129 | #endif | ||
130 | } else | ||
131 | printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str); | ||
106 | } | 132 | } |
107 | 133 | ||
108 | static int bad_ioapic(unsigned long address) | 134 | static int bad_ioapic(unsigned long address) |