xen: arm: implement do_multicall_call for both 32 and 64-bit
authorIan Campbell <ian.campbell@citrix.com>
Fri, 22 Feb 2013 08:58:19 +0000 (08:58 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 22 Feb 2013 12:14:55 +0000 (12:14 +0000)
Obviously nothing is actually making multicalls even on 32-bit so
this isn't tested.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/arm/traps.c
xen/include/asm-arm/multicall.h

index 6f249207b1f2619bcef5048252eedfc4ef7098eb..836762e50e050c4269dd7297f273014543ecc430 100644 (file)
@@ -675,6 +675,28 @@ static void do_trap_hypercall(struct cpu_user_regs *regs, unsigned long iss)
 #endif
 }
 
+void do_multicall_call(struct multicall_entry *multi)
+{
+    arm_hypercall_fn_t call = NULL;
+
+    if ( multi->op >= ARRAY_SIZE(arm_hypercall_table) )
+    {
+        multi->result = -ENOSYS;
+        return;
+    }
+
+    call = arm_hypercall_table[multi->op].fn;
+    if ( call == NULL )
+    {
+        multi->result = -ENOSYS;
+        return;
+    }
+
+    multi->result = call(multi->args[0], multi->args[1],
+                        multi->args[2], multi->args[3],
+                        multi->args[4]);
+}
+
 static void do_cp15_32(struct cpu_user_regs *regs,
                        union hsr hsr)
 {
index 1713dedbd9905b6deebea091120c299c35881400..b95926274fe18ce16fe8a1b0cd39adae5f185119 100644 (file)
@@ -1,16 +1,7 @@
 #ifndef __ASM_ARM_MULTICALL_H__
 #define __ASM_ARM_MULTICALL_H__
 
-#define do_multicall_call(_call)                             \
-    do {                                                     \
-        __asm__ __volatile__ (                               \
-            ".word 0xe7f000f0@; do_multicall_call\n"         \
-            "    mov r0,#0; @ do_multicall_call\n"           \
-            "    str r0, [r0];\n"                            \
-            :                                                \
-            :                                                \
-            : );                                             \
-    } while ( 0 )
+extern void do_multicall_call(struct multicall_entry *call);
 
 #endif /* __ASM_ARM_MULTICALL_H__ */
 /*