# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1213177513 -32400
# Node ID 220f3d62e272281cc9c40ac849c247b5bf6251bc
# Parent 0ed5e1c8c7784cf3cc235d46148f43f58f012411
[IA64] make acpi related files compilable.
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
xen/arch/ia64/linux-xen/Makefile | 2 +
xen/arch/ia64/linux-xen/acpi.c | 48 ++++++++++++++++++++++++++++--
xen/arch/ia64/linux-xen/acpi_numa.c | 16 +++++++++-
xen/arch/ia64/xen/Makefile | 1
xen/include/asm-ia64/linux-xen/asm/acpi.h | 3 +
xen/include/asm-ia64/linux-xen/asm/numa.h | 2 +
6 files changed, 68 insertions(+), 4 deletions(-)
diff -r 0ed5e1c8c778 -r 220f3d62e272 xen/arch/ia64/linux-xen/Makefile
--- a/xen/arch/ia64/linux-xen/Makefile Wed Jun 11 15:39:41 2008 +0900
+++ b/xen/arch/ia64/linux-xen/Makefile Wed Jun 11 18:45:13 2008 +0900
@@ -23,3 +23,5 @@ obj-y += mm_numa.o
obj-y += mm_numa.o
obj-y += perfmon.o
obj-y += perfmon_default_smpl.o
+obj-y += acpi.o
+obj-y += acpi_numa.o
diff -r 0ed5e1c8c778 -r 220f3d62e272 xen/arch/ia64/linux-xen/acpi.c
--- a/xen/arch/ia64/linux-xen/acpi.c Wed Jun 11 15:39:41 2008 +0900
+++ b/xen/arch/ia64/linux-xen/acpi.c Wed Jun 11 18:45:13 2008 +0900
@@ -51,8 +51,14 @@
#include <asm/system.h>
#include <asm/numa.h>
#include <asm/sal.h>
+#ifndef XEN
#include <asm/cyclone.h>
#include <asm/xen/hypervisor.h>
+#else
+#include <asm/hw_irq.h>
+extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
+#endif
+
#define BAD_MADT_ENTRY(entry, end) ( \
(!entry) || (unsigned long)entry + sizeof(*entry) > end || \
@@ -71,7 +77,11 @@ unsigned long acpi_wakeup_address = 0;
unsigned long acpi_wakeup_address = 0;
#ifdef CONFIG_IA64_GENERIC
+#ifndef XEN
static unsigned long __init acpi_find_rsdp(void)
+#else
+unsigned long __init acpi_find_rsdp(void)
+#endif
{
unsigned long rsdp_phys = 0;
@@ -122,8 +132,10 @@ acpi_get_sysname(void)
return "uv";
else
return "sn2";
+#ifndef XEN
} else if (is_running_on_xen() && !strcmp(hdr->oem_id, "XEN")) {
return "xen";
+#endif
}
return "dig";
@@ -300,6 +312,11 @@ acpi_parse_plat_int_src(struct acpi_subt
}
#ifdef CONFIG_HOTPLUG_CPU
+
+#ifdef XEN
+unsigned int force_cpei_retarget = 0;
+#endif
+
unsigned int can_cpei_retarget(void)
{
extern int cpe_vector;
@@ -388,7 +405,9 @@ static void __init acpi_madt_oem_check(c
*/
sal_platform_features |= IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT;
+#ifndef XEN
cyclone_setup();
+#endif
}
}
@@ -476,9 +495,17 @@ void __init acpi_numa_slit_init(struct a
slit_table = slit;
}
+#ifndef XEN
void __init
acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
-{
+#else
+void __init
+acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa__)
+#endif
+{
+#ifdef XEN
+ struct acpi_srat_cpu_affinity *pa = (struct acpi_srat_cpu_affinity
*)pa__;
+#endif
int pxm;
if (!(pa->flags & ACPI_SRAT_CPU_ENABLED))
@@ -497,9 +524,18 @@ acpi_numa_processor_affinity_init(struct
srat_num_cpus++;
}
+#ifndef XEN
void __init
acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
-{
+#else
+void __init
+acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma__)
+#endif
+{
+#ifdef XEN
+ struct acpi_srat_mem_affinity *ma =
+ (struct acpi_srat_mem_affinity *)ma__;
+#endif
unsigned long paddr, size;
int pxm;
struct node_memblk_s *p, *q, *pend;
@@ -606,6 +642,7 @@ void __init acpi_numa_arch_fixup(void)
}
#endif /* CONFIG_ACPI_NUMA */
+#ifndef XEN
/*
* success: return IRQ number (>=0)
* failure: return < 0
@@ -637,6 +674,7 @@ void acpi_unregister_gsi(u32 gsi)
iosapic_unregister_intr(gsi);
}
+#endif
static int __init acpi_parse_fadt(struct acpi_table_header *table)
{
@@ -652,7 +690,9 @@ static int __init acpi_parse_fadt(struct
fadt = (struct acpi_table_fadt *)fadt_header;
+#ifndef XEN
acpi_register_gsi(fadt->sci_interrupt, ACPI_LEVEL_SENSITIVE,
ACPI_ACTIVE_LOW);
+#endif
return 0;
}
@@ -848,6 +888,7 @@ __init void prefill_possible_map(void)
cpu_set(i, cpu_possible_map);
}
+#ifndef XEN
int acpi_map_lsapic(acpi_handle handle, int *pcpu)
{
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -913,8 +954,10 @@ int acpi_unmap_lsapic(int cpu)
}
EXPORT_SYMBOL(acpi_unmap_lsapic);
+#endif /* XEN */
#endif /* CONFIG_ACPI_HOTPLUG_CPU */
+#ifndef XEN
#ifdef CONFIG_ACPI_NUMA
static acpi_status __devinit
acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret)
@@ -1001,6 +1044,7 @@ int acpi_unregister_ioapic(acpi_handle h
}
EXPORT_SYMBOL(acpi_unregister_ioapic);
+#endif /* XEN */
/*
* acpi_save_state_mem() - save kernel state
diff -r 0ed5e1c8c778 -r 220f3d62e272 xen/arch/ia64/linux-xen/acpi_numa.c
--- a/xen/arch/ia64/linux-xen/acpi_numa.c Wed Jun 11 15:39:41 2008 +0900
+++ b/xen/arch/ia64/linux-xen/acpi_numa.c Wed Jun 11 18:45:13 2008 +0900
@@ -31,11 +31,23 @@
#include <acpi/acpi_bus.h>
#include <acpi/acmacros.h>
+#ifndef XEN
#define ACPI_NUMA 0x80000000
#define _COMPONENT ACPI_NUMA
ACPI_MODULE_NAME("numa");
-
+#else
+#define NID_INVAL -1
+#define PXM_INVAL -1
+#endif
+
+#ifndef XEN
static nodemask_t nodes_found_map = NODE_MASK_NONE;
+#else
+/* the above causes error: initializer element is not constant
+ * anyway NODE_MASK_NONE is 0 filled array.
+ */
+static nodemask_t nodes_found_map;
+#endif
/* maps to convert between proximity domain and logical node ID */
static int pxm_to_node_map[MAX_PXM_DOMAINS]
@@ -78,6 +90,7 @@ int acpi_map_pxm_to_node(int pxm)
return node;
}
+#ifndef XEN
#if 0
void __cpuinit acpi_unmap_pxm_to_node(int node)
{
@@ -261,3 +274,4 @@ int acpi_get_node(acpi_handle *handle)
return node;
}
EXPORT_SYMBOL(acpi_get_node);
+#endif /* XEN */
diff -r 0ed5e1c8c778 -r 220f3d62e272 xen/arch/ia64/xen/Makefile
--- a/xen/arch/ia64/xen/Makefile Wed Jun 11 15:39:41 2008 +0900
+++ b/xen/arch/ia64/xen/Makefile Wed Jun 11 18:45:13 2008 +0900
@@ -3,7 +3,6 @@ obj-y += relocate_kernel.o
obj-y += relocate_kernel.o
obj-y += machine_kexec.o
obj-y += crash.o
-obj-y += acpi.o
obj-y += dom0_ops.o
obj-y += domain.o
obj-y += dom_fw_asm.o
diff -r 0ed5e1c8c778 -r 220f3d62e272 xen/include/asm-ia64/linux-xen/asm/acpi.h
--- a/xen/include/asm-ia64/linux-xen/asm/acpi.h Wed Jun 11 15:39:41 2008 +0900
+++ b/xen/include/asm-ia64/linux-xen/asm/acpi.h Wed Jun 11 18:45:13 2008 +0900
@@ -36,6 +36,9 @@
#include <linux/numa.h>
#include <asm/system.h>
#include <asm/numa.h>
+#ifdef XEN
+#include <xen/nodemask.h>
+#endif
#define COMPILER_DEPENDENT_INT64 long
#define COMPILER_DEPENDENT_UINT64 unsigned long
diff -r 0ed5e1c8c778 -r 220f3d62e272 xen/include/asm-ia64/linux-xen/asm/numa.h
--- a/xen/include/asm-ia64/linux-xen/asm/numa.h Wed Jun 11 15:39:41 2008 +0900
+++ b/xen/include/asm-ia64/linux-xen/asm/numa.h Wed Jun 11 18:45:13 2008 +0900
@@ -89,6 +89,8 @@ extern int paddr_to_nid(unsigned long pa
#define phys_to_nid(paddr) paddr_to_nid(paddr)
extern int pxm_to_node(int pxm);
extern int node_to_pxm(int node);
+extern void __acpi_map_pxm_to_node(int, int);
+extern int acpi_map_pxm_to_node(int);
#endif
#endif /* _ASM_IA64_NUMA_H */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|