Do it right after probe_machine() since it's about testing ppc_md,
and put the test in the common code.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
void __init setup_panic(void)
{
+ if (!ppc_md.panic)
+ return;
atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block);
}
probe_machine();
+ setup_panic();
+
setup_power_save();
find_legacy_serial_ports();
xmon_setup();
- if (ppc_md.panic)
- setup_panic();
-
init_mm.start_code = (unsigned long)_stext;
init_mm.end_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata;
/* Probe the machine type */
probe_machine();
+ setup_panic();
+
/*
* We can discover serial ports now since the above did setup the
* hash table management for us, thus ioremap works. We do that early
*/
reserve_hugetlb_gpages();
- if (ppc_md.panic)
- setup_panic();
-
klp_init_thread_info(&init_thread_info);
init_mm.start_code = (unsigned long)_stext;