Skip to contentSkip to conversation

arm: start working on ARM

PATCH In review 류재민 1 participant 1 message Feb 13, 2012

lore
Share & tools
lore

류재민

author
#0 lore raw

PATCH 1/14 arm: start working on ARM

arm: start working on ARM.

Config.mk                 |  1 +
xen/Rules.mk              |  2 +-
xen/common/kexec.c        |  2 ++
xen/common/sysctl.c       |  8 ++++++++
xen/common/tmem_xen.c     |  2 +-
xen/drivers/Makefile      |  2 ++
xen/drivers/char/Makefile |  2 ++
xen/include/public/xen.h  |  2 ++
xen/include/xen/libelf.h  |  2 +-
9 files changed, 20 insertions(+), 3 deletions(-)
Signed-off-by Jaemin Ryu
Config.mk Fri Feb 03 15:52:40 2012 +0900 renamed from Config.mk Fri Feb 03 12:21:09 2012 +0900 +0 -0
diff -r b3de82b35189 Config.mk
@@ -15,6 +15,7 @@ debug ?= y
XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
                          -e s/i86pc/x86_32/ -e s/amd64/x86_64/)

XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
+XEN_TARGET_SUBARCH ?= $(XEN_TARGET_ARCH)
XEN_OS ?= $(shell uname -s)

CONFIG_$(XEN_OS) := y

xen/Rules.mk Fri Feb 03 15:52:40 2012 +0900 renamed from xen/Rules.mk Fri Feb 03 12:21:09 2012 +0900 +0 -0
diff -r b3de82b35189 xen/Rules.mk
@@ -26,9 +26,9 @@ perfc := y

endif

# Set ARCH/SUBARCH appropriately. -override TARGET_SUBARCH := $(XEN_TARGET_ARCH)

override TARGET_ARCH     := $(shell echo $(XEN_TARGET_ARCH) | \
                               sed -e 's/x86.*/x86/')

+override TARGET_SUBARCH := $(XEN_TARGET_SUBARCH)

TARGET := $(BASEDIR)/xen

xen/common/kexec.c Fri Feb 03 15:52:40 2012 +0900 renamed from xen/common/kexec.c Fri Feb 03 12:21:09 2012 +0900 +2 -0
diff -r b3de82b35189 xen/common/kexec.c
@@ -211,7 +211,9 @@ static void kexec_common_shutdown(void)
     console_start_sync();
     spin_debug_disable();
     one_cpu_only();
+#if !defined(__arm__)
     acpi_dmar_reinstate();
+#endif

}

void kexec_crash(void)

xen/common/sysctl.c Fri Feb 03 15:52:40 2012 +0900 renamed from xen/common/sysctl.c Fri Feb 03 12:21:09 2012 +0900 +8 -0
diff -r b3de82b35189 xen/common/sysctl.c
@@ -226,6 +226,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
 
     case XEN_SYSCTL_get_pmstat:
     {
+#if !defined(__arm__)
         ret = xsm_get_pmstat();
         if ( ret )
             break;
@@ -239,11 +240,15 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
             ret = -EFAULT;
             break;
         }
+#else
+       ret = -EINVAL;
+#endif
     }
     break;
 
     case XEN_SYSCTL_pm_op:
     {
+#if !defined(__arm__)
         ret = xsm_pm_op();
         if ( ret )
             break;
@@ -257,6 +262,9 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
             ret = -EFAULT;
             break;
         }
+#else
+       ret = -EINVAL;
+#endif
     }
     break;
 
xen/common/tmem_xen.c Fri Feb 03 15:52:40 2012 +0900 renamed from xen/common/tmem_xen.c Fri Feb 03 12:21:09 2012 +0900 +0 -0
diff -r b3de82b35189 xen/common/tmem_xen.c
@@ -87,7 +87,7 @@ void tmh_copy_page(char *to, char*from)

#endif
}

-#ifdef __ia64__
+#if defined(__ia64__) || defined(__arm__)
static inline void *cli_get_page(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn,
pfp_t **pcli_pfp, bool_t cli_write)
{

xen/drivers/Makefile Fri Feb 03 15:52:40 2012 +0900 renamed from xen/drivers/Makefile Fri Feb 03 12:21:09 2012 +0900 +0 -0
diff -r b3de82b35189 xen/drivers/Makefile
@@ -1,6 +1,8 @@

subdir-y += char
+ifneq ($(TARGET_ARCH),arm) subdir-y += cpufreq
subdir-y += pci
subdir-y += passthrough subdir-$(HAS_ACPI) += acpi subdir-$(HAS_VGA) += video +endif

xen/drivers/char/Makefile Fri Feb 03 15:52:40 2012 +0900 renamed from xen/drivers/char/Makefile Fri Feb 03 12:21:09 2012 +0900 +0 -0
diff -r b3de82b35189 xen/drivers/char/Makefile
@@ -1,3 +1,5 @@

obj-y += console.o
+ifneq ($(TARGET_ARCH),arm) obj-y += ns16550.o
+endif
obj-y += serial.o

xen/include/public/xen.h Fri Feb 03 15:52:40 2012 +0900 renamed from xen/include/public/xen.h Fri Feb 03 12:21:09 2012 +0900 +0 -0
diff -r b3de82b35189 xen/include/public/xen.h
@@ -33,6 +33,8 @@

#include "arch-x86/xen.h" #elif defined(__ia64__) #include "arch-ia64.h" +#elif defined(__arm__) +#include "arch-arm.h"
#else
#error "Unsupported architecture" #endif

xen/include/xen/libelf.h Fri Feb 03 15:52:40 2012 +0900 renamed from xen/include/xen/libelf.h Fri Feb 03 12:21:09 2012 +0900 +0 -0
diff -r b3de82b35189 xen/include/xen/libelf.h
@@ -23,7 +23,7 @@

#ifndef __XEN_LIBELF_H__ #define __XEN_LIBELF_H__

-#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || defined(__arm__)

#define XEN_ELF_LITTLE_ENDIAN #else
#error define architectural endianness

arm: start working on ARM.

 Config.mk                 |  1 +
 xen/Rules.mk              |  2 +-
 xen/common/kexec.c        |  2 ++
 xen/common/sysctl.c       |  8 ++++++++
 xen/common/tmem_xen.c     |  2 +-
 xen/drivers/Makefile      |  2 ++
 xen/drivers/char/Makefile |  2 ++
 xen/include/public/xen.h  |  2 ++
 xen/include/xen/libelf.h  |  2 +-
 9 files changed, 20 insertions(+), 3 deletions(-)
Config.mk +1 -0
diff -r b3de82b35189 Config.mk
@@ -15,6 +15,7 @@ debug ?= y
 XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
                          -e s/i86pc/x86_32/ -e s/amd64/x86_64/)
 XEN_TARGET_ARCH     ?= $(XEN_COMPILE_ARCH)
+XEN_TARGET_SUBARCH  ?= $(XEN_TARGET_ARCH)
 XEN_OS              ?= $(shell uname -s)
 
 CONFIG_$(XEN_OS) := y
xen/Rules.mk +1 -1
diff -r b3de82b35189 xen/Rules.mk
@@ -26,9 +26,9 @@ perfc := y
 endif
 
 # Set ARCH/SUBARCH appropriately.
-override TARGET_SUBARCH  := $(XEN_TARGET_ARCH)
 override TARGET_ARCH     := $(shell echo $(XEN_TARGET_ARCH) | \
                               sed -e 's/x86.*/x86/')
+override TARGET_SUBARCH  := $(XEN_TARGET_SUBARCH)
 
 TARGET := $(BASEDIR)/xen
 
xen/common/kexec.c +2 -0
diff -r b3de82b35189 xen/common/kexec.c
@@ -211,7 +211,9 @@ static void kexec_common_shutdown(void)
     console_start_sync();
     spin_debug_disable();
     one_cpu_only();
+#if !defined(__arm__)
     acpi_dmar_reinstate();
+#endif
 }
 
 void kexec_crash(void)
xen/common/sysctl.c +8 -0
diff -r b3de82b35189 xen/common/sysctl.c
@@ -226,6 +226,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
 
     case XEN_SYSCTL_get_pmstat:
     {
+#if !defined(__arm__)
         ret = xsm_get_pmstat();
         if ( ret )
             break;
@@ -239,11 +240,15 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
             ret = -EFAULT;
             break;
         }
+#else
+	ret = -EINVAL;
+#endif
     }
     break;
 
     case XEN_SYSCTL_pm_op:
     {
+#if !defined(__arm__)
         ret = xsm_pm_op();
         if ( ret )
             break;
@@ -257,6 +262,9 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
             ret = -EFAULT;
             break;
         }
+#else
+	ret = -EINVAL;
+#endif
     }
     break;
 
xen/common/tmem_xen.c +1 -1
diff -r b3de82b35189 xen/common/tmem_xen.c
@@ -87,7 +87,7 @@ void tmh_copy_page(char *to, char*from)
 #endif
 }
 
-#ifdef __ia64__
+#if defined(__ia64__) || defined(__arm__)
 static inline void *cli_get_page(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn,
                                  pfp_t **pcli_pfp, bool_t cli_write)
 {
xen/drivers/Makefile +2 -0
diff -r b3de82b35189 xen/drivers/Makefile
@@ -1,6 +1,8 @@
 subdir-y += char
+ifneq ($(TARGET_ARCH),arm)
 subdir-y += cpufreq
 subdir-y += pci
 subdir-y += passthrough
 subdir-$(HAS_ACPI) += acpi
 subdir-$(HAS_VGA) += video
+endif
xen/drivers/char/Makefile +2 -0
diff -r b3de82b35189 xen/drivers/char/Makefile
@@ -1,3 +1,5 @@
 obj-y += console.o
+ifneq ($(TARGET_ARCH),arm)
 obj-y += ns16550.o
+endif
 obj-y += serial.o
xen/include/public/xen.h +2 -0
diff -r b3de82b35189 xen/include/public/xen.h
@@ -33,6 +33,8 @@
 #include "arch-x86/xen.h"
 #elif defined(__ia64__)
 #include "arch-ia64.h"
+#elif defined(__arm__)
+#include "arch-arm.h"
 #else
 #error "Unsupported architecture"
 #endif
xen/include/xen/libelf.h +1 -1
diff -r b3de82b35189 xen/include/xen/libelf.h
@@ -23,7 +23,7 @@
 #ifndef __XEN_LIBELF_H__
 #define __XEN_LIBELF_H__
 
-#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || defined(__arm__)
 #define XEN_ELF_LITTLE_ENDIAN
 #else
 #error define architectural endianness

_______________________________________________
Xen-devel mailing list [email protected]
http://lists.xensource.com/xen-devel