aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/platforms/powernv/setup.c
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2019-03-05 01:12:19 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2019-05-03 02:54:57 +1000
commitde269129a48a2d590ba1d20c719e19d86e3ddb3f (patch)
treef24b4a3afde2d90ce614a347129acf6324315a1a /arch/powerpc/platforms/powernv/setup.c
parentpowerpc/xmon: add read-only mode (diff)
downloadwireguard-linux-de269129a48a2d590ba1d20c719e19d86e3ddb3f.tar.xz
wireguard-linux-de269129a48a2d590ba1d20c719e19d86e3ddb3f.zip
powerpc/hmi: Fix kernel hang when TB is in error state.
On TOD/TB errors timebase register stops/freezes until HMI error recovery gets TOD/TB back into running state. On successful recovery, TB starts running again and udelay() that relies on TB value continues to function properly. But in case when HMI fails to recover from TOD/TB errors, the TB register stay freezed. With TB not running the __delay() function keeps looping and never return. If __delay() is called while in panic path then system hangs and never reboots after panic. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to '')
-rw-r--r--arch/powerpc/platforms/powernv/setup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 14befee4b3f1..3cf40f689aac 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -401,7 +401,10 @@ static void __init pnv_setup_machdep_opal(void)
/* ppc_md.system_reset_exception gets filled in by pnv_smp_init() */
ppc_md.machine_check_exception = opal_machine_check;
ppc_md.mce_check_early_recovery = opal_mce_check_early_recovery;
- ppc_md.hmi_exception_early = opal_hmi_exception_early;
+ if (opal_check_token(OPAL_HANDLE_HMI2))
+ ppc_md.hmi_exception_early = opal_hmi_exception_early2;
+ else
+ ppc_md.hmi_exception_early = opal_hmi_exception_early;
ppc_md.handle_hmi_exception = opal_handle_hmi_exception;
}