[PATCH 12/19] ppc64: Move setup of systemcfg->platform into iSeries device tree

Michael Ellerman michael at ellerman.id.au
Tue Jul 26 18:58:41 EST 2005


Add /chosen/linux,platform to the device tree so we can remove iSeries
specific code in setup_system() to set systemcfg->platform.

---

 arch/ppc64/kernel/iSeries_setup.c |    5 +++++
 arch/ppc64/kernel/setup.c         |    6 ------
 2 files changed, 5 insertions(+), 6 deletions(-)

Index: work/arch/ppc64/kernel/iSeries_setup.c
===================================================================
--- work.orig/arch/ppc64/kernel/iSeries_setup.c
+++ work/arch/ppc64/kernel/iSeries_setup.c
@@ -1076,6 +1076,11 @@ void build_flat_dt(struct iseries_flat_d
 	dt_prop_u64_list(dt, "reg", tmp, 2);
 	dt_end_node(dt);
 
+	/* /chosen */
+	dt_start_node(dt, "/chosen");
+	dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR);
+	dt_end_node(dt);
+
 	dt_end_node(dt);
 
 	dt_push_u32(dt, OF_DT_END);
Index: work/arch/ppc64/kernel/setup.c
===================================================================
--- work.orig/arch/ppc64/kernel/setup.c
+++ work/arch/ppc64/kernel/setup.c
@@ -572,12 +572,6 @@ void __init setup_system(void)
 {
 	DBG(" -> setup_system()\n");
 
-#ifdef CONFIG_PPC_ISERIES
-	/* pSeries systems are identified in prom.c via OF. */
-	if (itLpNaca.xLparInstalled == 1)
-		systemcfg->platform = PLATFORM_ISERIES_LPAR;
-#endif /* CONFIG_PPC_ISERIES */
-
 	/*
 	 * Unflatten the device-tree passed by prom_init or kexec
 	 */



More information about the Linuxppc64-dev mailing list