From: Michal Ostrowski <mostrows@watson.ibm.com>
To: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: Extends HCALL interface for Infiniband usage
Date: Thu, 30 Mar 2006 14:13:25 -0500 [thread overview]
Message-ID: <E1FP2aD-00050y-IO@heater.watson.ibm.com> (raw)
For the sake of discussion...
A generic hcall wrapper through which any hcall may be made; an
alternative to having to wwrite-out each possible combination of
numbers of input and output arguments.
Needs the obvious fix to meek Heiko's requirements (9-in, 9-out).
Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
arch/powerpc/platforms/pseries/hvCall.S | 45 ++++++++++++++++++++++++++++++++
include/asm-powerpc/hvcall.h | 10 +++++++
2 files changed, 55 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S
index 176e8da..7bb29b5 100644
--- a/arch/powerpc/platforms/pseries/hvCall.S
+++ b/arch/powerpc/platforms/pseries/hvCall.S
@@ -129,3 +129,48 @@ _GLOBAL(plpar_hcall_4out)
mtcrf 0xff,r0
blr /* return r3 = status */
+
+/* long plpar_hcall_generic(unsigned long opcode, R3
+ unsigned long in_args[8], R4
+ unsigned long out_args[8]) R5
+*/
+_GLOBAL(plpar_hcall_generic)
+ mfcr r0
+ std r0,-8(r1)
+ stdu r1,-48(r1)
+
+ std r4,16(r1)
+ std r5,8(r1)
+
+ mr r12, r4 /* Load HCALL args into r4...r11. */
+ ld r4, 0(r12)
+ ld r5, 8(r12)
+ ld r6, 16(r12)
+ ld r7, 24(r12)
+ ld r8, 32(r12)
+ ld r9, 40(r12)
+ ld r10, 48(r12)
+ ld r11, 56(r12)
+
+ HVSC /* Invoke the hypervisor. */
+
+ ld r12, 8(r1) /* Check if return args need */
+ cmpi 0, r12, 0 /* to be saved. */
+ beq 1f
+
+ std r4, 0(r12)
+ std r5, 8(r12)
+ std r6, 16(r12)
+ std r7, 24(r12)
+ std r8, 32(r12)
+ std r9, 40(r12)
+ std r10, 48(r12)
+ std r11, 56(r12)
+1:
+ ld r1,0(r1)
+ ld r0,-8(r1)
+
+ mtcrf 0xff,r0
+ blr /* return r3 = status */
+
+
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h
index 38ca9ad..3bf6425 100644
--- a/include/asm-powerpc/hvcall.h
+++ b/include/asm-powerpc/hvcall.h
@@ -175,6 +175,16 @@ long plpar_hcall_4out(unsigned long opco
unsigned long *out3,
unsigned long *out4);
+/* plpar_hcall_generic()
+ *
+ * generic hcall pass-thru mechanism
+ *
+ */
+long plpar_hcall_generic(unsigned long opcode,
+ unsigned long in_args[8],
+ unsigned long out_args[8]);
+
+
#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_HVCALL_H */
next reply other threads:[~2006-03-30 19:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-30 19:13 Michal Ostrowski [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-03-30 20:47 [PATCH] powerpc: Extends HCALL interface for InfiniBand usage Heiko J Schick
2006-03-29 15:10 Heiko J Schick
2006-03-29 15:09 ` Segher Boessenkool
2006-03-29 16:49 ` Heiko J Schick
2006-03-29 16:55 ` Heiko J Schick
2006-03-30 4:19 ` Benjamin Herrenschmidt
2006-03-30 5:11 ` Heiko J Schick
2006-03-30 6:06 ` Segher Boessenkool
2006-03-30 6:11 ` Paul Mackerras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1FP2aD-00050y-IO@heater.watson.ibm.com \
--to=mostrows@watson.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).