diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-05-25 03:37:12 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-29 05:49:29 -0400 |
commit | 22d6a1cba3e9ec9baf8ce4d8dd1d088e112a64f1 (patch) | |
tree | b16a912edb689cba40395f778acb3d5dd9426fd8 /arch/sparc64/prom | |
parent | 36b48973b8f1818d0ae6d16e548081d00162ae39 (diff) |
[SPARC64]: Report proper system soft state to the hypervisor.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/prom')
-rw-r--r-- | arch/sparc64/prom/misc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c index 0b4213720d43..f3e0c14e9eef 100644 --- a/arch/sparc64/prom/misc.c +++ b/arch/sparc64/prom/misc.c | |||
@@ -15,6 +15,25 @@ | |||
15 | #include <asm/oplib.h> | 15 | #include <asm/oplib.h> |
16 | #include <asm/system.h> | 16 | #include <asm/system.h> |
17 | 17 | ||
18 | int prom_service_exists(const char *service_name) | ||
19 | { | ||
20 | int err = p1275_cmd("test", P1275_ARG(0, P1275_ARG_IN_STRING) | | ||
21 | P1275_INOUT(1, 1), service_name); | ||
22 | |||
23 | if (err) | ||
24 | return 0; | ||
25 | return 1; | ||
26 | } | ||
27 | |||
28 | void prom_sun4v_guest_soft_state(void) | ||
29 | { | ||
30 | const char *svc = "SUNW,soft-state-supported"; | ||
31 | |||
32 | if (!prom_service_exists(svc)) | ||
33 | return; | ||
34 | p1275_cmd(svc, P1275_INOUT(0, 0)); | ||
35 | } | ||
36 | |||
18 | /* Reset and reboot the machine with the command 'bcommand'. */ | 37 | /* Reset and reboot the machine with the command 'bcommand'. */ |
19 | void prom_reboot(const char *bcommand) | 38 | void prom_reboot(const char *bcommand) |
20 | { | 39 | { |