提交 a65d1d64 编写于 作者: J Jack Steiner 提交者: Ingo Molnar

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: NJack Steiner <steiner@sgi.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 ae261868
...@@ -807,7 +807,7 @@ void __init mp_register_lapic_address(u64 address) ...@@ -807,7 +807,7 @@ void __init mp_register_lapic_address(u64 address)
Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); 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) { if (MAX_APICS - id <= 0) {
printk(KERN_WARNING "Processor #%d invalid (max %d)\n", printk(KERN_WARNING "Processor #%d invalid (max %d)\n",
...@@ -862,7 +862,7 @@ static u8 uniq_ioapic_id(u8 id) ...@@ -862,7 +862,7 @@ static u8 uniq_ioapic_id(u8 id)
return 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; int idx = 0;
......
...@@ -633,7 +633,7 @@ void __init mp_register_lapic_address(u64 address) ...@@ -633,7 +633,7 @@ void __init mp_register_lapic_address(u64 address)
if (boot_cpu_physical_apicid == -1U) if (boot_cpu_physical_apicid == -1U)
boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); 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) { if (!enabled) {
++disabled_cpus; ++disabled_cpus;
...@@ -683,7 +683,7 @@ static u8 uniq_ioapic_id(u8 id) ...@@ -683,7 +683,7 @@ static u8 uniq_ioapic_id(u8 id)
return find_first_zero_bit(used, 256); 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; int idx = 0;
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/numa.h> #include <asm/numa.h>
#include <asm/e820.h> #include <asm/e820.h>
#include <asm/genapic.h>
int acpi_numa __initdata; int acpi_numa __initdata;
...@@ -148,6 +149,9 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) ...@@ -148,6 +149,9 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
return; return;
} }
if (is_uv_system())
apic_id = (pa->apic_id << 8) | pa->local_sapic_eid;
else
apic_id = pa->apic_id; apic_id = pa->apic_id;
apicid_to_node[apic_id] = node; apicid_to_node[apic_id] = node;
acpi_numa = 1; acpi_numa = 1;
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
# define MAX_IO_APICS 64 # define MAX_IO_APICS 64
#else #else
# define MAX_IO_APICS 128 # define MAX_IO_APICS 128
# define MAX_LOCAL_APIC 256 # define MAX_LOCAL_APIC 32768
#endif #endif
/* /*
...@@ -406,6 +406,9 @@ struct local_apic { ...@@ -406,6 +406,9 @@ struct local_apic {
#undef u32 #undef u32
#define BAD_APICID 0xFFu #ifdef CONFIG_X86_32
#define BAD_APICID 0xFFu
#else
#define BAD_APICID 0xFFFFu
#endif
#endif #endif
...@@ -47,9 +47,9 @@ extern void get_smp_config(void); ...@@ -47,9 +47,9 @@ extern void get_smp_config(void);
void __cpuinit generic_processor_info(int apicid, int version); void __cpuinit generic_processor_info(int apicid, int version);
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
extern void mp_register_lapic(u8 id, u8 enabled); extern void mp_register_lapic(int id, u8 enabled);
extern void mp_register_lapic_address(u64 address); extern void mp_register_lapic_address(u64 address);
extern void mp_register_ioapic(u8 id, u32 address, u32 gsi_base); extern void mp_register_ioapic(int id, u32 address, u32 gsi_base);
extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
u32 gsi); u32 gsi);
extern void mp_config_acpi_legacy_irqs(void); extern void mp_config_acpi_legacy_irqs(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册