aboutsummaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2008-03-28 14:12:08 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:41:33 +0200
commita65d1d644c2b65bfb99e766e7160d764b8b2bfa4 (patch)
treefe19c7b1d5fbb7089537d78383c2b89863c0377b /arch/x86
parentae261868658773538ddda829c50224e5851c2342 (diff)
x86: increase size of APICID
Increase the number of bits in an apicid from 8 to 32. By default, MP_processor_info() gets the APICID from the mpc_config_processor structure. However, this structure limits the size of APICID to 8 bits. This patch allows the caller of MP_processor_info() to optionally pass a larger APICID that will be used instead of the one in the mpc_config_processor struct. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/mpparse_32.c4
-rw-r--r--arch/x86/kernel/mpparse_64.c4
-rw-r--r--arch/x86/mm/srat_64.c6
3 files changed, 9 insertions, 5 deletions
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c
index 4b46a37e063..7b7e008496e 100644
--- a/arch/x86/kernel/mpparse_32.c
+++ b/arch/x86/kernel/mpparse_32.c
@@ -807,7 +807,7 @@ void __init mp_register_lapic_address(u64 address)
Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
}
-void __cpuinit mp_register_lapic (u8 id, u8 enabled)
+void __cpuinit mp_register_lapic (int id, u8 enabled)
{
if (MAX_APICS - id <= 0) {
printk(KERN_WARNING "Processor #%d invalid (max %d)\n",
@@ -862,7 +862,7 @@ static u8 uniq_ioapic_id(u8 id)
return id;
}
-void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
+void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
{
int idx = 0;
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c
index 29d2c40e54a..4840a846904 100644
--- a/arch/x86/kernel/mpparse_64.c
+++ b/arch/x86/kernel/mpparse_64.c
@@ -633,7 +633,7 @@ void __init mp_register_lapic_address(u64 address)
if (boot_cpu_physical_apicid == -1U)
boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
}
-void __cpuinit mp_register_lapic(u8 id, u8 enabled)
+void __cpuinit mp_register_lapic(int id, u8 enabled)
{
if (!enabled) {
++disabled_cpus;
@@ -683,7 +683,7 @@ static u8 uniq_ioapic_id(u8 id)
return find_first_zero_bit(used, 256);
}
-void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
+void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
{
int idx = 0;
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index 04e06c8226e..1bae9c855ce 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -20,6 +20,7 @@
#include <asm/proto.h>
#include <asm/numa.h>
#include <asm/e820.h>
+#include <asm/genapic.h>
int acpi_numa __initdata;
@@ -148,7 +149,10 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
return;
}
- apic_id = pa->apic_id;
+ if (is_uv_system())
+ apic_id = (pa->apic_id << 8) | pa->local_sapic_eid;
+ else
+ apic_id = pa->apic_id;
apicid_to_node[apic_id] = node;
acpi_numa = 1;
printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",