From: Arnd Bergmann <arnd@arndb.de>
To: Anton Blanchard <anton@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 5/16] hypervisor functions for Celleb
Date: Sat, 18 Nov 2006 10:08:53 +0100 [thread overview]
Message-ID: <200611181008.54345.arnd@arndb.de> (raw)
In-Reply-To: <20061117052158.GB670@krispykreme>
On Friday 17 November 2006 06:21, Anton Blanchard wrote:
> > Just make another one (or a set of them like the phyp calls) and =A0
> > define then in assembly.
> > Certainly a bl to a function will be negligible to the hcall its self.
>=20
> Agreed. And I thought the phyp hcall code was ugly :)
>=20
> Any ideas why its so different? Just NIH?
>=20
Yeah, mostly that. The hcall functions were developed separately in
each company, and the Sony/Toshiba calling conventions seem to be
too different from the phyp ones to easily adapt those, at least
the version before your latest cleanup.
I wonder if we now should just do something as simple as the code
below.
=2D--------------
#define PS3_HCALL_BUFSIZE 6
#define BEAT_HCALL_BUFSIZE 6
long ps3_hcall(unsigned long opcode, unsigned long *retbuf, ...);
long beat_hcall(unsigned long opcode, unsigned long *retbuf, ...);
=2D---------------
_GLOBAL(beat_hcall)
_GLOBAL(ps3_hcall)
HMT_MEDIUM
mfcr r0
stw r0,8(r1)
HCALL_INST_PRECALL
std r4,STK_PARM(r4)(r1) /* Save ret buffer */
mr r11,r3
mr r3,r5
mr r4,r6
mr r5,r7
mr r6,r8
mr r7,r9
mr r8,r10
ld r9,STK_PARM(r11)(r1) /* put arg7 in r9 */
HVSC /* invoke the hypervisor */
ld r12,STK_PARM(r4)(r1)
std r4, 0(r12)
std r5, 8(r12)
std r6, 16(r12)
std r7, 24(r12)
std r8, 32(r12)
std r9, 40(r12)
HCALL_INST_POSTCALL
lwz r0,8(r1)
mtcrf 0xff,r0
blr /* return r3 =3D status */
_
prev parent reply other threads:[~2006-11-18 9:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-15 9:37 [PATCH 5/16] hypervisor functions for Celleb Ishizaki Kou
2006-11-15 18:37 ` Christoph Hellwig
2006-11-15 22:04 ` Arnd Bergmann
2006-11-16 18:40 ` Jimi Xenidis
2006-11-17 5:21 ` Anton Blanchard
2006-11-18 9:08 ` Arnd Bergmann [this message]
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=200611181008.54345.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=anton@samba.org \
--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).