Commit 3bbeca78 authored by Martin J. Bligh's avatar Martin J. Bligh Committed by Linus Torvalds

[PATCH] Add ACPI hook, rename raw_phys_apicid to bios_cpu_apicid

Patch from James Cleverdon & John Stultz

This adds machine a type detection hook to the acpi code, and renames
raw_phys_apicid to bios_cpu_apicid (it's an array of apicid's to boot,
indexed by the bios' cpu numbering), and I other large machines will
need to use it later ... not necessarily using physical interrupts.
parent fbf7fcc5
......@@ -44,6 +44,8 @@
#include <asm/io_apic.h>
#include <asm/tlbflush.h>
#include <mach_apic.h>
#include <mach_mpparse.h>
#define PREFIX "ACPI: "
......@@ -126,6 +128,8 @@ acpi_parse_madt (
printk(KERN_INFO PREFIX "Local APIC address 0x%08x\n",
madt->lapic_address);
acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id);
return 0;
}
......@@ -430,8 +434,10 @@ acpi_boot_init (
#endif /*CONFIG_X86_IO_APIC*/
#ifdef CONFIG_X86_LOCAL_APIC
if (acpi_lapic && acpi_ioapic)
if (acpi_lapic && acpi_ioapic) {
smp_found_config = 1;
clustered_apic_check();
}
#endif
return 0;
......
......@@ -72,8 +72,8 @@ static unsigned int __initdata num_processors;
/* Bitmask of physically existing CPUs */
unsigned long phys_cpu_present_map;
int summit_x86 = 0;
u8 raw_phys_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
int x86_summit = 0;
u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
/*
* Intel MP BIOS table parsing routines:
......@@ -186,7 +186,7 @@ void __init MP_processor_info (struct mpc_config_processor *m)
ver = 0x10;
}
apic_version[m->mpc_apicid] = ver;
raw_phys_apicid[num_processors - 1] = m->mpc_apicid;
bios_cpu_apicid[num_processors - 1] = m->mpc_apicid;
}
static void __init MP_bus_info (struct mpc_config_bus *m)
......
......@@ -67,11 +67,11 @@ static inline int apicid_to_node(int logical_apicid)
return 0;
}
extern u8 raw_phys_apicid[];
extern u8 bios_cpu_apicid[];
static inline int cpu_present_to_apicid(int mps_cpu)
{
return (int) raw_phys_apicid[mps_cpu];
return (int) bios_cpu_apicid[mps_cpu];
}
static inline unsigned long apicid_to_cpu_present(int phys_apicid)
......
......@@ -17,4 +17,10 @@ static inline void mps_oem_check(struct mp_config_table *mpc, char *oem,
{
}
/* Hook from generic ACPI tables.c */
static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
}
#endif /* __ASM_MACH_MPPARSE_H */
......@@ -34,4 +34,9 @@ static inline void mps_oem_check(struct mp_config_table *mpc, char *oem,
mpc->mpc_oemsize);
}
/* Hook from generic ACPI tables.c */
static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
}
#endif /* __ASM_MACH_MPPARSE_H */
......@@ -45,7 +45,7 @@ static inline int apicid_to_node(int logical_apicid)
static inline int cpu_present_to_apicid(int mps_cpu)
{
if (x86_summit)
return (int) raw_phys_apicid[mps_cpu];
return (int) bios_cpu_apicid[mps_cpu];
else
return mps_cpu;
}
......
......@@ -19,4 +19,10 @@ static inline void mps_oem_check(struct mp_config_table *mpc, char *oem,
x86_summit = 1;
}
/* Hook from generic ACPI tables.c */
static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
if (!strncmp(oem_id, "IBM", 3) && !strncmp(oem_table_id, "SERVIGIL", 8))
x86_summit = 1;
}
#endif /* __ASM_MACH_MPPARSE_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment