diff options
author | Jack Steiner <steiner@sgi.com> | 2008-03-28 15:12:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:33 -0400 |
commit | a65d1d644c2b65bfb99e766e7160d764b8b2bfa4 (patch) | |
tree | fe19c7b1d5fbb7089537d78383c2b89863c0377b | |
parent | ae261868658773538ddda829c50224e5851c2342 (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>
-rw-r--r-- | arch/x86/kernel/mpparse_32.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse_64.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/srat_64.c | 6 | ||||
-rw-r--r-- | include/asm-x86/apicdef.h | 9 | ||||
-rw-r--r-- | include/asm-x86/mpspec.h | 4 |
5 files changed, 17 insertions, 10 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) | |||
807 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); | 807 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); |
808 | } | 808 | } |
809 | 809 | ||
810 | void __cpuinit mp_register_lapic (u8 id, u8 enabled) | 810 | void __cpuinit mp_register_lapic (int id, u8 enabled) |
811 | { | 811 | { |
812 | if (MAX_APICS - id <= 0) { | 812 | if (MAX_APICS - id <= 0) { |
813 | printk(KERN_WARNING "Processor #%d invalid (max %d)\n", | 813 | printk(KERN_WARNING "Processor #%d invalid (max %d)\n", |
@@ -862,7 +862,7 @@ static u8 uniq_ioapic_id(u8 id) | |||
862 | return id; | 862 | return id; |
863 | } | 863 | } |
864 | 864 | ||
865 | void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base) | 865 | void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) |
866 | { | 866 | { |
867 | int idx = 0; | 867 | int idx = 0; |
868 | 868 | ||
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) | |||
633 | if (boot_cpu_physical_apicid == -1U) | 633 | if (boot_cpu_physical_apicid == -1U) |
634 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); | 634 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); |
635 | } | 635 | } |
636 | void __cpuinit mp_register_lapic(u8 id, u8 enabled) | 636 | void __cpuinit mp_register_lapic(int id, u8 enabled) |
637 | { | 637 | { |
638 | if (!enabled) { | 638 | if (!enabled) { |
639 | ++disabled_cpus; | 639 | ++disabled_cpus; |
@@ -683,7 +683,7 @@ static u8 uniq_ioapic_id(u8 id) | |||
683 | return find_first_zero_bit(used, 256); | 683 | return find_first_zero_bit(used, 256); |
684 | } | 684 | } |
685 | 685 | ||
686 | void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base) | 686 | void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) |
687 | { | 687 | { |
688 | int idx = 0; | 688 | int idx = 0; |
689 | 689 | ||
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 @@ | |||
20 | #include <asm/proto.h> | 20 | #include <asm/proto.h> |
21 | #include <asm/numa.h> | 21 | #include <asm/numa.h> |
22 | #include <asm/e820.h> | 22 | #include <asm/e820.h> |
23 | #include <asm/genapic.h> | ||
23 | 24 | ||
24 | int acpi_numa __initdata; | 25 | int acpi_numa __initdata; |
25 | 26 | ||
@@ -148,7 +149,10 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) | |||
148 | return; | 149 | return; |
149 | } | 150 | } |
150 | 151 | ||
151 | apic_id = pa->apic_id; | 152 | if (is_uv_system()) |
153 | apic_id = (pa->apic_id << 8) | pa->local_sapic_eid; | ||
154 | else | ||
155 | apic_id = pa->apic_id; | ||
152 | apicid_to_node[apic_id] = node; | 156 | apicid_to_node[apic_id] = node; |
153 | acpi_numa = 1; | 157 | acpi_numa = 1; |
154 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", | 158 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", |
diff --git a/include/asm-x86/apicdef.h b/include/asm-x86/apicdef.h index 8b244683431..6b9008c7873 100644 --- a/include/asm-x86/apicdef.h +++ b/include/asm-x86/apicdef.h | |||
@@ -133,7 +133,7 @@ | |||
133 | # define MAX_IO_APICS 64 | 133 | # define MAX_IO_APICS 64 |
134 | #else | 134 | #else |
135 | # define MAX_IO_APICS 128 | 135 | # define MAX_IO_APICS 128 |
136 | # define MAX_LOCAL_APIC 256 | 136 | # define MAX_LOCAL_APIC 32768 |
137 | #endif | 137 | #endif |
138 | 138 | ||
139 | /* | 139 | /* |
@@ -406,6 +406,9 @@ struct local_apic { | |||
406 | 406 | ||
407 | #undef u32 | 407 | #undef u32 |
408 | 408 | ||
409 | #define BAD_APICID 0xFFu | 409 | #ifdef CONFIG_X86_32 |
410 | 410 | #define BAD_APICID 0xFFu | |
411 | #else | ||
412 | #define BAD_APICID 0xFFFFu | ||
413 | #endif | ||
411 | #endif | 414 | #endif |
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h index 31bac12a97d..1f6445b147f 100644 --- a/include/asm-x86/mpspec.h +++ b/include/asm-x86/mpspec.h | |||
@@ -47,9 +47,9 @@ extern void get_smp_config(void); | |||
47 | 47 | ||
48 | void __cpuinit generic_processor_info(int apicid, int version); | 48 | void __cpuinit generic_processor_info(int apicid, int version); |
49 | #ifdef CONFIG_ACPI | 49 | #ifdef CONFIG_ACPI |
50 | extern void mp_register_lapic(u8 id, u8 enabled); | 50 | extern void mp_register_lapic(int id, u8 enabled); |
51 | extern void mp_register_lapic_address(u64 address); | 51 | extern void mp_register_lapic_address(u64 address); |
52 | extern void mp_register_ioapic(u8 id, u32 address, u32 gsi_base); | 52 | extern void mp_register_ioapic(int id, u32 address, u32 gsi_base); |
53 | extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, | 53 | extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, |
54 | u32 gsi); | 54 | u32 gsi); |
55 | extern void mp_config_acpi_legacy_irqs(void); | 55 | extern void mp_config_acpi_legacy_irqs(void); |