[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Fix ia64 tools build



Hi,

22066:eccfdeb41b80 replaced tools/libxc/ia64/aclinux.h with 
xen/include/acpi/platform/aclinux.h.

In fact, the former differs from the latter: the former supports
non-kernel codes, but the latter does not support it because
17814:9af7a535225f removed it.

Thus tools cannot be built on ia64.

This patch adds #ifdef __XEN__ and copies non-kernel support codes in
the former.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
-- 
  KUWAMURA Shin'ya
# HG changeset patch
# User KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
# Date 1283396295 -32400
# Node ID 6367f64a1c3529ac2702bfa498cc2500db39ec65
# Parent  c7405a5e2d6df9dcc9c0344da47f45ea8c884b23
Fix ia64 tools build

22066:eccfdeb41b80 replaced tools/libxc/ia64/aclinux.h with
xen/include/acpi/platform/aclinux.h.

In fact, the former differs from the latter: the former supports
non-kernel codes, but the latter does not support it because
17814:9af7a535225f removed it.

Thus tools cannot be built on ia64.

This patch adds #ifdef __XEN__ and copies non-kernel support codes in
the former.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>

diff -r c7405a5e2d6d -r 6367f64a1c35 xen/include/acpi/platform/aclinux.h
--- a/xen/include/acpi/platform/aclinux.h       Thu Sep 02 10:59:50 2010 +0900
+++ b/xen/include/acpi/platform/aclinux.h       Thu Sep 02 11:58:15 2010 +0900
@@ -47,6 +47,8 @@
 #define ACPI_USE_SYSTEM_CLIBRARY
 #define ACPI_USE_DO_WHILE_0
 
+#ifdef __XEN__
+
 #include <xen/config.h>
 #include <xen/cache.h>
 #include <xen/string.h>
@@ -70,6 +72,50 @@
 /* Full namespace pathname length limit - arbitrary */
 #define ACPI_PATHNAME_MAX              256
 
+#else /* !__XEN__ */
+
+#include <stdarg.h>
+#include <string.h>
+//#include <stdlib.h>
+#include <ctype.h>
+#include <unistd.h>
+
+#if defined(__ia64__) || defined(__x86_64__)
+#define ACPI_MACHINE_WIDTH          64
+#define COMPILER_DEPENDENT_INT64    long
+#define COMPILER_DEPENDENT_UINT64   unsigned long
+#else
+#define ACPI_MACHINE_WIDTH          32
+#define COMPILER_DEPENDENT_INT64    long long
+#define COMPILER_DEPENDENT_UINT64   unsigned long long
+#define ACPI_USE_NATIVE_DIVIDE
+#endif
+
+typedef int8_t         s8;
+typedef uint8_t                u8;
+typedef int16_t                s16;
+typedef uint16_t       u16;
+typedef int32_t                s32;
+typedef uint32_t       u32;
+typedef int64_t                s64;
+typedef uint64_t       u64;
+#define __iomem
+#ifdef __ia64__
+#ifdef __cplusplus
+#define CPP_ASMLINKAGE extern "C"
+#else
+#define CPP_ASMLINKAGE
+#endif
+#define asmlinkage CPP_ASMLINKAGE __attribute__((syscall_linkage))
+#endif
+#define CONFIG_ACPI_BOOT       1
+
+#define __cdecl
+#define ACPI_FLUSH_CPU_CACHE()
+#endif /* __XEN__ */
+
+/* Linux uses GCC */
+
 #include "acgcc.h"
 
 #define acpi_cpu_flags unsigned long
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.