diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-07-12 18:55:55 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-16 07:04:36 -0400 |
commit | b3e13fbeb9ac1eb8e7b0791bf56e1775c692972b (patch) | |
tree | 06539dfe2332c98c4d8b83450fe1e6055680ddc0 /arch/sparc64/prom | |
parent | 83292e0a9c3f1c326b28fbf8cb70a8ce81a98163 (diff) |
[SPARC64]: Fix setting of variables in LDOM guest.
There is a special domain services capability for setting
variables in the OBP options node. Guests don't have permanent
store for the OBP variables like a normal system, so they are
instead maintained in the LDOM control node or in the SC.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/prom')
-rw-r--r-- | arch/sparc64/prom/misc.c | 5 | ||||
-rw-r--r-- | arch/sparc64/prom/tree.c | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c index f3e0c14e9eef..72d272c9de6b 100644 --- a/arch/sparc64/prom/misc.c +++ b/arch/sparc64/prom/misc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/openprom.h> | 14 | #include <asm/openprom.h> |
15 | #include <asm/oplib.h> | 15 | #include <asm/oplib.h> |
16 | #include <asm/system.h> | 16 | #include <asm/system.h> |
17 | #include <asm/ldc.h> | ||
17 | 18 | ||
18 | int prom_service_exists(const char *service_name) | 19 | int prom_service_exists(const char *service_name) |
19 | { | 20 | { |
@@ -37,6 +38,10 @@ void prom_sun4v_guest_soft_state(void) | |||
37 | /* Reset and reboot the machine with the command 'bcommand'. */ | 38 | /* Reset and reboot the machine with the command 'bcommand'. */ |
38 | void prom_reboot(const char *bcommand) | 39 | void prom_reboot(const char *bcommand) |
39 | { | 40 | { |
41 | #ifdef CONFIG_SUN_LDOMS | ||
42 | if (ldom_domaining_enabled) | ||
43 | ldom_reboot(bcommand); | ||
44 | #endif | ||
40 | p1275_cmd("boot", P1275_ARG(0, P1275_ARG_IN_STRING) | | 45 | p1275_cmd("boot", P1275_ARG(0, P1275_ARG_IN_STRING) | |
41 | P1275_INOUT(1, 0), bcommand); | 46 | P1275_INOUT(1, 0), bcommand); |
42 | } | 47 | } |
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c index 500f05e2cfcb..17b7ecfe7ca9 100644 --- a/arch/sparc64/prom/tree.c +++ b/arch/sparc64/prom/tree.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <asm/openprom.h> | 14 | #include <asm/openprom.h> |
15 | #include <asm/oplib.h> | 15 | #include <asm/oplib.h> |
16 | #include <asm/ldc.h> | ||
16 | 17 | ||
17 | /* Return the child of node 'node' or zero if no this node has no | 18 | /* Return the child of node 'node' or zero if no this node has no |
18 | * direct descendent. | 19 | * direct descendent. |
@@ -261,9 +262,17 @@ int prom_node_has_property(int node, const char *prop) | |||
261 | int | 262 | int |
262 | prom_setprop(int node, const char *pname, char *value, int size) | 263 | prom_setprop(int node, const char *pname, char *value, int size) |
263 | { | 264 | { |
264 | if(size == 0) return 0; | 265 | if (size == 0) |
265 | if((pname == 0) || (value == 0)) return 0; | 266 | return 0; |
267 | if ((pname == 0) || (value == 0)) | ||
268 | return 0; | ||
266 | 269 | ||
270 | #ifdef CONFIG_SUN_LDOMS | ||
271 | if (ldom_domaining_enabled) { | ||
272 | ldom_set_var(pname, value); | ||
273 | return 0; | ||
274 | } | ||
275 | #endif | ||
267 | return p1275_cmd ("setprop", P1275_ARG(1,P1275_ARG_IN_STRING)| | 276 | return p1275_cmd ("setprop", P1275_ARG(1,P1275_ARG_IN_STRING)| |
268 | P1275_ARG(2,P1275_ARG_IN_BUF)| | 277 | P1275_ARG(2,P1275_ARG_IN_BUF)| |
269 | P1275_INOUT(4, 1), | 278 | P1275_INOUT(4, 1), |