From 70417740a26d6e5bde6e22286642e06568ae7361 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 18 Jan 2004 18:21:31 -0800 Subject: [PATCH] [PATCH] ppc64: add hcall interface From: Anton Blanchard add hcall interface --- arch/ppc64/kernel/pSeries_hvCall.S | 36 ++++++++++++++++++++++++++++++ include/asm-ppc64/hvcall.h | 18 +++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/arch/ppc64/kernel/pSeries_hvCall.S b/arch/ppc64/kernel/pSeries_hvCall.S index 1eb9c93c70607..61c0c83c5ff74 100644 --- a/arch/ppc64/kernel/pSeries_hvCall.S +++ b/arch/ppc64/kernel/pSeries_hvCall.S @@ -67,3 +67,39 @@ _GLOBAL(plpar_hcall_norets) ld r0,-8(r1) mtcrf 0xff,r0 blr /* return r3 = status */ + + +/* long plpar_hcall_8arg_2ret(unsigned long opcode, R3 + unsigned long arg1, R4 + unsigned long arg2, R5 + unsigned long arg3, R6 + unsigned long arg4, R7 + unsigned long arg5, R8 + unsigned long arg6, R9 + unsigned long arg7, R10 + unsigned long arg8, 112(R1) + unsigned long *out1); 120(R1) + + */ + + .text +_GLOBAL(plpar_hcall_8arg_2ret) + mfcr r0 + + ld r11, 112(r1) /* put arg8 and out1 in R11 and R12 */ + ld r12, 120(r1) + + std r0,-8(r1) + stdu r1,-32(r1) + + std r12,-8(r1) /* Save out ptr */ + + HSC /* invoke the hypervisor */ + + ld r10,-8(r1) /* Fetch r4 ret arg */ + std r4,0(r10) + + ld r1,0(r1) + ld r0,-8(r1) + mtcrf 0xff,r0 + blr /* return r3 = status */ diff --git a/include/asm-ppc64/hvcall.h b/include/asm-ppc64/hvcall.h index d98b8277fa3bd..79d182423e175 100644 --- a/include/asm-ppc64/hvcall.h +++ b/include/asm-ppc64/hvcall.h @@ -103,3 +103,21 @@ long plpar_hcall(unsigned long opcode, * other than status. Slightly more efficient. */ long plpar_hcall_norets(unsigned long opcode, ...); + +/* + * Special hcall interface for ibmveth support. + * Takes 8 input parms. Returns a rc and stores the + * R4 return value in *out1. + */ +long plpar_hcall_8arg_2ret(unsigned long opcode, + unsigned long arg1, + unsigned long arg2, + unsigned long arg3, + unsigned long arg4, + unsigned long arg5, + unsigned long arg6, + unsigned long arg7, + unsigned long arg8, + unsigned long *out1); + + -- 2.53.0