Skip to contentSkip to conversation

powerpc: add ps3 platform hvcalls

PATCH In review Geoff Levand 4 participants 6 messages Nov 10, 2006 – Nov 13, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 8/16 powerpc: add ps3 platform hvcalls

Adds the ps3pf hvcalls.

---
 arch/powerpc/platforms/ps3pf/exports.c |   27 +
 arch/powerpc/platforms/ps3pf/hvcall.S  |  804 +++++++++++++++++++++++++++++++++
 include/asm-powerpc/lv1call.h          |  345 ++++++++++++++
 3 files changed, 1176 insertions(+)
arch/powerpc/platforms/ps3pf/exports.c new file +27 -0
Index: cell--common--6/arch/powerpc/platforms/ps3pf/exports.c
===================================================================
@@ -0,0 +1,27 @@
+/*
+ * exports.c - PS3 Platform HV call exports for modules.
+ *
+ *  Copyright (C) 2006 Sony Computer Entertainment Inc.
+ *  Copyright 2006 Sony Corp.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/module.h>
+
+#define LV1_CALL(name, in, out, num)                          \
+  extern s64 _lv1_##name(LV1_##in##_IN_##out##_OUT_ARG_DECL); \
+  EXPORT_SYMBOL(_lv1_##name);
+
+#include <asm/lv1call.h>
arch/powerpc/platforms/ps3pf/hvcall.S new file +804 -0

804 lines not on this page · raw message

include/asm-powerpc/lv1call.h new file +345 -0

345 lines not on this page · raw message

#1 lore raw
Quoted 3 lines · Geoff Levand

Adds the ps3pf hvcalls.

This one reminds of the inline hcall abstraction layer I did some time ago. The implementation in your patch is a lot less elegant than both the pseries in its current incarnation and the one that I did (IMHO). Any opinions on how we should proceed here?

I can dig out my patch again in the version I did for the ps3 hypervisor, if there is demand, or I could help moving over so code that is more like the pseries one. Unfortunately the calling conventions are very different from pseries (the hcall number is passed in r11, not in one of the argument registers), so that would not be as nice as Anton's implementation.

	Arnd <><
#2 lore raw
Quoted 10 lines · Arnd Bergmann
Quoted 3 lines · Geoff Levand

Adds the ps3pf hvcalls.

This one reminds of the inline hcall abstraction layer I did some time ago. The implementation in your patch is a lot less elegant than both the pseries in its current incarnation and the one that I did (IMHO). Any opinions on how we should proceed here?

Please try to reuse Arnd's code as much as possible. What's in this patch is more than ugly.

#3 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Arnd Bergmann
Quoted 3 lines · Geoff Levand

Adds the ps3pf hvcalls.

Quoted 8 lines
Quoted 5 lines

This one reminds of the inline hcall abstraction layer I did some time ago. The implementation in your patch is a lot less elegant than both the pseries in its current incarnation and the one that I did (IMHO). Any opinions on how we should proceed here?

Please try to reuse Arnd's code as much as possible. What's in this patch is more than ugly.

Last I heard, there wasn't complete agreement between Paulus and Arnd about how those Hcalls should look like and Arnd patch, I think, conflicts with something else (though it's not off the top of my mind, I haven't paid too much attention there).

I asked Paulus and we agreed that Geoff should keep his current macros for now, and we'll look into a general consolidation once it's in and the Toshiba stuff is in too (it should be posted next week).

Ben.

#4 lore raw
In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann
Quoted 3 lines · Geoff Levand

Adds the ps3pf hvcalls.

This one reminds of the inline hcall abstraction layer I did some time ago. The implementation in your patch is a lot less elegant than both the pseries in its current incarnation and the one that I did (IMHO). Any opinions on how we should proceed here?

I wanted to do some cleanup here, but Ben suggested to wait until this was released publicly.

I would like to have full function declarations that would be ctags parable, and inline docs of all the lv1 call arguments. With the current implementation there is no way to understand many of the arguments. Another is to preserve the inline wrapper, or have some other mechanism that allows call instrumentation. This is old code done by someone else, I have no affection for it.

Quoted 6 lines

I can dig out my patch again in the version I did for the ps3 hypervisor, if there is demand, or I could help moving over so code that is more like the pseries one. Unfortunately the calling conventions are very different from pseries (the hcall number is passed in r11, not in one of the argument registers), so that would not be as nice as Anton's implementation.

If you have something, I would like to see it.

-Geoff

#5 lore raw
Quoted 3 lines

I would like to have full function declarations that would be ctags parable, and inline docs of all the lv1 call arguments.

Amen !

Cheers,
Ben.