powerpc/hmi: Fix kernel hang when TB is in error state.
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Mon, 4 Mar 2019 19:42:19 +0000 (01:12 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 May 2019 16:54:57 +0000 (02:54 +1000)
commitde269129a48a2d590ba1d20c719e19d86e3ddb3f
treef24b4a3afde2d90ce614a347129acf6324315a1a
parent0acb5f64560a052fd66ab37b212a72964847160f
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>
arch/powerpc/include/asm/opal-api.h
arch/powerpc/include/asm/opal.h
arch/powerpc/include/asm/time.h
arch/powerpc/kernel/time.c
arch/powerpc/platforms/powernv/opal-call.c
arch/powerpc/platforms/powernv/opal.c
arch/powerpc/platforms/powernv/setup.c