aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-20 17:01:16 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-20 17:01:16 +0100
commitbb9e70bf52d7650a35cf17f595fbde8337dbb3cd (patch)
treee3e84df6316f020645f8b96789bbd8407bb38d99
parent57ac22d8993a68cf30d7f7cc3004bf709ed8d871 (diff)
downloadxen-bb9e70bf52d7650a35cf17f595fbde8337dbb3cd.tar.gz
xen-bb9e70bf52d7650a35cf17f595fbde8337dbb3cd.tar.bz2
xen-bb9e70bf52d7650a35cf17f595fbde8337dbb3cd.zip
Upgrade genapic code to 2.6.16-rc6 codebase. Remove entries from
genapic structure that Xen does not require (mostly because we do not support Visual Workstation nor IBM/Sequent NUMA-Q). Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r--xen/arch/x86/genapic/default.c18
-rw-r--r--xen/arch/x86/genapic/es7000.h14
-rw-r--r--xen/arch/x86/genapic/es7000plat.c58
-rw-r--r--xen/include/asm-x86/genapic.h17
-rw-r--r--xen/include/asm-x86/mach-bigsmp/mach_apic.h95
-rw-r--r--xen/include/asm-x86/mach-bigsmp/mach_apicdef.h4
-rw-r--r--xen/include/asm-x86/mach-default/mach_apic.h20
-rw-r--r--xen/include/asm-x86/mach-default/mach_apicdef.h2
-rw-r--r--xen/include/asm-x86/mach-default/mach_ipi.h25
-rw-r--r--xen/include/asm-x86/mach-default/mach_mpparse.h11
-rw-r--r--xen/include/asm-x86/mach-es7000/mach_apic.h20
-rw-r--r--xen/include/asm-x86/mach-es7000/mach_apicdef.h2
-rw-r--r--xen/include/asm-x86/mach-es7000/mach_mpparse.h41
-rw-r--r--xen/include/asm-x86/mach-generic/mach_apic.h23
-rw-r--r--xen/include/asm-x86/mach-generic/mach_apicdef.h1
-rw-r--r--xen/include/asm-x86/mach-generic/mach_mpparse.h12
-rw-r--r--xen/include/asm-x86/mach-summit/mach_apic.h20
-rw-r--r--xen/include/asm-x86/mach-summit/mach_apicdef.h2
-rw-r--r--xen/include/asm-x86/mach-summit/mach_mpparse.h11
19 files changed, 171 insertions, 225 deletions
diff --git a/xen/arch/x86/genapic/default.c b/xen/arch/x86/genapic/default.c
index d84cf41141..88853e0290 100644
--- a/xen/arch/x86/genapic/default.c
+++ b/xen/arch/x86/genapic/default.c
@@ -18,6 +18,15 @@
#include <asm/mach-default/mach_ipi.h>
#include <asm/mach-default/mach_mpparse.h>
+#ifdef CONFIG_HOTPLUG_CPU
+#define DEFAULT_SEND_IPI (1)
+#else
+#define DEFAULT_SEND_IPI (0)
+#endif
+
+int no_broadcast = DEFAULT_SEND_IPI;
+integer_param("no_ipi_broadcast", no_broadcast);
+
/* should be called last. */
static __init int probe_default(void)
{
@@ -25,3 +34,12 @@ static __init int probe_default(void)
}
struct genapic apic_default = APIC_INIT("default", probe_default);
+
+static int __init print_ipi_mode(void)
+{
+ if (genapic == &apic_default)
+ printk("Using IPI %sShortcut mode\n",
+ no_broadcast ? "No-" : "");
+ return 0;
+}
+__initcall(print_ipi_mode);
diff --git a/xen/arch/x86/genapic/es7000.h b/xen/arch/x86/genapic/es7000.h
index 70691f0c4c..f1e3204f5d 100644
--- a/xen/arch/x86/genapic/es7000.h
+++ b/xen/arch/x86/genapic/es7000.h
@@ -24,6 +24,15 @@
* http://www.unisys.com
*/
+/*
+ * ES7000 chipsets
+ */
+
+#define NON_UNISYS 0
+#define ES7000_CLASSIC 1
+#define ES7000_ZORRO 2
+
+
#define MIP_REG 1
#define MIP_PSAI_REG 4
@@ -104,7 +113,8 @@ struct mip_reg {
#define MIP_SW_APIC 0x1020b
#define MIP_FUNC(VALUE) (VALUE & 0xff)
-extern int parse_unisys_oem (char *oemptr, int oem_entries);
-extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length);
+extern int parse_unisys_oem (char *oemptr);
+extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
+extern void setup_unisys(void);
extern int es7000_start_cpu(int cpu, unsigned long eip);
extern void es7000_sw_apic(void);
diff --git a/xen/arch/x86/genapic/es7000plat.c b/xen/arch/x86/genapic/es7000plat.c
index 1f7150f9f9..032ac972d7 100644
--- a/xen/arch/x86/genapic/es7000plat.c
+++ b/xen/arch/x86/genapic/es7000plat.c
@@ -49,7 +49,7 @@ struct mip_reg *host_reg;
int mip_port;
unsigned long mip_addr, host_addr;
-#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT))
+#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI)
/*
* GSI override for ES7000 platforms.
@@ -60,6 +60,9 @@ static unsigned int base;
static int
es7000_rename_gsi(int ioapic, int gsi)
{
+ if (es7000_plat == ES7000_ZORRO)
+ return gsi;
+
if (!base) {
int i;
for (i = 0; i < nr_ioapics; i++)
@@ -71,14 +74,31 @@ es7000_rename_gsi(int ioapic, int gsi)
return gsi;
}
-#endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)
+#endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */
+
+void __init
+setup_unisys(void)
+{
+ /*
+ * Determine the generation of the ES7000 currently running.
+ *
+ * es7000_plat = 1 if the machine is a 5xx ES7000 box
+ * es7000_plat = 2 if the machine is a x86_64 ES7000 box
+ *
+ */
+ if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
+ es7000_plat = ES7000_ZORRO;
+ else
+ es7000_plat = ES7000_CLASSIC;
+ ioapic_renumber_irq = es7000_rename_gsi;
+}
/*
* Parse the OEM Table
*/
int __init
-parse_unisys_oem (char *oemptr, int oem_entries)
+parse_unisys_oem (char *oemptr)
{
int i;
int success = 0;
@@ -93,7 +113,7 @@ parse_unisys_oem (char *oemptr, int oem_entries)
tp += 8;
- for (i=0; i <= oem_entries; i++) {
+ for (i=0; i <= 6; i++) {
type = *tp++;
size = *tp++;
tp -= 2;
@@ -128,40 +148,24 @@ parse_unisys_oem (char *oemptr, int oem_entries)
default:
break;
}
- if (i == 6) break;
tp += size;
}
if (success < 2) {
- es7000_plat = 0;
- } else {
- printk("\nEnabling ES7000 specific features...\n");
- /*
- * Determine the generation of the ES7000 currently running.
- *
- * es7000_plat = 0 if the machine is NOT a Unisys ES7000 box
- * es7000_plat = 1 if the machine is a 5xx ES7000 box
- * es7000_plat = 2 if the machine is a x86_64 ES7000 box
- *
- */
- if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
- es7000_plat = 2;
- else
- es7000_plat = 1;
-
- ioapic_renumber_irq = es7000_rename_gsi;
- }
+ es7000_plat = NON_UNISYS;
+ } else
+ setup_unisys();
return es7000_plat;
}
int __init
-find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length)
+find_unisys_acpi_oem_table(unsigned long *oem_addr)
{
struct acpi_table_rsdp *rsdp = NULL;
unsigned long rsdp_phys = 0;
struct acpi_table_header *header = NULL;
int i;
- struct acpi_table_sdt sdt = { 0 };
+ struct acpi_table_sdt sdt;
rsdp_phys = acpi_find_rsdp();
rsdp = __va(rsdp_phys);
@@ -199,13 +203,11 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length)
acpi_table_print(header, sdt.entry[i].pa);
t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length);
addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize);
- *length = header->length;
*oem_addr = (unsigned long) addr;
return 0;
}
}
}
- Dprintk("ES7000: did not find Unisys ACPI OEM table!\n");
return -1;
}
@@ -298,7 +300,7 @@ es7000_stop_cpu(int cpu)
void __init
es7000_sw_apic()
{
- if (es7000_plat == 1) {
+ if (es7000_plat) {
int mip_status;
struct mip_reg es7000_mip_reg;
diff --git a/xen/include/asm-x86/genapic.h b/xen/include/asm-x86/genapic.h
index 3e9f9270c1..e7c1356dcb 100644
--- a/xen/include/asm-x86/genapic.h
+++ b/xen/include/asm-x86/genapic.h
@@ -34,24 +34,14 @@ struct genapic {
physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
void (*clustered_apic_check)(void);
- int (*multi_timer_check)(int apic, int irq);
int (*apicid_to_node)(int logical_apicid);
int (*cpu_to_logical_apicid)(int cpu);
int (*cpu_present_to_apicid)(int mps_cpu);
physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
- int (*mpc_apic_id)(struct mpc_config_processor *m,
- struct mpc_config_translation *t);
- void (*setup_portio_remap)(void);
int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
void (*enable_apic_mode)(void);
u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);
- /* mpparse */
- void (*mpc_oem_bus_info)(struct mpc_config_bus *, char *,
- struct mpc_config_translation *);
- void (*mpc_oem_pci_bus)(struct mpc_config_bus *,
- struct mpc_config_translation *);
-
/* When one of the next two hooks returns 1 the genapic
is switched to this. Essentially they are additional probe
functions. */
@@ -60,7 +50,6 @@ struct genapic {
int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
unsigned (*get_apic_id)(unsigned long x);
- unsigned long apic_id_mask;
unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
/* ipi */
@@ -86,19 +75,13 @@ struct genapic {
APICFUNC(init_apic_ldr), \
APICFUNC(ioapic_phys_id_map), \
APICFUNC(clustered_apic_check), \
- APICFUNC(multi_timer_check), \
APICFUNC(apicid_to_node), \
APICFUNC(cpu_to_logical_apicid), \
APICFUNC(cpu_present_to_apicid), \
APICFUNC(apicid_to_cpu_present), \
- APICFUNC(mpc_apic_id), \
- APICFUNC(setup_portio_remap), \
APICFUNC(check_phys_apicid_present), \
- APICFUNC(mpc_oem_bus_info), \
- APICFUNC(mpc_oem_pci_bus), \
APICFUNC(mps_oem_check), \
APICFUNC(get_apic_id), \
- .apic_id_mask = APIC_ID_MASK, \
APICFUNC(cpu_mask_to_apicid), \
APICFUNC(acpi_madt_oem_check), \
APICFUNC(send_IPI_mask), \
diff --git a/xen/include/asm-x86/mach-bigsmp/mach_apic.h b/xen/include/asm-x86/mach-bigsmp/mach_apic.h
index fe7d4fcec0..4a591053ba 100644
--- a/xen/include/asm-x86/mach-bigsmp/mach_apic.h
+++ b/xen/include/asm-x86/mach-bigsmp/mach_apic.h
@@ -1,17 +1,10 @@
#ifndef __ASM_MACH_APIC_H
#define __ASM_MACH_APIC_H
-#include <asm/smp.h>
-
-#define SEQUENTIAL_APICID
-#ifdef SEQUENTIAL_APICID
-#define xapic_phys_to_log_apicid(phys_apic) ( (1ul << ((phys_apic) & 0x3)) |\
- ((phys_apic<<2) & (~0xf)) )
-#elif CLUSTERED_APICID
-#define xapic_phys_to_log_apicid(phys_apic) ( (1ul << ((phys_apic) & 0x3)) |\
- ((phys_apic) & (~0xf)) )
-#endif
-
-#define NO_BALANCE_IRQ (1)
+
+
+extern u8 bios_cpu_apicid[];
+
+#define xapic_phys_to_log_apicid(cpu) (bios_cpu_apicid[cpu])
#define esr_disable (1)
static inline int apic_id_registered(void)
@@ -19,7 +12,6 @@ static inline int apic_id_registered(void)
return (1);
}
-#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
/* Round robin the irqs amoung the online cpus */
static inline cpumask_t target_cpus(void)
{
@@ -32,29 +24,34 @@ static inline cpumask_t target_cpus(void)
} while (cpu >= NR_CPUS);
return cpumask_of_cpu(cpu);
}
-#define TARGET_CPUS (target_cpus())
-#define INT_DELIVERY_MODE dest_Fixed
-#define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */
+#undef APIC_DEST_LOGICAL
+#define APIC_DEST_LOGICAL 0
+#define TARGET_CPUS (target_cpus())
+#define APIC_DFR_VALUE (APIC_DFR_FLAT)
+#define INT_DELIVERY_MODE (dest_Fixed)
+#define INT_DEST_MODE (0) /* phys delivery to target proc */
+#define NO_BALANCE_IRQ (0)
+#define WAKE_SECONDARY_VIA_INIT
+
static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
{
- return 0;
+ return (0);
}
-/* we don't use the phys_cpu_present_map to indicate apicid presence */
-static inline unsigned long check_apicid_present(int bit)
+static inline unsigned long check_apicid_present(int bit)
{
- return 1;
+ return (1);
}
-#define apicid_cluster(apicid) (apicid & 0xF0)
-
-static inline unsigned long calculate_ldr(unsigned long old)
+static inline unsigned long calculate_ldr(int cpu)
{
- unsigned long id;
- id = xapic_phys_to_log_apicid(hard_smp_processor_id());
- return ((old & ~APIC_LDR_MASK) | SET_APIC_LOGICAL_ID(id));
+ unsigned long val, id;
+ val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
+ id = xapic_phys_to_log_apicid(cpu);
+ val |= SET_APIC_LOGICAL_ID(id);
+ return val;
}
/*
@@ -67,37 +64,30 @@ static inline unsigned long calculate_ldr(unsigned long old)
static inline void init_apic_ldr(void)
{
unsigned long val;
+ int cpu = smp_processor_id();
apic_write_around(APIC_DFR, APIC_DFR_VALUE);
- val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
- val = calculate_ldr(val);
+ val = calculate_ldr(cpu);
apic_write_around(APIC_LDR, val);
}
static inline void clustered_apic_check(void)
{
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
- "Cluster", nr_ioapics);
-}
-
-static inline int multi_timer_check(int apic, int irq)
-{
- return 0;
+ "Physflat", nr_ioapics);
}
static inline int apicid_to_node(int logical_apicid)
{
- return 0;
+ return (0);
}
-extern u8 bios_cpu_apicid[];
-
static inline int cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < NR_CPUS)
- return (int)bios_cpu_apicid[mps_cpu];
- else
- return BAD_APICID;
+ return (int) bios_cpu_apicid[mps_cpu];
+
+ return BAD_APICID;
}
static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
@@ -109,32 +99,15 @@ extern u8 cpu_2_logical_apicid[];
/* Mapping from cpu number to logical apicid */
static inline int cpu_to_logical_apicid(int cpu)
{
- if (cpu >= NR_CPUS)
- return BAD_APICID;
- return (int)cpu_2_logical_apicid[cpu];
- }
-
-static inline int mpc_apic_id(struct mpc_config_processor *m,
- struct mpc_config_translation *translation_record)
-{
- printk("Processor #%d %d:%d APIC version %d\n",
- m->mpc_apicid,
- (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
- (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
- m->mpc_apicver);
- return m->mpc_apicid;
+ if (cpu >= NR_CPUS)
+ return BAD_APICID;
+ return cpu_physical_id(cpu);
}
static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
{
/* For clustered we don't have a good way to do this yet - hack */
- return physids_promote(0xFUL);
-}
-
-#define WAKE_SECONDARY_VIA_INIT
-
-static inline void setup_portio_remap(void)
-{
+ return physids_promote(0xFFL);
}
static inline void enable_apic_mode(void)
diff --git a/xen/include/asm-x86/mach-bigsmp/mach_apicdef.h b/xen/include/asm-x86/mach-bigsmp/mach_apicdef.h
index 23e58b317c..4842ed8ba2 100644
--- a/xen/include/asm-x86/mach-bigsmp/mach_apicdef.h
+++ b/xen/include/asm-x86/mach-bigsmp/mach_apicdef.h
@@ -1,11 +1,9 @@
#ifndef __ASM_MACH_APICDEF_H
#define __ASM_MACH_APICDEF_H
-#define APIC_ID_MASK (0x0F<<24)
-
static inline unsigned get_apic_id(unsigned long x)
{
- return (((x)>>24)&0x0F);
+ return (((x)>>24)&0xFF);
}
#define GET_APIC_ID(x) get_apic_id(x)
diff --git a/xen/include/asm-x86/mach-default/mach_apic.h b/xen/include/asm-x86/mach-default/mach_apic.h
index 922c2fa57a..b1c76fe27b 100644
--- a/xen/include/asm-x86/mach-default/mach_apic.h
+++ b/xen/include/asm-x86/mach-default/mach_apic.h
@@ -60,11 +60,6 @@ static inline void clustered_apic_check(void)
"Flat", nr_ioapics);
}
-static inline int multi_timer_check(int apic, int irq)
-{
- return 0;
-}
-
static inline int apicid_to_node(int logical_apicid)
{
return 0;
@@ -89,21 +84,6 @@ static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
return physid_mask_of_physid(phys_apicid);
}
-static inline int mpc_apic_id(struct mpc_config_processor *m,
- struct mpc_config_translation *translation_record)
-{
- printk("Processor #%d %d:%d APIC version %d\n",
- m->mpc_apicid,
- (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
- (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
- m->mpc_apicver);
- return (m->mpc_apicid);
-}
-
-static inline void setup_portio_remap(void)
-{
-}
-
static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
{
return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
diff --git a/xen/include/asm-x86/mach-default/mach_apicdef.h b/xen/include/asm-x86/mach-default/mach_apicdef.h
index 7bcb350c3e..db8c9237e0 100644
--- a/xen/include/asm-x86/mach-default/mach_apicdef.h
+++ b/xen/include/asm-x86/mach-default/mach_apicdef.h
@@ -1,8 +1,6 @@
#ifndef __ASM_MACH_APICDEF_H
#define __ASM_MACH_APICDEF_H
-#define APIC_ID_MASK (0xF<<24)
-
static inline unsigned get_apic_id(unsigned long x)
{
return (((x)>>24)&0xF);
diff --git a/xen/include/asm-x86/mach-default/mach_ipi.h b/xen/include/asm-x86/mach-default/mach_ipi.h
index 6f2b17a200..a1d0072e36 100644
--- a/xen/include/asm-x86/mach-default/mach_ipi.h
+++ b/xen/include/asm-x86/mach-default/mach_ipi.h
@@ -4,11 +4,32 @@
void send_IPI_mask_bitmask(cpumask_t mask, int vector);
void __send_IPI_shortcut(unsigned int shortcut, int vector);
+extern int no_broadcast;
+
static inline void send_IPI_mask(cpumask_t mask, int vector)
{
send_IPI_mask_bitmask(mask, vector);
}
+static inline void __local_send_IPI_allbutself(int vector)
+{
+ if (no_broadcast) {
+ cpumask_t mask = cpu_online_map;
+
+ cpu_clear(smp_processor_id(), mask);
+ send_IPI_mask(mask, vector);
+ } else
+ __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
+}
+
+static inline void __local_send_IPI_all(int vector)
+{
+ if (no_broadcast)
+ send_IPI_mask(cpu_online_map, vector);
+ else
+ __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
+}
+
static inline void send_IPI_allbutself(int vector)
{
/*
@@ -18,13 +39,13 @@ static inline void send_IPI_allbutself(int vector)
if (!(num_online_cpus() > 1))
return;
- __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
+ __local_send_IPI_allbutself(vector);
return;
}
static inline void send_IPI_all(int vector)
{
- __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
+ __local_send_IPI_all(vector);
}
#endif /* __ASM_MACH_IPI_H */
diff --git a/xen/include/asm-x86/mach-default/mach_mpparse.h b/xen/include/asm-x86/mach-default/mach_mpparse.h
index 1d38324825..d14108505b 100644
--- a/xen/include/asm-x86/mach-default/mach_mpparse.h
+++ b/xen/include/asm-x86/mach-default/mach_mpparse.h
@@ -1,17 +1,6 @@
#ifndef __ASM_MACH_MPPARSE_H
#define __ASM_MACH_MPPARSE_H
-static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
- struct mpc_config_translation *translation)
-{
-// Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
-}
-
-static inline void mpc_oem_pci_bus(struct mpc_config_bus *m,
- struct mpc_config_translation *translation)
-{
-}
-
static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
char *productid)
{
diff --git a/xen/include/asm-x86/mach-es7000/mach_apic.h b/xen/include/asm-x86/mach-es7000/mach_apic.h
index 1d89ed2de5..86264f01bd 100644
--- a/xen/include/asm-x86/mach-es7000/mach_apic.h
+++ b/xen/include/asm-x86/mach-es7000/mach_apic.h
@@ -89,11 +89,6 @@ static inline void clustered_apic_check(void)
"Physical Cluster" : "Logical Cluster", nr_ioapics, cpus_addr(TARGET_CPUS)[0]);
}
-static inline int multi_timer_check(int apic, int irq)
-{
- return 0;
-}
-
static inline int apicid_to_node(int logical_apicid)
{
return 0;
@@ -128,27 +123,12 @@ static inline int cpu_to_logical_apicid(int cpu)
return (int)cpu_2_logical_apicid[cpu];
}
-static inline int mpc_apic_id(struct mpc_config_processor *m, struct mpc_config_translation *unused)
-{
- printk("Processor #%d %d:%d APIC version %d\n",
- m->mpc_apicid,
- (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
- (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
- m->mpc_apicver);
- return (m->mpc_apicid);
-}
-
static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
{
/* For clustered we don't have a good way to do this yet - hack */
return physids_promote(0xff);
}
-
-static inline void setup_portio_remap(void)
-{
-}
-
extern unsigned int boot_cpu_physical_apicid;
static inline int check_phys_apicid_present(int cpu_physical_apicid)
{
diff --git a/xen/include/asm-x86/mach-es7000/mach_apicdef.h b/xen/include/asm-x86/mach-es7000/mach_apicdef.h
index a58ab5a75c..4842ed8ba2 100644
--- a/xen/include/asm-x86/mach-es7000/mach_apicdef.h
+++ b/xen/include/asm-x86/mach-es7000/mach_apicdef.h
@@ -1,8 +1,6 @@
#ifndef __ASM_MACH_APICDEF_H
#define __ASM_MACH_APICDEF_H
-#define APIC_ID_MASK (0xFF<<24)
-
static inline unsigned get_apic_id(unsigned long x)
{
return (((x)>>24)&0xFF);
diff --git a/xen/include/asm-x86/mach-es7000/mach_mpparse.h b/xen/include/asm-x86/mach-es7000/mach_mpparse.h
index a7c2658e3c..eb8b6c6665 100644
--- a/xen/include/asm-x86/mach-es7000/mach_mpparse.h
+++ b/xen/include/asm-x86/mach-es7000/mach_mpparse.h
@@ -1,39 +1,46 @@
#ifndef __ASM_MACH_MPPARSE_H
#define __ASM_MACH_MPPARSE_H
-static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
- struct mpc_config_translation *translation)
-{
- Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
-}
-
-static inline void mpc_oem_pci_bus(struct mpc_config_bus *m,
- struct mpc_config_translation *translation)
-{
-}
+#include <xen/acpi.h>
-extern int parse_unisys_oem (char *oemptr, int oem_entries);
-extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length);
+extern int parse_unisys_oem (char *oemptr);
+extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
+extern void setup_unisys(void);
static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
char *productid)
{
if (mpc->mpc_oemptr) {
struct mp_config_oemtable *oem_table =
- (struct mp_config_oemtable *)(long)mpc->mpc_oemptr;
+ (struct mp_config_oemtable *)mpc->mpc_oemptr;
if (!strncmp(oem, "UNISYS", 6))
- return parse_unisys_oem((char *)oem_table, oem_table->oem_length);
+ return parse_unisys_oem((char *)oem_table);
}
return 0;
}
+static inline int es7000_check_dsdt(void)
+{
+ struct acpi_table_header *header = NULL;
+ if(!acpi_get_table_header_early(ACPI_DSDT, &header))
+ acpi_table_print(header, 0);
+ if (!strncmp(header->oem_id, "UNISYS", 6))
+ return 1;
+ return 0;
+}
+
/* Hook from generic ACPI tables.c */
static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
unsigned long oem_addr;
- int oem_entries;
- if (!find_unisys_acpi_oem_table(&oem_addr, &oem_entries))
- return parse_unisys_oem((char *)oem_addr, oem_entries);
+ if (!find_unisys_acpi_oem_table(&oem_addr)) {
+ if (es7000_check_dsdt())
+ return parse_unisys_oem((char *)oem_addr);
+ else {
+ setup_unisys();
+ return 1;
+ }
+ }
return 0;
}
diff --git a/xen/include/asm-x86/mach-generic/mach_apic.h b/xen/include/asm-x86/mach-generic/mach_apic.h
index d9dc039da9..1e0f6b9435 100644
--- a/xen/include/asm-x86/mach-generic/mach_apic.h
+++ b/xen/include/asm-x86/mach-generic/mach_apic.h
@@ -14,13 +14,10 @@
#define init_apic_ldr (genapic->init_apic_ldr)
#define ioapic_phys_id_map (genapic->ioapic_phys_id_map)
#define clustered_apic_check (genapic->clustered_apic_check)
-#define multi_timer_check (genapic->multi_timer_check)
#define apicid_to_node (genapic->apicid_to_node)
#define cpu_to_logical_apicid (genapic->cpu_to_logical_apicid)
#define cpu_present_to_apicid (genapic->cpu_present_to_apicid)
#define apicid_to_cpu_present (genapic->apicid_to_cpu_present)
-#define mpc_apic_id (genapic->mpc_apic_id)
-#define setup_portio_remap (genapic->setup_portio_remap)
#define check_apicid_present (genapic->check_apicid_present)
#define check_phys_apicid_present (genapic->check_phys_apicid_present)
#define check_apicid_used (genapic->check_apicid_used)
@@ -28,6 +25,26 @@
#define enable_apic_mode (genapic->enable_apic_mode)
#define phys_pkg_id (genapic->phys_pkg_id)
+static inline int mpc_apic_id(struct mpc_config_processor *m,
+ struct mpc_config_translation *translation_record)
+{
+ printk("Processor #%d %d:%d APIC version %d\n",
+ m->mpc_apicid,
+ (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
+ (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
+ m->mpc_apicver);
+ return (m->mpc_apicid);
+}
+
+static inline void setup_portio_remap(void)
+{
+}
+
+static inline int multi_timer_check(int apic, int irq)
+{
+ return 0;
+}
+
extern void generic_bigsmp_probe(void);
#endif /* __ASM_MACH_APIC_H */
diff --git a/xen/include/asm-x86/mach-generic/mach_apicdef.h b/xen/include/asm-x86/mach-generic/mach_apicdef.h
index 28ed98972c..78eada8442 100644
--- a/xen/include/asm-x86/mach-generic/mach_apicdef.h
+++ b/xen/include/asm-x86/mach-generic/mach_apicdef.h
@@ -5,7 +5,6 @@
#include <asm/genapic.h>
#define GET_APIC_ID (genapic->get_apic_id)
-#define APIC_ID_MASK (genapic->apic_id_mask)
#endif
#endif
diff --git a/xen/include/asm-x86/mach-generic/mach_mpparse.h b/xen/include/asm-x86/mach-generic/mach_mpparse.h
index dbd9fce54f..b2308e9149 100644
--- a/xen/include/asm-x86/mach-generic/mach_mpparse.h
+++ b/xen/include/asm-x86/mach-generic/mach_mpparse.h
@@ -1,10 +1,16 @@
#ifndef _MACH_MPPARSE_H
#define _MACH_MPPARSE_H 1
-#include <asm/genapic.h>
+static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
+ struct mpc_config_translation *translation)
+{
+ Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
+}
-#define mpc_oem_bus_info (genapic->mpc_oem_bus_info)
-#define mpc_oem_pci_bus (genapic->mpc_oem_pci_bus)
+static inline void mpc_oem_pci_bus(struct mpc_config_bus *m,
+ struct mpc_config_translation *translation)
+{
+}
int mps_oem_check(struct mp_config_table *mpc, char *oem, char *productid);
int acpi_madt_oem_check(char *oem_id, char *oem_table_id);
diff --git a/xen/include/asm-x86/mach-summit/mach_apic.h b/xen/include/asm-x86/mach-summit/mach_apic.h
index c43074a7ae..3ba02dc276 100644
--- a/xen/include/asm-x86/mach-summit/mach_apic.h
+++ b/xen/include/asm-x86/mach-summit/mach_apic.h
@@ -68,11 +68,6 @@ static inline void init_apic_ldr(void)
apic_write_around(APIC_LDR, val);
}
-static inline int multi_timer_check(int apic, int irq)
-{
- return 0;
-}
-
static inline int apic_id_registered(void)
{
return 1;
@@ -116,21 +111,6 @@ static inline physid_mask_t apicid_to_cpu_present(int apicid)
return physid_mask_of_physid(0);
}
-static inline int mpc_apic_id(struct mpc_config_processor *m,
- struct mpc_config_translation *translation_record)
-{
- printk("Processor #%d %d:%d APIC version %d\n",
- m->mpc_apicid,
- (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
- (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
- m->mpc_apicver);
- return (m->mpc_apicid);
-}
-
-static inline void setup_portio_remap(void)
-{
-}
-
static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
{
return 1;
diff --git a/xen/include/asm-x86/mach-summit/mach_apicdef.h b/xen/include/asm-x86/mach-summit/mach_apicdef.h
index a58ab5a75c..4842ed8ba2 100644
--- a/xen/include/asm-x86/mach-summit/mach_apicdef.h
+++ b/xen/include/asm-x86/mach-summit/mach_apicdef.h
@@ -1,8 +1,6 @@
#ifndef __ASM_MACH_APICDEF_H
#define __ASM_MACH_APICDEF_H
-#define APIC_ID_MASK (0xFF<<24)
-
static inline unsigned get_apic_id(unsigned long x)
{
return (((x)>>24)&0xFF);
diff --git a/xen/include/asm-x86/mach-summit/mach_mpparse.h b/xen/include/asm-x86/mach-summit/mach_mpparse.h
index 75b06db77f..a951babe1d 100644
--- a/xen/include/asm-x86/mach-summit/mach_mpparse.h
+++ b/xen/include/asm-x86/mach-summit/mach_mpparse.h
@@ -11,17 +11,6 @@ extern void setup_summit(void);
#define setup_summit() {}
#endif
-static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
- struct mpc_config_translation *translation)
-{
- Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
-}
-
-static inline void mpc_oem_pci_bus(struct mpc_config_bus *m,
- struct mpc_config_translation *translation)
-{
-}
-
extern int usb_early_handoff;
static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
char *productid)