linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [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:03 ` [PATCH 01/41] dt: Add of_device_compatible_match() Benjamin Herrenschmidt
                   ` (35 more replies)
  0 siblings, 36 replies; 73+ 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] 73+ messages in thread
* [PATCH 36/41] powerpc: Re-order setup_panic()
@ 2016-07-05  5:07 Benjamin Herrenschmidt
  0 siblings, 0 replies; 73+ 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] 73+ messages in thread

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

Thread overview: 73+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:03 ` [PATCH 01/41] dt: Add of_device_compatible_match() Benjamin Herrenschmidt
2016-07-05  5:03 ` [PATCH 02/41] drm: Fix broken use of _PAGE_NO_CACHE on powerpc Benjamin Herrenschmidt
2016-07-07 12:38   ` Michael Ellerman
2016-07-07 13:04     ` Benjamin Herrenschmidt
2016-07-05  5:03 ` [PATCH 03/41] powerpc/prom_init: PTRRELOC is not needed Benjamin Herrenschmidt
2016-07-05  5:03 ` [PATCH 04/41] powerpc: Make PTRRELOC() 32-bit only Benjamin Herrenschmidt
2016-07-05  5:03 ` [PATCH 05/41] powerpc: Factor do_feature_fixup calls Benjamin Herrenschmidt
2016-07-21 11:09   ` [05/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 06/41] powerpc: Move 64-bit feature fixup earlier Benjamin Herrenschmidt
2016-07-21 11:09   ` [06/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 07/41] powerpc: Move 64-bit memory reserves to setup_arch() Benjamin Herrenschmidt
2016-07-21 11:09   ` [07/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 08/41] powerpc: Move epapr_paravirt_early_init() to early_init_devtree() Benjamin Herrenschmidt
2016-07-15 10:53   ` [08/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 09/41] powerpc: Update obsolete comments in setup_32.c about entry conditions Benjamin Herrenschmidt
2016-07-15 10:53   ` [09/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 10/41] powerpc: Add comment explaining the purpose of setup_kdump_trampoline() Benjamin Herrenschmidt
2016-07-15 10:53   ` [10/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 11/41] powerpc/dart: Use a cachable DART Benjamin Herrenschmidt
2016-07-21 11:09   ` [11/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 12/41] powerpc: Move FW feature probing out of pseries probe() Benjamin Herrenschmidt
2016-07-21 11:09   ` [12/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 13/41] powerpc: Put exception configuration in a common place Benjamin Herrenschmidt
2016-07-21 11:09   ` [13/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 14/41] powerpc/pmac: Remove early allocation of the SMU command buffer Benjamin Herrenschmidt
2016-07-21 11:09   ` [14/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 15/41] powerpc/64: Move MMU backend selection out of platform code Benjamin Herrenschmidt
2016-07-21 11:09   ` [15/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 16/41] powerpc/pasemi: Remove IOBMAP allocation from platform probe() Benjamin Herrenschmidt
2016-07-21 11:09   ` [16/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 17/41] powerpc/mm/hash: Don't use machine_is() early during boot Benjamin Herrenschmidt
2016-07-21 11:09   ` [17/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 18/41] powerpc/rtas: Don't test for machine type in rtas_initialize() Benjamin Herrenschmidt
2016-07-15 10:53   ` [18/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 19/41] powerpc: Don't test for machine type in smp_setup_cpu_maps() Benjamin Herrenschmidt
2016-07-15 10:53   ` [19/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 20/41] powerpc/mm/hash64: Don't test for machine type to detect HEA special case Benjamin Herrenschmidt
2016-07-21 11:09   ` [20/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 21/41] powerpc/pmac: Remove spurrious machine type test Benjamin Herrenschmidt
2016-07-21 11:09   ` [21/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 22/41] powerpc/mm: Move hash table ops to a separate structure Benjamin Herrenschmidt
2016-07-21 11:09   ` [22/41] " Michael Ellerman
2016-07-05  5:03 ` [PATCH 23/41] powerpc: Ensure that ppc_md is empty before probing for machine type Benjamin Herrenschmidt
2016-07-21 11:09   ` [23/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 24/41] powerpc: Move 64-bit probe_machine() to later in the boot process Benjamin Herrenschmidt
2016-07-21 11:09   ` [24/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 25/41] powerpc/cell: Don't use flat device-tree after boot Benjamin Herrenschmidt
2016-07-15 10:53   ` [25/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 26/41] powerpc/85xx/ge_imp3a: Don't use the " Benjamin Herrenschmidt
2016-07-15 10:53   ` [26/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 27/41] powerpc/85xx/mpc85xx_ds: " Benjamin Herrenschmidt
2016-07-15 10:53   ` [27/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 28/41] powerpc/85xx/mpc85xx_rdb: " Benjamin Herrenschmidt
2016-07-15 10:53   ` [28/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 29/41] powerpc: Move 32-bit probe() machine to later in the boot process Benjamin Herrenschmidt
2016-07-21 11:09   ` [29/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 30/41] powerpc: Get rid of ppc_md.init_early() Benjamin Herrenschmidt
2016-07-21 11:09   ` [30/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 31/41] powerpc/64: Move the boot time info banner to a separate function Benjamin Herrenschmidt
2016-07-21 11:09   ` [31/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 32/41] powerpc/64: Move setting of {i, d}cache_bsize to initialize_cache_info() Benjamin Herrenschmidt
2016-07-21 11:09   ` [32/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 33/41] powerpc/64: Move the content of setup_system() to setup_arch() Benjamin Herrenschmidt
2016-07-21 11:09   ` [33/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 34/41] powerpc/32: Move cache info inits to a separate function Benjamin Herrenschmidt
2016-07-21 11:09   ` [34/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 35/41] powerpc: Re-order the call to smp_setup_cpu_maps() Benjamin Herrenschmidt
2016-07-21 11:09   ` [35/41] " Michael Ellerman
2016-07-05  5:04 ` [PATCH 36/41] powerpc: Re-order setup_panic() Benjamin Herrenschmidt
2016-07-05  5:17   ` Benjamin Herrenschmidt
2016-07-21 11:09   ` [36/41] " Michael Ellerman
  -- strict thread matches above, loose matches on Subject: below --
2016-07-05  5:07 [PATCH 36/41] " 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).