linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 36/41] powerpc: Re-order setup_panic()
@ 2016-07-05  5:07 Benjamin Herrenschmidt
  2016-07-05  5:07 ` [PATCH 37/41] powerpc/64: Make a few boot functions __init Benjamin Herrenschmidt
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Benjamin Herrenschmidt @ 2016-07-05  5:07 UTC (permalink / raw)
  To: linuxppc-dev

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>
---
 arch/powerpc/kernel/setup-common.c | 2 ++
 arch/powerpc/kernel/setup_32.c     | 5 ++---
 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 7e85fac..d0256a3 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -687,6 +687,8 @@ static struct notifier_block ppc_panic_block = {
 
 void __init setup_panic(void)
 {
+	if (!ppc_md.panic)
+		return;
 	atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block);
 }
 
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 58674b6..6247a3a 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)
 
 	probe_machine();
 
+	setup_panic();
+
 	setup_power_save();
 
 	find_legacy_serial_ports();
@@ -288,9 +290,6 @@ void __init setup_arch(char **cmdline_p)
 
 	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;
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 46faafe..bb1b65e 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -647,6 +647,8 @@ void __init setup_arch(char **cmdline_p)
 	/* 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
@@ -695,9 +697,6 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	reserve_hugetlb_gpages();
 
-	if (ppc_md.panic)
-		setup_panic();
-
 	klp_init_thread_info(&init_thread_info);
 
 	init_mm.start_code = (unsigned long)_stext;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [PATCH v2 00/41] Reorganize setup code and merge 32 and 64-bit setup_arch()
@ 2016-07-05  5:03 Benjamin Herrenschmidt
  2016-07-05  5:04 ` [PATCH 36/41] powerpc: Re-order setup_panic() Benjamin Herrenschmidt
  0 siblings, 1 reply; 12+ messages in thread
From: Benjamin Herrenschmidt @ 2016-07-05  5:03 UTC (permalink / raw)
  To: linuxppc-dev

This series reorganizes the setup code, moving probe_machine() later than
when it's currently done, and sync'ing 32-bit and 64-bit enough to merge
their implementations of setup_arch(). We get rid of ppc64 setup_system()
which is subsumed by the new setup_arch().

Note: The first 2 patches could go separately. The first one is a pre
requisite for the ppc32 move of probe_machine(). The second one a general
bug fix for recent kernels which I included here so my test kernels
could build but the rest of the series doesn't depend on it.

Finally I added a few more random build fixes at the end.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-07-21 11:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05  5:07 [PATCH 36/41] powerpc: Re-order setup_panic() Benjamin Herrenschmidt
2016-07-05  5:07 ` [PATCH 37/41] powerpc/64: Make a few boot functions __init Benjamin Herrenschmidt
2016-07-21 11:09   ` [37/41] " Michael Ellerman
2016-07-05  5:07 ` [PATCH 38/41] powerpc: Merge 32-bit and 64-bit setup_arch() Benjamin Herrenschmidt
2016-07-05  5:07 ` [PATCH 39/41] powerpc/mm: Fix build of Book3E/64 with 64K pages Benjamin Herrenschmidt
2016-07-08 14:22   ` [39/41] " Michael Ellerman
2016-07-05  5:07 ` [PATCH 40/41] powerpc/pci: Fix build of Book3E/64 without EEH Benjamin Herrenschmidt
2016-07-08 14:22   ` [40/41] " Michael Ellerman
2016-07-05  5:07 ` [PATCH 41/41] powerpc: Fix build with CONFIG_MEMORY_HOTPLUG on some configs Benjamin Herrenschmidt
2016-07-08 14:22   ` [41/41] " Michael Ellerman
  -- strict thread matches above, loose matches on Subject: below --
2016-07-05  5:03 [PATCH v2 00/41] Reorganize setup code and merge 32 and 64-bit setup_arch() Benjamin Herrenschmidt
2016-07-05  5:04 ` [PATCH 36/41] powerpc: Re-order setup_panic() Benjamin Herrenschmidt
2016-07-05  5:17   ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).