From: Ian Campbell Subject: [PATCH V2 40/46] xen: arm: implement do_multicall_call for both 32 and 64-bit Date: Thu, 14 Feb 2013 16:47:54 +0000 Message-ID: <1360860480-9245-40-git-send-email-ian.campbell@citrix.com> References: <1360860465.20449.472.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1360860465.20449.472.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: stefano.stabellini@citrix.com, tim@xen.org, Ian Campbell List-Id: xen-devel@lists.xenproject.org Obviously nothing is actually making multicalls even on 32-bit so this isn't tested. Signed-off-by: Ian Campbell Acked-by: Tim Deegan --- xen/arch/arm/traps.c | 22 ++++++++++++++++++++++ xen/include/asm-arm/multicall.h | 11 +---------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index e00fef0..5f9c785 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -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) { diff --git a/xen/include/asm-arm/multicall.h b/xen/include/asm-arm/multicall.h index c800940..f717b51 100644 --- a/xen/include/asm-arm/multicall.h +++ b/xen/include/asm-arm/multicall.h @@ -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__ */ /* -- 1.7.2.5