Commit e528ff69 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: add/forward port of lparcfg, from Will Schmidt

From: Anton Blanchard <anton@samba.org>

add/forward port of lparcfg, from Will Schmidt
parent c4f34fde
......@@ -142,6 +142,13 @@ config RTAS_FLASH
config SCANLOG
tristate "Scanlog dump interface"
depends on PPC_RTAS
config LPARCFG
bool "LPAR Configuration Data"
help
Provide system capacity information via human readable
<key word>=<value> pairs through a /proc/ppc64/lparcfg interface.
endmenu
......
......@@ -38,5 +38,7 @@ obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o
obj-$(CONFIG_PPC_RTAS) += rtas-proc.o
obj-$(CONFIG_SCANLOG) += scanlog.o
obj-$(CONFIG_VIOPATH) += viopath.o
obj-$(CONFIG_LPARCFG) += lparcfg.o
CFLAGS_ioctl32.o += -Ifs/
This diff is collapsed.
......@@ -103,3 +103,41 @@ _GLOBAL(plpar_hcall_8arg_2ret)
ld r0,-8(r1)
mtcrf 0xff,r0
blr /* return r3 = status */
/* long plpar_hcall_4out(unsigned long opcode, R3
unsigned long arg1, R4
unsigned long arg2, R5
unsigned long arg3, R6
unsigned long arg4, R7
unsigned long *out1, (r4) R8
unsigned long *out2, (r5) R9
unsigned long *out3, (r6) R10
unsigned long *out4); (r7) 112(R1). From Parameter save area.
*/
_GLOBAL(plpar_hcall_4out)
mfcr r0
std r0,-8(r1)
ld r14,112(r1)
stdu r1,-48(r1)
std r8,32(r1) /* Save out ptrs. */
std r9,24(r1)
std r10,16(r1)
std r14,8(r1)
HSC /* invoke the hypervisor */
ld r14,32(r1) /* Fetch r4-r7 ret args. */
std r4,0(r14)
ld r14,24(r1)
std r5,0(r14)
ld r14,16(r1)
std r6,0(r14)
ld r14,8(r1)
std r7,0(r14)
ld r1,0(r1)
ld r0,-8(r1)
mtcrf 0xff,r0
blr /* return r3 = status */
......@@ -121,3 +121,20 @@ long plpar_hcall_8arg_2ret(unsigned long opcode,
unsigned long *out1);
/* plpar_hcall_4out()
*
* same as plpar_hcall except with 4 output arguments.
*
*/
long plpar_hcall_4out(unsigned long opcode,
unsigned long arg1,
unsigned long arg2,
unsigned long arg3,
unsigned long arg4,
unsigned long *out1,
unsigned long *out2,
unsigned long *out3,
unsigned long *out4);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment