WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH 4/5] make acpi related files compile.

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 4/5] make acpi related files compile.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 12 Jun 2008 18:05:18 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Thu, 12 Jun 2008 02:08:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1213177513 -32400
# Node ID c918cf266e853ede979136b5993d889244c3da4f
# Parent  471049ae911966d1eebeb78a5c5cee975379c5eb
[IA64] make acpi related files compilable.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff --git a/xen/arch/ia64/linux-xen/Makefile b/xen/arch/ia64/linux-xen/Makefile
--- a/xen/arch/ia64/linux-xen/Makefile
+++ b/xen/arch/ia64/linux-xen/Makefile
@@ -23,3 +23,5 @@
 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 --git a/xen/arch/ia64/linux-xen/acpi.c b/xen/arch/ia64/linux-xen/acpi.c
--- a/xen/arch/ia64/linux-xen/acpi.c
+++ b/xen/arch/ia64/linux-xen/acpi.c
@@ -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;
 
 #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 @@
                        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 @@
 }
 
 #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 @@
                 */
                sal_platform_features |= IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT;
 
+#ifndef XEN
                cyclone_setup();
+#endif
        }
 }
 
@@ -476,9 +495,17 @@
        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 @@
        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 @@
 }
 #endif                         /* CONFIG_ACPI_NUMA */
 
+#ifndef XEN
 /*
  * success: return IRQ number (>=0)
  * failure: return < 0
@@ -637,6 +674,7 @@
 
        iosapic_unregister_intr(gsi);
 }
+#endif
 
 static int __init acpi_parse_fadt(struct acpi_table_header *table)
 {
@@ -652,7 +690,9 @@
 
        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 @@
                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 @@
 }
 
 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 @@
 }
 
 EXPORT_SYMBOL(acpi_unregister_ioapic);
+#endif /* XEN */
 
 /*
  * acpi_save_state_mem() - save kernel state
diff --git a/xen/arch/ia64/linux-xen/acpi_numa.c 
b/xen/arch/ia64/linux-xen/acpi_numa.c
--- a/xen/arch/ia64/linux-xen/acpi_numa.c
+++ b/xen/arch/ia64/linux-xen/acpi_numa.c
@@ -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 @@
        return node;
 }
 
+#ifndef XEN
 #if 0
 void __cpuinit acpi_unmap_pxm_to_node(int node)
 {
@@ -261,3 +274,4 @@
        return node;
 }
 EXPORT_SYMBOL(acpi_get_node);
+#endif /* XEN */
diff --git a/xen/arch/ia64/xen/Makefile b/xen/arch/ia64/xen/Makefile
--- a/xen/arch/ia64/xen/Makefile
+++ b/xen/arch/ia64/xen/Makefile
@@ -3,7 +3,6 @@
 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 --git a/xen/include/asm-ia64/linux-xen/asm/acpi.h 
b/xen/include/asm-ia64/linux-xen/asm/acpi.h
--- a/xen/include/asm-ia64/linux-xen/asm/acpi.h
+++ b/xen/include/asm-ia64/linux-xen/asm/acpi.h
@@ -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 --git a/xen/include/asm-ia64/linux-xen/asm/numa.h 
b/xen/include/asm-ia64/linux-xen/asm/numa.h
--- a/xen/include/asm-ia64/linux-xen/asm/numa.h
+++ b/xen/include/asm-ia64/linux-xen/asm/numa.h
@@ -89,6 +89,8 @@
 #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 */

Attachment: 6-make_acpi_related_files_complie.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH 4/5] make acpi related files compile., Isaku Yamahata <=