sparc64: shut down to OBP correctly
PATCH v2 1/1 sparc64: shut down to OBP correctly
The command "shutdown -h -H now" should shut down the system to OBP, however the machine was incorrectly being powered off instead (on both LDOM and bare metal).
The "exit" command to the OBP must be run and then a hard loop to prevent return to the kernel.
Signed-off-by Larry Bassel <[email protected]>
--- arch/sparc/prom/misc_64.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-)
arch/sparc/prom/misc_64.c +1 -6
@@ -115,16 +115,11 @@ void notrace prom_halt(void) {unsigned long args[3 ]; -#ifdef CONFIG_SUN_LDOMS -if (ldom_domaining_enabled) -ldom_power_off (); -#endif -again: args[0 ] = (unsigned long )"exit" ; args[1 ] =0 ; args[2 ] =0 ;p1275_cmd_direct (args); - goto again;/* PROM is out to get me -DaveM */ +while (1 ); }void prom_halt_power_off (void )
Signature · 1 line
1.7.1
Hi Larry.
Little nitpick...
arch/sparc/prom/misc_64.c void notrace prom_halt(void) · line 122
Quoted 4 lines
arch/sparc/prom/misc_64.c +1
-1args[2 ] =0 ;p1275_cmd_direct (args); - goto again;/* PROM is out to get me -DaveM */ +while (1 );
If you write this like:
for (;;) /* forever */;
It is much more obvious that this is supposed to loop forever. As it is now it more looks like an oversight.
Sam