powerpc/powernv: Invoke opal_cec_reboot2() on unrecoverable HMI.
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Tue, 4 Aug 2015 11:18:56 +0000 (16:48 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 6 Aug 2015 05:10:19 +0000 (15:10 +1000)
Invoke new opal_cec_reboot2() call with reboot type
OPAL_REBOOT_PLATFORM_ERROR (for unrecoverable HMI interrupts) to inform
BMC/OCC about this error, so that BMC can collect relevant data for error
analysis and decide what component to de-configure before rebooting.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal-hmi.c

index acefdf9646f53d9721f44f017535fb2241d8beeb..d000f4e219814ec5e6d89d2ff17f30a05895d7db 100644 (file)
@@ -264,6 +264,8 @@ static void hmi_event_handler(struct work_struct *work)
        spin_unlock_irqrestore(&opal_hmi_evt_lock, flags);
 
        if (unrecoverable) {
+               int ret;
+
                /* Pull all HMI events from OPAL before we panic. */
                while (opal_get_msg(__pa(&msg), sizeof(msg)) == OPAL_SUCCESS) {
                        u32 type;
@@ -278,6 +280,23 @@ static void hmi_event_handler(struct work_struct *work)
                        hmi_evt = (struct OpalHMIEvent *)&msg.params[0];
                        print_hmi_event_info(hmi_evt);
                }
+
+               /*
+                * Unrecoverable HMI exception. We need to inform BMC/OCC
+                * about this error so that it can collect relevant data
+                * for error analysis before rebooting.
+                */
+               ret = opal_cec_reboot2(OPAL_REBOOT_PLATFORM_ERROR,
+                       "Unrecoverable HMI exception");
+               if (ret == OPAL_UNSUPPORTED) {
+                       pr_emerg("Reboot type %d not supported\n",
+                                               OPAL_REBOOT_PLATFORM_ERROR);
+               }
+
+               /*
+                * Fall through and panic if opal_cec_reboot2() returns
+                * OPAL_UNSUPPORTED.
+                */
                panic("Unrecoverable HMI exception");
        }
 }
This page took 0.026819 seconds and 5 git commands to generate.