powerpc/powernv: reboot when requested by firmware
authorJoel Stanley <[email protected]>
Wed, 15 Apr 2015 23:16:56 +0000 (16:16 -0700)
committerLinus Torvalds <[email protected]>
Wed, 15 Apr 2015 23:35:23 +0000 (16:35 -0700)
Use orderly_reboot so userspace will to shut itself down via the reboot
path.  This is required for graceful reboot initiated by the BMC, such as
when a user uses ipmitool to issue a 'chassis power cycle' command.

Signed-off-by: Joel Stanley <[email protected]>
Acked-by: Michael Ellerman <[email protected]>
Cc: Fabian Frederick <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Jeremy Kerr <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/powerpc/platforms/powernv/opal-power.c

index 48bf5b080bcf357ca9ce15a85387c291fee97805..ac46c2c24f99e214fcd18434e54abdbe90c915ec 100644 (file)
@@ -29,8 +29,9 @@ static int opal_power_control_event(struct notifier_block *nb,
 
        switch (type) {
        case SOFT_REBOOT:
-               /* Fall through. The service processor is responsible for
-                * bringing the machine back up */
+               pr_info("OPAL: reboot requested\n");
+               orderly_reboot();
+               break;
        case SOFT_OFF:
                pr_info("OPAL: poweroff requested\n");
                orderly_poweroff(true);