diff options
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/mpparse.c | 11 |
1 files changed, 7 insertions, 4 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); |