powernv/opal: Disable OPAL notifier upon poweroff
authorGavin Shan <shangw@linux.vnet.ibm.com>
Thu, 20 Jun 2013 10:13:23 +0000 (18:13 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 21 Jun 2013 06:01:51 +0000 (16:01 +1000)
While we're restarting or powering off the system, we needn't
the OPAL notifier any more. So just to disable that.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/setup.c

index d4459bf..84438af 100644 (file)
@@ -93,6 +93,8 @@ static void  __noreturn pnv_restart(char *cmd)
 {
        long rc = OPAL_BUSY;
 
+       opal_notifier_disable();
+
        while (rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT) {
                rc = opal_cec_reboot();
                if (rc == OPAL_BUSY_EVENT)
@@ -108,6 +110,8 @@ static void __noreturn pnv_power_off(void)
 {
        long rc = OPAL_BUSY;
 
+       opal_notifier_disable();
+
        while (rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT) {
                rc = opal_cec_power_down(0);
                if (rc == OPAL_BUSY_EVENT)