diff options
Diffstat (limited to 'arch/i386/kernel/mpparse.c')
-rw-r--r-- | arch/i386/kernel/mpparse.c | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 8d8aa9d1796d..34d21e21e012 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -38,12 +38,6 @@ | |||
38 | int smp_found_config; | 38 | int smp_found_config; |
39 | unsigned int __initdata maxcpus = NR_CPUS; | 39 | unsigned int __initdata maxcpus = NR_CPUS; |
40 | 40 | ||
41 | #ifdef CONFIG_HOTPLUG_CPU | ||
42 | #define CPU_HOTPLUG_ENABLED (1) | ||
43 | #else | ||
44 | #define CPU_HOTPLUG_ENABLED (0) | ||
45 | #endif | ||
46 | |||
47 | /* | 41 | /* |
48 | * Various Linux-internal data structures created from the | 42 | * Various Linux-internal data structures created from the |
49 | * MP-table. | 43 | * MP-table. |
@@ -110,21 +104,6 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
110 | static int mpc_record; | 104 | static int mpc_record; |
111 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __initdata; | 105 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __initdata; |
112 | 106 | ||
113 | #ifdef CONFIG_X86_NUMAQ | ||
114 | static int MP_valid_apicid(int apicid, int version) | ||
115 | { | ||
116 | return hweight_long(apicid & 0xf) == 1 && (apicid >> 4) != 0xf; | ||
117 | } | ||
118 | #else | ||
119 | static int MP_valid_apicid(int apicid, int version) | ||
120 | { | ||
121 | if (version >= 0x14) | ||
122 | return apicid < 0xff; | ||
123 | else | ||
124 | return apicid < 0xf; | ||
125 | } | ||
126 | #endif | ||
127 | |||
128 | static void __devinit MP_processor_info (struct mpc_config_processor *m) | 107 | static void __devinit MP_processor_info (struct mpc_config_processor *m) |
129 | { | 108 | { |
130 | int ver, apicid; | 109 | int ver, apicid; |
@@ -190,12 +169,6 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) | |||
190 | 169 | ||
191 | ver = m->mpc_apicver; | 170 | ver = m->mpc_apicver; |
192 | 171 | ||
193 | if (!MP_valid_apicid(apicid, ver)) { | ||
194 | printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", | ||
195 | m->mpc_apicid, MAX_APICS); | ||
196 | return; | ||
197 | } | ||
198 | |||
199 | /* | 172 | /* |
200 | * Validate version | 173 | * Validate version |
201 | */ | 174 | */ |
@@ -225,7 +198,14 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) | |||
225 | cpu_set(num_processors, cpu_possible_map); | 198 | cpu_set(num_processors, cpu_possible_map); |
226 | num_processors++; | 199 | num_processors++; |
227 | 200 | ||
228 | if (CPU_HOTPLUG_ENABLED || (num_processors > 8)) { | 201 | /* |
202 | * Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y | ||
203 | * but we need to work other dependencies like SMP_SUSPEND etc | ||
204 | * before this can be done without some confusion. | ||
205 | * if (CPU_HOTPLUG_ENABLED || num_processors > 8) | ||
206 | * - Ashok Raj <ashok.raj@intel.com> | ||
207 | */ | ||
208 | if (num_processors > 8) { | ||
229 | switch (boot_cpu_data.x86_vendor) { | 209 | switch (boot_cpu_data.x86_vendor) { |
230 | case X86_VENDOR_INTEL: | 210 | case X86_VENDOR_INTEL: |
231 | if (!APIC_XAPIC(ver)) { | 211 | if (!APIC_XAPIC(ver)) { |
@@ -249,6 +229,13 @@ static void __init MP_bus_info (struct mpc_config_bus *m) | |||
249 | 229 | ||
250 | mpc_oem_bus_info(m, str, translation_table[mpc_record]); | 230 | mpc_oem_bus_info(m, str, translation_table[mpc_record]); |
251 | 231 | ||
232 | if (m->mpc_busid >= MAX_MP_BUSSES) { | ||
233 | printk(KERN_WARNING "MP table busid value (%d) for bustype %s " | ||
234 | " is too large, max. supported is %d\n", | ||
235 | m->mpc_busid, str, MAX_MP_BUSSES - 1); | ||
236 | return; | ||
237 | } | ||
238 | |||
252 | if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA)-1) == 0) { | 239 | if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA)-1) == 0) { |
253 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; | 240 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; |
254 | } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA)-1) == 0) { | 241 | } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA)-1) == 0) { |