diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-27 10:17:40 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-27 10:17:40 -0400 |
commit | 99a2379cdddcc4e8579e70deb80479450ed65d49 (patch) | |
tree | d5c40a1e7ffabb87c3b1f1ae510eac80f4b52d05 /arch/powerpc | |
parent | 2952bc7c896ec76a20e18321e2be40a694a73a78 (diff) |
powerpc: move hvCall.s to powerpc/platforms/iseries
Rename it to hvcall.S and (so I can do that) rename hvcall.c
to hvlog.c - a more appropriate name.
Do some white space cleanups.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/iseries/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/hvcall.S | 93 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/hvlog.c (renamed from arch/powerpc/platforms/iseries/hvcall.c) | 0 |
3 files changed, 94 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile index a5e91c9db5c7..3a9981a35e2a 100644 --- a/arch/powerpc/platforms/iseries/Makefile +++ b/arch/powerpc/platforms/iseries/Makefile | |||
@@ -1 +1 @@ | |||
obj-y += hvcall.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o hvcall.o | ||
diff --git a/arch/powerpc/platforms/iseries/hvcall.S b/arch/powerpc/platforms/iseries/hvcall.S new file mode 100644 index 000000000000..9901c0ec1415 --- /dev/null +++ b/arch/powerpc/platforms/iseries/hvcall.S | |||
@@ -0,0 +1,93 @@ | |||
1 | /* | ||
2 | * This file contains the code to perform calls to the | ||
3 | * iSeries LPAR hypervisor | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | #include <asm/ppc_asm.h> | ||
12 | #include <asm/processor.h> | ||
13 | |||
14 | .text | ||
15 | |||
16 | /* | ||
17 | * Hypervisor call | ||
18 | * | ||
19 | * Invoke the iSeries hypervisor via the System Call instruction | ||
20 | * Parameters are passed to this routine in registers r3 - r10 | ||
21 | * | ||
22 | * r3 contains the HV function to be called | ||
23 | * r4-r10 contain the operands to the hypervisor function | ||
24 | * | ||
25 | */ | ||
26 | |||
27 | _GLOBAL(HvCall) | ||
28 | _GLOBAL(HvCall0) | ||
29 | _GLOBAL(HvCall1) | ||
30 | _GLOBAL(HvCall2) | ||
31 | _GLOBAL(HvCall3) | ||
32 | _GLOBAL(HvCall4) | ||
33 | _GLOBAL(HvCall5) | ||
34 | _GLOBAL(HvCall6) | ||
35 | _GLOBAL(HvCall7) | ||
36 | |||
37 | |||
38 | mfcr r0 | ||
39 | std r0,-8(r1) | ||
40 | stdu r1,-(STACK_FRAME_OVERHEAD+16)(r1) | ||
41 | |||
42 | /* r0 = 0xffffffffffffffff indicates a hypervisor call */ | ||
43 | |||
44 | li r0,-1 | ||
45 | |||
46 | /* Invoke the hypervisor */ | ||
47 | |||
48 | sc | ||
49 | |||
50 | ld r1,0(r1) | ||
51 | ld r0,-8(r1) | ||
52 | mtcrf 0xff,r0 | ||
53 | |||
54 | /* return to caller, return value in r3 */ | ||
55 | |||
56 | blr | ||
57 | |||
58 | _GLOBAL(HvCall0Ret16) | ||
59 | _GLOBAL(HvCall1Ret16) | ||
60 | _GLOBAL(HvCall2Ret16) | ||
61 | _GLOBAL(HvCall3Ret16) | ||
62 | _GLOBAL(HvCall4Ret16) | ||
63 | _GLOBAL(HvCall5Ret16) | ||
64 | _GLOBAL(HvCall6Ret16) | ||
65 | _GLOBAL(HvCall7Ret16) | ||
66 | |||
67 | mfcr r0 | ||
68 | std r0,-8(r1) | ||
69 | std r31,-16(r1) | ||
70 | stdu r1,-(STACK_FRAME_OVERHEAD+32)(r1) | ||
71 | |||
72 | mr r31,r4 | ||
73 | li r0,-1 | ||
74 | mr r4,r5 | ||
75 | mr r5,r6 | ||
76 | mr r6,r7 | ||
77 | mr r7,r8 | ||
78 | mr r8,r9 | ||
79 | mr r9,r10 | ||
80 | |||
81 | sc | ||
82 | |||
83 | std r3,0(r31) | ||
84 | std r4,8(r31) | ||
85 | |||
86 | mr r3,r5 | ||
87 | |||
88 | ld r1,0(r1) | ||
89 | ld r0,-8(r1) | ||
90 | mtcrf 0xff,r0 | ||
91 | ld r31,-16(r1) | ||
92 | |||
93 | blr | ||
diff --git a/arch/powerpc/platforms/iseries/hvcall.c b/arch/powerpc/platforms/iseries/hvlog.c index f61e2e9ac9ec..f61e2e9ac9ec 100644 --- a/arch/powerpc/platforms/iseries/hvcall.c +++ b/arch/powerpc/platforms/iseries/hvlog.c | |||