diff options
| -rw-r--r-- | arch/x86_64/kernel/mpparse.c | 11 | ||||
| -rw-r--r-- | include/asm-x86_64/mpspec.h | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 1d61f10a92c6..1105250bf02c 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
| @@ -42,7 +42,7 @@ int acpi_found_madt; | |||
| 42 | * Various Linux-internal data structures created from the | 42 | * Various Linux-internal data structures created from the |
| 43 | * MP-table. | 43 | * MP-table. |
| 44 | */ | 44 | */ |
| 45 | int apic_version [MAX_APICS]; | 45 | unsigned char apic_version [MAX_APICS]; |
| 46 | unsigned char mp_bus_id_to_type [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; | 46 | unsigned char mp_bus_id_to_type [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; |
| 47 | int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; | 47 | int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; |
| 48 | 48 | ||
| @@ -108,7 +108,8 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
| 108 | 108 | ||
| 109 | static void __init MP_processor_info (struct mpc_config_processor *m) | 109 | static void __init MP_processor_info (struct mpc_config_processor *m) |
| 110 | { | 110 | { |
| 111 | int ver, cpu; | 111 | int cpu; |
| 112 | unsigned char ver; | ||
| 112 | static int found_bsp=0; | 113 | static int found_bsp=0; |
| 113 | 114 | ||
| 114 | if (!(m->mpc_cpuflag & CPU_ENABLED)) { | 115 | if (!(m->mpc_cpuflag & CPU_ENABLED)) { |
| @@ -133,12 +134,14 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
| 133 | } | 134 | } |
| 134 | 135 | ||
| 135 | cpu = num_processors++; | 136 | cpu = num_processors++; |
| 136 | 137 | ||
| 137 | if (m->mpc_apicid > MAX_APICS) { | 138 | #if MAX_APICS < 255 |
| 139 | if ((int)m->mpc_apicid > MAX_APICS) { | ||
| 138 | printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", | 140 | printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", |
| 139 | m->mpc_apicid, MAX_APICS); | 141 | m->mpc_apicid, MAX_APICS); |
| 140 | return; | 142 | return; |
| 141 | } | 143 | } |
| 144 | #endif | ||
| 142 | ver = m->mpc_apicver; | 145 | ver = m->mpc_apicver; |
| 143 | 146 | ||
| 144 | physid_set(m->mpc_apicid, phys_cpu_present_map); | 147 | physid_set(m->mpc_apicid, phys_cpu_present_map); |
diff --git a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h index 6b375384f5c2..6f8a17d105ab 100644 --- a/include/asm-x86_64/mpspec.h +++ b/include/asm-x86_64/mpspec.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | /* | 16 | /* |
| 17 | * A maximum of 255 APICs with the current APIC ID architecture. | 17 | * A maximum of 255 APICs with the current APIC ID architecture. |
| 18 | */ | 18 | */ |
| 19 | #define MAX_APICS 128 | 19 | #define MAX_APICS 255 |
| 20 | 20 | ||
| 21 | struct intel_mp_floating | 21 | struct intel_mp_floating |
| 22 | { | 22 | { |
| @@ -173,7 +173,7 @@ extern int smp_found_config; | |||
| 173 | extern void find_smp_config (void); | 173 | extern void find_smp_config (void); |
| 174 | extern void get_smp_config (void); | 174 | extern void get_smp_config (void); |
| 175 | extern int nr_ioapics; | 175 | extern int nr_ioapics; |
| 176 | extern int apic_version [MAX_APICS]; | 176 | extern unsigned char apic_version [MAX_APICS]; |
| 177 | extern int mp_irq_entries; | 177 | extern int mp_irq_entries; |
| 178 | extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES]; | 178 | extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES]; |
| 179 | extern int mpc_default_type; | 179 | extern int mpc_default_type; |
