Revert "powerpc: Do not call ppc_md.panic in fadump panic notifier"
This reverts commita3b2cb30f2
. That commit tried to fix problems with panic on powerpc in certain circumstances, where some output from the generic panic code was being dropped. Unfortunately, it breaks things worse in other circumstances. In particular when running a PAPR guest, it will now attempt to reboot instead of informing the hypervisor (KVM or PowerVM) that the guest has crashed. The crash notification is important to some virtualization management layers. Revert it for now until we can come up with a better solution. Fixes:a3b2cb30f2
("powerpc: Do not call ppc_md.panic in fadump panic notifier") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [mpe: Tweak change log a bit] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
5aa04b3eb6
commit
ab9dbf771f
@@ -704,6 +704,30 @@ int check_legacy_ioport(unsigned long base_port)
|
||||
}
|
||||
EXPORT_SYMBOL(check_legacy_ioport);
|
||||
|
||||
static int ppc_panic_event(struct notifier_block *this,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
/*
|
||||
* If firmware-assisted dump has been registered then trigger
|
||||
* firmware-assisted dump and let firmware handle everything else.
|
||||
*/
|
||||
crash_fadump(NULL, ptr);
|
||||
ppc_md.panic(ptr); /* May not return */
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static struct notifier_block ppc_panic_block = {
|
||||
.notifier_call = ppc_panic_event,
|
||||
.priority = INT_MIN /* may not return; must be done last */
|
||||
};
|
||||
|
||||
void __init setup_panic(void)
|
||||
{
|
||||
if (!ppc_md.panic)
|
||||
return;
|
||||
atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CHECK_CACHE_COHERENCY
|
||||
/*
|
||||
* For platforms that have configurable cache-coherency. This function
|
||||
@@ -848,6 +872,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
/* Probe the machine type, establish ppc_md. */
|
||||
probe_machine();
|
||||
|
||||
/* Setup panic notifier if requested by the platform. */
|
||||
setup_panic();
|
||||
|
||||
/*
|
||||
* Configure ppc_md.power_save (ppc32 only, 64-bit machines do
|
||||
* it from their respective probe() function.
|
||||
|
Reference in New Issue
Block a user