diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-05 01:04:12 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-21 05:17:23 -0400 |
commit | f7b9ebb79e90b19bf6a2cb805a536258437fc3fa (patch) | |
tree | 127c71357cfc22ac4f8e0f07cb3fc02defe2e47a /arch/powerpc | |
parent | e39afba3aa11f7088ddc00d37ab34a85d960a76e (diff) |
powerpc: Re-order setup_panic()
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index b8ee1c867ee3..ca9255e3b763 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -688,6 +688,8 @@ static struct notifier_block ppc_panic_block = { | |||
688 | 688 | ||
689 | void __init setup_panic(void) | 689 | void __init setup_panic(void) |
690 | { | 690 | { |
691 | if (!ppc_md.panic) | ||
692 | return; | ||
691 | atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block); | 693 | atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block); |
692 | } | 694 | } |
693 | 695 | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 58674b602149..6247a3a4fd4b 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -277,6 +277,8 @@ void __init setup_arch(char **cmdline_p) | |||
277 | 277 | ||
278 | probe_machine(); | 278 | probe_machine(); |
279 | 279 | ||
280 | setup_panic(); | ||
281 | |||
280 | setup_power_save(); | 282 | setup_power_save(); |
281 | 283 | ||
282 | find_legacy_serial_ports(); | 284 | find_legacy_serial_ports(); |
@@ -288,9 +290,6 @@ void __init setup_arch(char **cmdline_p) | |||
288 | 290 | ||
289 | xmon_setup(); | 291 | xmon_setup(); |
290 | 292 | ||
291 | if (ppc_md.panic) | ||
292 | setup_panic(); | ||
293 | |||
294 | init_mm.start_code = (unsigned long)_stext; | 293 | init_mm.start_code = (unsigned long)_stext; |
295 | init_mm.end_code = (unsigned long) _etext; | 294 | init_mm.end_code = (unsigned long) _etext; |
296 | init_mm.end_data = (unsigned long) _edata; | 295 | init_mm.end_data = (unsigned long) _edata; |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 3fd59bca06f7..f55c25dff02c 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -649,6 +649,8 @@ void __init setup_arch(char **cmdline_p) | |||
649 | /* Probe the machine type */ | 649 | /* Probe the machine type */ |
650 | probe_machine(); | 650 | probe_machine(); |
651 | 651 | ||
652 | setup_panic(); | ||
653 | |||
652 | /* | 654 | /* |
653 | * We can discover serial ports now since the above did setup the | 655 | * We can discover serial ports now since the above did setup the |
654 | * hash table management for us, thus ioremap works. We do that early | 656 | * hash table management for us, thus ioremap works. We do that early |
@@ -696,9 +698,6 @@ void __init setup_arch(char **cmdline_p) | |||
696 | */ | 698 | */ |
697 | reserve_hugetlb_gpages(); | 699 | reserve_hugetlb_gpages(); |
698 | 700 | ||
699 | if (ppc_md.panic) | ||
700 | setup_panic(); | ||
701 | |||
702 | klp_init_thread_info(&init_thread_info); | 701 | klp_init_thread_info(&init_thread_info); |
703 | 702 | ||
704 | init_mm.start_code = (unsigned long)_stext; | 703 | init_mm.start_code = (unsigned long)_stext; |