linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] powerpc: Remove unused ppc64_terminate_msg()
@ 2009-01-15  6:43 Michael Ellerman
  2009-01-15  6:43 ` [PATCH 2/4] powerpc: Add ppc_progress() wrapper Michael Ellerman
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Michael Ellerman @ 2009-01-15  6:43 UTC (permalink / raw)
  To: linuxppc-dev

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/machdep.h |    2 --
 arch/powerpc/kernel/setup_64.c     |    7 -------
 2 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 2740c44..6c34a0d 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -327,8 +327,6 @@ extern void __devinit smp_generic_take_timebase(void);
  */
 /* Print a boot progress message. */
 void ppc64_boot_msg(unsigned int src, const char *msg);
-/* Print a termination message (print only -- does not stop the kernel) */
-void ppc64_terminate_msg(unsigned int src, const char *msg);
 
 static inline void log_error(char *buf, unsigned int err_type, int fatal)
 {
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 2d34196..73e16e2 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -578,13 +578,6 @@ void ppc64_boot_msg(unsigned int src, const char *msg)
 	printk("[boot]%04x %s\n", src, msg);
 }
 
-/* Print a termination message (print only -- does not stop the kernel) */
-void ppc64_terminate_msg(unsigned int src, const char *msg)
-{
-	ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_TERM_MESSAGE|src, msg);
-	printk("[terminate]%04x %s\n", src, msg);
-}
-
 void cpu_die(void)
 {
 	if (ppc_md.cpu_die)
-- 
1.5.5

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

* [PATCH 2/4] powerpc: Add ppc_progress() wrapper
  2009-01-15  6:43 [PATCH 1/4] powerpc: Remove unused ppc64_terminate_msg() Michael Ellerman
@ 2009-01-15  6:43 ` Michael Ellerman
  2009-01-15  7:23   ` Grant Likely
  2009-01-15 11:34   ` Paul Mackerras
  2009-01-15  6:43 ` [PATCH 3/4] powerpc: Replace ppc_md.progress() uses with ppc_progress() Michael Ellerman
  2009-01-15  6:43 ` [PATCH 4/4] powerpc: Remove printk-only progress implementations Michael Ellerman
  2 siblings, 2 replies; 10+ messages in thread
From: Michael Ellerman @ 2009-01-15  6:43 UTC (permalink / raw)
  To: linuxppc-dev

There's quite a lot of code that does:

if (ppc_md.progress)
	ppc_md.progress(...)

So move that idiom into a wrapper. Having a wrapper also allows us
to have a fallback to printk if no progress routine is specified.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/machdep.h |    2 ++
 arch/powerpc/kernel/setup-common.c |    8 ++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 6c34a0d..9e4ab07 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -328,6 +328,8 @@ extern void __devinit smp_generic_take_timebase(void);
 /* Print a boot progress message. */
 void ppc64_boot_msg(unsigned int src, const char *msg);
 
+extern void ppc_progress(char *msg, unsigned short code);
+
 static inline void log_error(char *buf, unsigned int err_type, int fatal)
 {
 	if (ppc_md.log_error)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 705fc4b..cc4997b 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -669,3 +669,11 @@ static int powerpc_debugfs_init(void)
 }
 arch_initcall(powerpc_debugfs_init);
 #endif
+
+void ppc_progress(char *msg, unsigned short code)
+{
+	if (ppc_md.progress)
+		ppc_md.progress(msg, code);
+	else
+		printk(KERN_DEBUG "*** %04x : %s\n", code, msg ? msg : "");
+}
-- 
1.5.5

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

* [PATCH 3/4] powerpc: Replace ppc_md.progress() uses with ppc_progress()
  2009-01-15  6:43 [PATCH 1/4] powerpc: Remove unused ppc64_terminate_msg() Michael Ellerman
  2009-01-15  6:43 ` [PATCH 2/4] powerpc: Add ppc_progress() wrapper Michael Ellerman
@ 2009-01-15  6:43 ` Michael Ellerman
  2009-01-15  7:25   ` Grant Likely
  2009-01-15  6:43 ` [PATCH 4/4] powerpc: Remove printk-only progress implementations Michael Ellerman
  2 siblings, 1 reply; 10+ messages in thread
From: Michael Ellerman @ 2009-01-15  6:43 UTC (permalink / raw)
  To: linuxppc-dev

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/kernel/setup_32.c                    |   11 +++++------
 arch/powerpc/mm/init_32.c                         |   15 +++++----------
 arch/powerpc/mm/ppc_mmu_32.c                      |    8 ++++----
 arch/powerpc/platforms/52xx/efika.c               |    3 +--
 arch/powerpc/platforms/52xx/lite5200.c            |    3 +--
 arch/powerpc/platforms/52xx/mpc5200_simple.c      |    3 +--
 arch/powerpc/platforms/82xx/ep8248e.c             |    6 ++----
 arch/powerpc/platforms/82xx/mgcoge.c              |    6 ++----
 arch/powerpc/platforms/82xx/mpc8272_ads.c         |    6 ++----
 arch/powerpc/platforms/82xx/pq2fads.c             |    6 ++----
 arch/powerpc/platforms/83xx/asp834x.c             |    3 +--
 arch/powerpc/platforms/83xx/mpc831x_rdb.c         |    3 +--
 arch/powerpc/platforms/83xx/mpc832x_mds.c         |    3 +--
 arch/powerpc/platforms/83xx/mpc832x_rdb.c         |    3 +--
 arch/powerpc/platforms/83xx/mpc834x_itx.c         |    3 +--
 arch/powerpc/platforms/83xx/mpc834x_mds.c         |    3 +--
 arch/powerpc/platforms/83xx/mpc836x_mds.c         |    3 +--
 arch/powerpc/platforms/83xx/mpc836x_rdk.c         |    3 +--
 arch/powerpc/platforms/83xx/mpc837x_mds.c         |    3 +--
 arch/powerpc/platforms/83xx/mpc837x_rdb.c         |    3 +--
 arch/powerpc/platforms/83xx/sbc834x.c             |    3 +--
 arch/powerpc/platforms/85xx/ksi8560.c             |    3 +--
 arch/powerpc/platforms/85xx/mpc8536_ds.c          |    3 +--
 arch/powerpc/platforms/85xx/mpc85xx_ads.c         |    3 +--
 arch/powerpc/platforms/85xx/mpc85xx_cds.c         |   13 +++++--------
 arch/powerpc/platforms/85xx/mpc85xx_ds.c          |    3 +--
 arch/powerpc/platforms/85xx/mpc85xx_mds.c         |    3 +--
 arch/powerpc/platforms/85xx/sbc8548.c             |    3 +--
 arch/powerpc/platforms/85xx/sbc8560.c             |    3 +--
 arch/powerpc/platforms/85xx/stx_gp3.c             |    3 +--
 arch/powerpc/platforms/85xx/tqm85xx.c             |    3 +--
 arch/powerpc/platforms/86xx/mpc8610_hpcd.c        |    3 +--
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c        |    3 +--
 arch/powerpc/platforms/86xx/sbc8641d.c            |    3 +--
 arch/powerpc/platforms/chrp/setup.c               |    5 ++---
 arch/powerpc/platforms/embedded6xx/holly.c        |    6 ++----
 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c |    7 +++----
 arch/powerpc/platforms/powermac/smp.c             |   18 ++++++++----------
 arch/powerpc/platforms/pseries/setup.c            |    4 ++--
 39 files changed, 70 insertions(+), 119 deletions(-)

diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 9e1ca74..a1caaa9 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -139,8 +139,7 @@ notrace void __init machine_init(unsigned long dt_ptr)
 	    cpu_has_feature(CPU_FTR_CAN_NAP))
 		ppc_md.power_save = e500_idle;
 #endif
-	if (ppc_md.progress)
-		ppc_md.progress("id mach(): done", 0x200);
+	ppc_progress("id mach(): done", 0x200);
 }
 
 #ifdef CONFIG_BOOKE_WDT
@@ -219,8 +218,7 @@ EXPORT_SYMBOL(nvram_sync);
 int __init ppc_init(void)
 {
 	/* clear the progress line */
-	if (ppc_md.progress)
-		ppc_md.progress("             ", 0xffff);
+	ppc_progress("             ", 0xffff);
 
 	/* call platform init */
 	if (ppc_md.init != NULL) {
@@ -322,7 +320,7 @@ void __init setup_arch(char **cmdline_p)
 
 	/* set up the bootmem stuff with available memory */
 	do_init_bootmem();
-	if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab);
+	ppc_progress("setup_arch: bootmem", 0x3eab);
 
 #ifdef CONFIG_DUMMY_CONSOLE
 	conswitchp = &dummy_con;
@@ -330,7 +328,8 @@ void __init setup_arch(char **cmdline_p)
 
 	if (ppc_md.setup_arch)
 		ppc_md.setup_arch();
-	if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
+
+	ppc_progress("arch: exit", 0x3eab);
 
 	paging_init();
 
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 666a5e8..d1bd21e 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -119,8 +119,7 @@ void MMU_setup(void)
  */
 void __init MMU_init(void)
 {
-	if (ppc_md.progress)
-		ppc_md.progress("MMU:enter", 0x111);
+	ppc_progress("MMU:enter", 0x111);
 
 	/* 601 can only access 16MB at the moment */
 	if (PVR_VER(mfspr(SPRN_PVR)) == 1)
@@ -159,13 +158,11 @@ void __init MMU_init(void)
 	}
 
 	/* Initialize the MMU hardware */
-	if (ppc_md.progress)
-		ppc_md.progress("MMU:hw init", 0x300);
+	ppc_progress("MMU:hw init", 0x300);
 	MMU_init_hw();
 
 	/* Map in all of RAM starting at KERNELBASE */
-	if (ppc_md.progress)
-		ppc_md.progress("MMU:mapin", 0x301);
+	ppc_progress("MMU:mapin", 0x301);
 	mapin_ram();
 
 #ifdef CONFIG_HIGHMEM
@@ -176,11 +173,9 @@ void __init MMU_init(void)
 	ioremap_bot = ioremap_base;
 
 	/* Map in I/O resources */
-	if (ppc_md.progress)
-		ppc_md.progress("MMU:setio", 0x302);
+	ppc_progress("MMU:setio", 0x302);
 
-	if (ppc_md.progress)
-		ppc_md.progress("MMU:exit", 0x211);
+	ppc_progress("MMU:exit", 0x211);
 
 	/* From now on, btext is no longer BAT mapped if it was at all */
 #ifdef CONFIG_BOOTX_TEXT
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index 45d9253..c1a298c 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -204,7 +204,7 @@ void __init MMU_init_hw(void)
 		return;
 	}
 
-	if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105);
+	ppc_progress("hash:enter", 0x105);
 
 #define LG_HPTEG_SIZE	6		/* 64 bytes per HPTEG */
 #define SDR1_LOW_BITS	((n_hpteg - 1) >> 10)
@@ -228,7 +228,7 @@ void __init MMU_init_hw(void)
 	/*
 	 * Find some memory for the hash table.
 	 */
-	if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322);
+	ppc_progress("hash:find piece", 0x322);
 	Hash = __va(lmb_alloc_base(Hash_size, Hash_size,
 				   __initial_memory_limit_addr));
 	cacheable_memzero(Hash, Hash_size);
@@ -243,7 +243,7 @@ void __init MMU_init_hw(void)
 	/*
 	 * Patch up the instructions in hashtable.S:create_hpte
 	 */
-	if ( ppc_md.progress ) ppc_md.progress("hash:patch", 0x345);
+	ppc_progress("hash:patch", 0x345);
 	Hash_mask = n_hpteg - 1;
 	hmask = Hash_mask >> (16 - LG_HPTEG_SIZE);
 	mb2 = mb = 32 - LG_HPTEG_SIZE - lg_n_hpteg;
@@ -276,5 +276,5 @@ void __init MMU_init_hw(void)
 	flush_icache_range((unsigned long) &flush_hash_patch_A[0],
 			   (unsigned long) &flush_hash_patch_B[1]);
 
-	if ( ppc_md.progress ) ppc_md.progress("hash:done", 0x205);
+	ppc_progress("hash:done", 0x205);
 }
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index a2068fa..4b0d689 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -190,8 +190,7 @@ static void __init efika_setup_arch(void)
 	mpc52xx_pm_init();
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
+	ppc_progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
 }
 
 static int __init efika_probe(void)
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 6d584f4..7d86669 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -149,8 +149,7 @@ static void lite5200_resume_finish(void __iomem *mbar)
 
 static void __init lite5200_setup_arch(void)
 {
-	if (ppc_md.progress)
-		ppc_md.progress("lite5200_setup_arch()", 0);
+	ppc_progress("lite5200_setup_arch()", 0);
 
 	/* Map important registers from the internal memory map */
 	mpc52xx_map_common_devices();
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
index a3bda0b..5d76177 100644
--- a/arch/powerpc/platforms/52xx/mpc5200_simple.c
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -36,8 +36,7 @@
  */
 static void __init mpc5200_simple_setup_arch(void)
 {
-	if (ppc_md.progress)
-		ppc_md.progress("mpc5200_simple_setup_arch()", 0);
+	ppc_progress("mpc5200_simple_setup_arch()", 0);
 
 	/* Map important registers from the internal memory map */
 	mpc52xx_map_common_devices();
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
index 0eb6d7f..7daef42 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -252,8 +252,7 @@ static void __init init_ioports(void)
 
 static void __init ep8248e_setup_arch(void)
 {
-	if (ppc_md.progress)
-		ppc_md.progress("ep8248e_setup_arch()", 0);
+	ppc_progress("ep8248e_setup_arch()", 0);
 
 	cpm2_reset();
 
@@ -283,8 +282,7 @@ static void __init ep8248e_setup_arch(void)
 
 	init_ioports();
 
-	if (ppc_md.progress)
-		ppc_md.progress("ep8248e_setup_arch(), finish", 0);
+	ppc_progress("ep8248e_setup_arch(), finish", 0);
 }
 
 static  __initdata struct of_device_id of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c b/arch/powerpc/platforms/82xx/mgcoge.c
index c2af169..30b7952 100644
--- a/arch/powerpc/platforms/82xx/mgcoge.c
+++ b/arch/powerpc/platforms/82xx/mgcoge.c
@@ -78,8 +78,7 @@ static void __init init_ioports(void)
 
 static void __init mgcoge_setup_arch(void)
 {
-	if (ppc_md.progress)
-		ppc_md.progress("mgcoge_setup_arch()", 0);
+	ppc_progress("mgcoge_setup_arch()", 0);
 
 	cpm2_reset();
 
@@ -90,8 +89,7 @@ static void __init mgcoge_setup_arch(void)
 
 	init_ioports();
 
-	if (ppc_md.progress)
-		ppc_md.progress("mgcoge_setup_arch(), finish", 0);
+	ppc_progress("mgcoge_setup_arch(), finish", 0);
 }
 
 static  __initdata struct of_device_id of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
index 8054c68..42fd93c 100644
--- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
@@ -126,8 +126,7 @@ static void __init mpc8272_ads_setup_arch(void)
 	struct device_node *np;
 	__be32 __iomem *bcsr;
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc8272_ads_setup_arch()", 0);
+	ppc_progress("mpc8272_ads_setup_arch()", 0);
 
 	cpm2_reset();
 
@@ -155,8 +154,7 @@ static void __init mpc8272_ads_setup_arch(void)
 	init_ioports();
 	pq2_init_pci();
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc8272_ads_setup_arch(), finish", 0);
+	ppc_progress("mpc8272_ads_setup_arch(), finish", 0);
 }
 
 static struct of_device_id __initdata of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/82xx/pq2fads.c b/arch/powerpc/platforms/82xx/pq2fads.c
index e1dceee..44a3153 100644
--- a/arch/powerpc/platforms/82xx/pq2fads.c
+++ b/arch/powerpc/platforms/82xx/pq2fads.c
@@ -118,8 +118,7 @@ static void __init pq2fads_setup_arch(void)
 	struct device_node *np;
 	__be32 __iomem *bcsr;
 
-	if (ppc_md.progress)
-		ppc_md.progress("pq2fads_setup_arch()", 0);
+	ppc_progress("pq2fads_setup_arch()", 0);
 
 	cpm2_reset();
 
@@ -153,8 +152,7 @@ static void __init pq2fads_setup_arch(void)
 
 	pq2_init_pci();
 
-	if (ppc_md.progress)
-		ppc_md.progress("pq2fads_setup_arch(), finish", 0);
+	ppc_progress("pq2fads_setup_arch(), finish", 0);
 }
 
 /*
diff --git a/arch/powerpc/platforms/83xx/asp834x.c b/arch/powerpc/platforms/83xx/asp834x.c
index bb30d67..2ee392d 100644
--- a/arch/powerpc/platforms/83xx/asp834x.c
+++ b/arch/powerpc/platforms/83xx/asp834x.c
@@ -30,8 +30,7 @@
  */
 static void __init asp834x_setup_arch(void)
 {
-	if (ppc_md.progress)
-		ppc_md.progress("asp834x_setup_arch()", 0);
+	ppc_progress("asp834x_setup_arch()", 0);
 
 	mpc834x_usb_cfg();
 }
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
index 5177bdd..4e378f1 100644
--- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
@@ -32,8 +32,7 @@ static void __init mpc831x_rdb_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc831x_rdb_setup_arch()", 0);
+	ppc_progress("mpc831x_rdb_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index ec0b401..079e60f 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -59,8 +59,7 @@ static void __init mpc832x_sys_setup_arch(void)
 	struct device_node *np;
 	u8 __iomem *bcsr_regs = NULL;
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc832x_sys_setup_arch()", 0);
+	ppc_progress("mpc832x_sys_setup_arch()", 0);
 
 	/* Map BCSR area */
 	np = of_find_node_by_name(NULL, "bcsr");
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index 2a1295f..3d9d7f1 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -92,8 +92,7 @@ static void __init mpc832x_rdb_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc832x_rdb_setup_arch()", 0);
+	ppc_progress("mpc832x_rdb_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 76092d3..1d8b887 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -62,8 +62,7 @@ static void __init mpc834x_itx_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc834x_itx_setup_arch()", 0);
+	ppc_progress("mpc834x_itx_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index fc3f2ed..fbd70a9 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -81,8 +81,7 @@ static void __init mpc834x_mds_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc834x_mds_setup_arch()", 0);
+	ppc_progress("mpc834x_mds_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index 09e9d6f..7f33105 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -67,8 +67,7 @@ static void __init mpc836x_mds_setup_arch(void)
 	struct device_node *np;
 	u8 __iomem *bcsr_regs = NULL;
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc836x_mds_setup_arch()", 0);
+	ppc_progress("mpc836x_mds_setup_arch()", 0);
 
 	/* Map BCSR area */
 	np = of_find_node_by_name(NULL, "bcsr");
diff --git a/arch/powerpc/platforms/83xx/mpc836x_rdk.c b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
index b0090aa..6174bd8 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_rdk.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
@@ -44,8 +44,7 @@ static void __init mpc836x_rdk_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc836x_rdk_setup_arch()", 0);
+	ppc_progress("mpc836x_rdk_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index 530ef99..0970544 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -80,8 +80,7 @@ static void __init mpc837x_mds_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc837x_mds_setup_arch()", 0);
+	ppc_progress("mpc837x_mds_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") {
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index 1d09654..c5a987d 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -32,8 +32,7 @@ static void __init mpc837x_rdb_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc837x_rdb_setup_arch()", 0);
+	ppc_progress("mpc837x_rdb_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c
index 156c4e2..70c2ab2 100644
--- a/arch/powerpc/platforms/83xx/sbc834x.c
+++ b/arch/powerpc/platforms/83xx/sbc834x.c
@@ -52,8 +52,7 @@ static void __init sbc834x_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("sbc834x_setup_arch()", 0);
+	ppc_progress("sbc834x_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c
index 81cee7b..9938c95 100644
--- a/arch/powerpc/platforms/85xx/ksi8560.c
+++ b/arch/powerpc/platforms/85xx/ksi8560.c
@@ -181,8 +181,7 @@ static void __init ksi8560_setup_arch(void)
 	else
 		printk(KERN_ERR "Can't find CPLD in device tree\n");
 
-	if (ppc_md.progress)
-		ppc_md.progress("ksi8560_setup_arch()", 0);
+	ppc_progress("ksi8560_setup_arch()", 0);
 
 #ifdef CONFIG_CPM2
 	cpm2_reset();
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c
index 1bf5aef..17397cb 100644
--- a/arch/powerpc/platforms/85xx/mpc8536_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c
@@ -67,8 +67,7 @@ static void __init mpc8536_ds_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc8536_ds_setup_arch()", 0);
+	ppc_progress("mpc8536_ds_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_node_by_type(np, "pci") {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 21f0090..b83976c 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -188,8 +188,7 @@ static void __init mpc85xx_ads_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc85xx_ads_setup_arch()", 0);
+	ppc_progress("mpc85xx_ads_setup_arch()", 0);
 
 #ifdef CONFIG_CPM2
 	cpm2_reset();
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index aeb6a5b..15b35e2 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -269,22 +269,19 @@ machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
  */
 static void __init mpc85xx_cds_setup_arch(void)
 {
+	char buf[40];
 #ifdef CONFIG_PCI
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc85xx_cds_setup_arch()", 0);
+	ppc_progress("mpc85xx_cds_setup_arch()", 0);
 
 	cadmus = ioremap(CADMUS_BASE, CADMUS_SIZE);
 	cds_pci_slot = ((cadmus[CM_CSR] >> 6) & 0x3) + 1;
 
-	if (ppc_md.progress) {
-		char buf[40];
-		snprintf(buf, 40, "CDS Version = 0x%x in slot %d\n",
-				cadmus[CM_VER], cds_pci_slot);
-		ppc_md.progress(buf, 0);
-	}
+	snprintf(buf, 40, "CDS Version = 0x%x in slot %d\n",
+		 cadmus[CM_VER], cds_pci_slot);
+	ppc_progress(buf, 0);
 
 #ifdef CONFIG_PCI
 	for_each_node_by_type(np, "pci") {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 7326d90..1101911 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -157,8 +157,7 @@ static void __init mpc85xx_ds_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc85xx_ds_setup_arch()", 0);
+	ppc_progress("mpc85xx_ds_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_node_by_type(np, "pci") {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 658a36f..abd01df 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -156,8 +156,7 @@ static void __init mpc85xx_mds_setup_arch(void)
 	struct device_node *np;
 	static u8 __iomem *bcsr_regs = NULL;
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc85xx_mds_setup_arch()", 0);
+	ppc_progress("mpc85xx_mds_setup_arch()", 0);
 
 	/* Map BCSR area */
 	np = of_find_node_by_name(NULL, "bcsr");
diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c
index 7ec77ce..7fca09a 100644
--- a/arch/powerpc/platforms/85xx/sbc8548.c
+++ b/arch/powerpc/platforms/85xx/sbc8548.c
@@ -114,8 +114,7 @@ static void __init sbc8548_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("sbc8548_setup_arch()", 0);
+	ppc_progress("sbc8548_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_node_by_type(np, "pci") {
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c
index 472f254..fbee89e 100644
--- a/arch/powerpc/platforms/85xx/sbc8560.c
+++ b/arch/powerpc/platforms/85xx/sbc8560.c
@@ -177,8 +177,7 @@ static void __init sbc8560_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("sbc8560_setup_arch()", 0);
+	ppc_progress("sbc8560_setup_arch()", 0);
 
 #ifdef CONFIG_CPM2
 	cpm2_reset();
diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c
index 0cca8f5..0d9aa32 100644
--- a/arch/powerpc/platforms/85xx/stx_gp3.c
+++ b/arch/powerpc/platforms/85xx/stx_gp3.c
@@ -114,8 +114,7 @@ static void __init stx_gp3_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("stx_gp3_setup_arch()", 0);
+	ppc_progress("stx_gp3_setup_arch()", 0);
 
 #ifdef CONFIG_CPM2
 	cpm2_reset();
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
index 2933a8e..0f7a399 100644
--- a/arch/powerpc/platforms/85xx/tqm85xx.c
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -112,8 +112,7 @@ static void __init tqm85xx_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("tqm85xx_setup_arch()", 0);
+	ppc_progress("tqm85xx_setup_arch()", 0);
 
 #ifdef CONFIG_CPM2
 	cpm2_reset();
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index e8d54ac..34bb86e 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -221,8 +221,7 @@ static void __init mpc86xx_hpcd_setup_arch(void)
 	struct device_node *np;
 	unsigned char *pixis;
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc86xx_hpcd_setup_arch()", 0);
+	ppc_progress("mpc86xx_hpcd_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_node_by_type(np, "pci") {
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 27e0e68..0e7d30d 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -73,8 +73,7 @@ mpc86xx_hpcn_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0);
+	ppc_progress("mpc86xx_hpcn_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") {
diff --git a/arch/powerpc/platforms/86xx/sbc8641d.c b/arch/powerpc/platforms/86xx/sbc8641d.c
index 5fd7ed4..68b4550 100644
--- a/arch/powerpc/platforms/86xx/sbc8641d.c
+++ b/arch/powerpc/platforms/86xx/sbc8641d.c
@@ -44,8 +44,7 @@ sbc8641_setup_arch(void)
 	struct device_node *np;
 #endif
 
-	if (ppc_md.progress)
-		ppc_md.progress("sbc8641_setup_arch()", 0);
+	ppc_progress("sbc8641_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
 	for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie")
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 272d79a..a237d56 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -361,7 +361,7 @@ void __init chrp_setup_arch(void)
 	 * Print the banner, then scroll down so boot progress
 	 * can be printed.  -- Cort
 	 */
-	if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0);
+	ppc_progress("Linux/PPC "UTS_RELEASE"\n", 0x0);
 }
 
 void
@@ -617,8 +617,7 @@ chrp_init2(void)
 	}
 	of_node_put(device);
 
-	if (ppc_md.progress)
-		ppc_md.progress("  Have fun!    ", 0x7777);
+	ppc_progress("  Have fun!    ", 0x7777);
 }
 
 static int __init chrp_probe(void)
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index b21fde5..20bbcae 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -114,8 +114,7 @@ static void __init holly_setup_arch(void)
 {
 	struct device_node *np;
 
-	if (ppc_md.progress)
-		ppc_md.progress("holly_setup_arch():set_bridge", 0);
+	ppc_progress("holly_setup_arch():set_bridge", 0);
 
 	tsi108_csr_vir_base = get_vir_csrbase();
 
@@ -127,8 +126,7 @@ static void __init holly_setup_arch(void)
 		tsi108_setup_pci(np, HOLLY_PCI_CFG_PHYS, 1);
 
 	ppc_md.pci_exclude_device = holly_exclude_device;
-	if (ppc_md.progress)
-		ppc_md.progress("tsi108: resources set", 0x100);
+	ppc_progress("tsi108: resources set", 0x100);
 
 	printk(KERN_INFO "PPC750GX/CL Platform\n");
 }
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index 7a2ba39..e42cbf9 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -65,8 +65,8 @@ int mpc7448_hpc2_exclude_device(struct pci_controller *hose,
 static void __init mpc7448_hpc2_setup_arch(void)
 {
 	struct device_node *np;
-	if (ppc_md.progress)
-		ppc_md.progress("mpc7448_hpc2_setup_arch():set_bridge", 0);
+
+	ppc_progress("mpc7448_hpc2_setup_arch():set_bridge", 0);
 
 	tsi108_csr_vir_base = get_vir_csrbase();
 
@@ -76,8 +76,7 @@ static void __init mpc7448_hpc2_setup_arch(void)
 		tsi108_setup_pci(np, MPC7448HPC2_PCI_CFG_PHYS, 0);
 
 	ppc_md.pci_exclude_device = mpc7448_hpc2_exclude_device;
-	if (ppc_md.progress)
-		ppc_md.progress("tsi108: resources set", 0x100);
+	ppc_progress("tsi108: resources set", 0x100);
 #endif
 
 	printk(KERN_INFO "MPC7448HPC2 (TAIGA) Platform\n");
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index bd8817b..c0e1c46 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -241,7 +241,7 @@ static void __init psurge_quad_init(void)
 {
 	int procbits;
 
-	if (ppc_md.progress) ppc_md.progress("psurge_quad_init", 0x351);
+	ppc_progress("psurge_quad_init", 0x351);
 	procbits = ~PSURGE_QUAD_IN(PSURGE_QUAD_WHICH_CPU);
 	if (psurge_type == PSURGE_QUAD_ICEGRASS)
 		PSURGE_QUAD_BIS(PSURGE_QUAD_RESET_CTL, procbits);
@@ -321,7 +321,7 @@ static int __init smp_psurge_probe(void)
 		set_hard_smp_processor_id(i, i);
 	}
 
-	if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352);
+	ppc_progress("smp_psurge_probe - done", 0x352);
 
 	return ncpus;
 }
@@ -337,7 +337,7 @@ static void __init smp_psurge_kick_cpu(int nr)
 		asm volatile("dcbf 0,%0" : : "r" (a) : "memory");
 	asm volatile("sync");
 
-	if (ppc_md.progress) ppc_md.progress("smp_psurge_kick_cpu", 0x353);
+	ppc_progress("smp_psurge_kick_cpu", 0x353);
 
 	out_be32(psurge_start, start);
 	mb();
@@ -350,7 +350,7 @@ static void __init smp_psurge_kick_cpu(int nr)
 		barrier();
 	psurge_clr_ipi(nr);
 
-	if (ppc_md.progress) ppc_md.progress("smp_psurge_kick_cpu - done", 0x354);
+	ppc_progress("smp_psurge_kick_cpu - done", 0x354);
 }
 
 /*
@@ -753,7 +753,7 @@ static int __init smp_core99_probe(void)
 	struct device_node *cpus;
 	int ncpus = 0;
 
-	if (ppc_md.progress) ppc_md.progress("smp_core99_probe", 0x345);
+	ppc_progress("smp_core99_probe", 0x345);
 
 	/* Count CPUs in the device-tree */
        	for (cpus = NULL; (cpus = of_find_node_by_type(cpus, "cpu")) != NULL;)
@@ -792,8 +792,7 @@ static void __devinit smp_core99_kick_cpu(int nr)
 	if (nr < 0 || nr > 3)
 		return;
 
-	if (ppc_md.progress)
-		ppc_md.progress("smp_core99_kick_cpu", 0x346);
+	ppc_progress("smp_core99_kick_cpu", 0x346);
 
 	local_irq_save(flags);
 
@@ -821,7 +820,7 @@ static void __devinit smp_core99_kick_cpu(int nr)
 	flush_icache_range((unsigned long) vector, (unsigned long) vector + 4);
 
 	local_irq_restore(flags);
-	if (ppc_md.progress) ppc_md.progress("smp_core99_kick_cpu done", 0x347);
+	ppc_progress("smp_core99_kick_cpu done", 0x347);
 }
 
 static void __devinit smp_core99_setup_cpu(int cpu_nr)
@@ -851,8 +850,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
 			g5_phy_disable_cpu1();
 #endif /* CONFIG_PPC64 */
 
-		if (ppc_md.progress)
-			ppc_md.progress("core99_setup_cpu 0 done", 0x349);
+		ppc_progress("core99_setup_cpu 0 done", 0x349);
 	}
 }
 
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index ec34170..325130b 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -298,8 +298,8 @@ static void __init pSeries_setup_arch(void)
 static int __init pSeries_init_panel(void)
 {
 	/* Manually leave the kernel version on the panel. */
-	ppc_md.progress("Linux ppc64\n", 0);
-	ppc_md.progress(init_utsname()->version, 0);
+	ppc_progress("Linux ppc64\n", 0);
+	ppc_progress(init_utsname()->version, 0);
 
 	return 0;
 }
-- 
1.5.5

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

* [PATCH 4/4] powerpc: Remove printk-only progress implementations
  2009-01-15  6:43 [PATCH 1/4] powerpc: Remove unused ppc64_terminate_msg() Michael Ellerman
  2009-01-15  6:43 ` [PATCH 2/4] powerpc: Add ppc_progress() wrapper Michael Ellerman
  2009-01-15  6:43 ` [PATCH 3/4] powerpc: Replace ppc_md.progress() uses with ppc_progress() Michael Ellerman
@ 2009-01-15  6:43 ` Michael Ellerman
  2009-01-15  7:26   ` Grant Likely
  2 siblings, 1 reply; 10+ messages in thread
From: Michael Ellerman @ 2009-01-15  6:43 UTC (permalink / raw)
  To: linuxppc-dev

Several platforms implement ppc_md.progress as a simple printk. Now that
we have the ppc_progress() wrapper which falls back to printk if no
routine is specified, we can remove all the printk-only progress
implementations.

This leaves us with iSeries_progress(), rtas_progress() and udbg_progress().

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/platforms/cell/celleb_setup.c |    7 -------
 arch/powerpc/platforms/cell/qpace_setup.c  |    6 ------
 arch/powerpc/platforms/cell/setup.c        |    6 ------
 arch/powerpc/platforms/maple/setup.c       |    7 -------
 arch/powerpc/platforms/pasemi/setup.c      |    7 -------
 arch/powerpc/platforms/ps3/setup.c         |    6 ------
 6 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/arch/powerpc/platforms/cell/celleb_setup.c b/arch/powerpc/platforms/cell/celleb_setup.c
index 07c234f..5a5d9f3 100644
--- a/arch/powerpc/platforms/cell/celleb_setup.c
+++ b/arch/powerpc/platforms/cell/celleb_setup.c
@@ -87,11 +87,6 @@ static int __init celleb_machine_type_hack(char *ptr)
 
 __setup("celleb_machine_type_hack=", celleb_machine_type_hack);
 
-static void celleb_progress(char *s, unsigned short hex)
-{
-	printk("*** %04x : %s\n", hex, s ? s : "");
-}
-
 static void __init celleb_setup_arch_common(void)
 {
 	/* init to some ~sane value until calibrate_delay() runs */
@@ -213,7 +208,6 @@ define_machine(celleb_beat) {
 	.get_rtc_time		= beat_get_rtc_time,
 	.set_rtc_time		= beat_set_rtc_time,
 	.calibrate_decr		= generic_calibrate_decr,
-	.progress		= celleb_progress,
 	.power_save		= beat_power_save,
 	.nvram_size		= beat_nvram_get_size,
 	.nvram_read		= beat_nvram_read,
@@ -240,7 +234,6 @@ define_machine(celleb_native) {
 	.get_rtc_time		= rtas_get_rtc_time,
 	.set_rtc_time		= rtas_set_rtc_time,
 	.calibrate_decr		= generic_calibrate_decr,
-	.progress		= celleb_progress,
 	.pci_probe_mode 	= celleb_pci_probe_mode,
 	.pci_setup_phb		= celleb_setup_phb,
 	.init_IRQ		= celleb_init_IRQ_native,
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c
index be84e6a..6a37361 100644
--- a/arch/powerpc/platforms/cell/qpace_setup.c
+++ b/arch/powerpc/platforms/cell/qpace_setup.c
@@ -56,11 +56,6 @@ static void qpace_show_cpuinfo(struct seq_file *m)
 	of_node_put(root);
 }
 
-static void qpace_progress(char *s, unsigned short hex)
-{
-	printk("*** %04x : %s\n", hex, s ? s : "");
-}
-
 static int __init qpace_publish_devices(void)
 {
 	int node;
@@ -142,7 +137,6 @@ define_machine(qpace) {
 	.halt			= rtas_halt,
 	.get_boot_time		= rtas_get_boot_time,
 	.calibrate_decr		= generic_calibrate_decr,
-	.progress		= qpace_progress,
 	.init_IRQ		= iic_init_IRQ,
 #ifdef CONFIG_KEXEC
 	.machine_kexec		= default_machine_kexec,
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index 5930536..ca2661e 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -76,11 +76,6 @@ static void cell_show_cpuinfo(struct seq_file *m)
 	of_node_put(root);
 }
 
-static void cell_progress(char *s, unsigned short hex)
-{
-	printk("*** %04x : %s\n", hex, s ? s : "");
-}
-
 static void cell_fixup_pcie_rootcomplex(struct pci_dev *dev)
 {
 	struct pci_controller *hose;
@@ -285,7 +280,6 @@ define_machine(cell) {
 	.get_rtc_time		= rtas_get_rtc_time,
 	.set_rtc_time		= rtas_set_rtc_time,
 	.calibrate_decr		= generic_calibrate_decr,
-	.progress		= cell_progress,
 	.init_IRQ       	= cell_init_irq,
 	.pci_setup_phb		= cell_setup_phb,
 };
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index bfd60e4..92f8eef 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -288,12 +288,6 @@ static void __init maple_init_IRQ(void)
 	of_node_put(root);
 }
 
-static void __init maple_progress(char *s, unsigned short hex)
-{
-	printk("*** %04x : %s\n", hex, s ? s : "");
-}
-
-
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
@@ -332,6 +326,5 @@ define_machine(maple) {
        	.set_rtc_time		= maple_set_rtc_time,
        	.get_rtc_time		= maple_get_rtc_time,
       	.calibrate_decr		= generic_calibrate_decr,
-	.progress		= maple_progress,
 	.power_save		= power4_idle,
 };
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index c64fb5b..bcc1ac8 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -245,12 +245,6 @@ static __init void pas_init_IRQ(void)
 	of_node_put(root);
 }
 
-static void __init pas_progress(char *s, unsigned short hex)
-{
-	printk("[%04x] : %s\n", hex, s ? s : "");
-}
-
-
 static int pas_machine_check_handler(struct pt_regs *regs)
 {
 	int cpu = smp_processor_id();
@@ -440,6 +434,5 @@ define_machine(pasemi) {
 	.restart		= pas_restart,
 	.get_boot_time		= pas_get_boot_time,
 	.calibrate_decr		= generic_calibrate_decr,
-	.progress		= pas_progress,
 	.machine_check_exception = pas_machine_check_handler,
 };
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 35f3e85..5c4dc38 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -222,11 +222,6 @@ static void __init ps3_setup_arch(void)
 	DBG(" <- %s:%d\n", __func__, __LINE__);
 }
 
-static void __init ps3_progress(char *s, unsigned short hex)
-{
-	printk("*** %04x : %s\n", hex, s ? s : "");
-}
-
 static int __init ps3_probe(void)
 {
 	unsigned long htab_size;
@@ -274,7 +269,6 @@ define_machine(ps3) {
 	.get_rtc_time			= ps3_get_rtc_time,
 	.set_dabr			= ps3_set_dabr,
 	.calibrate_decr			= ps3_calibrate_decr,
-	.progress			= ps3_progress,
 	.restart			= ps3_restart,
 	.power_off			= ps3_power_off,
 	.halt				= ps3_halt,
-- 
1.5.5

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

* Re: [PATCH 2/4] powerpc: Add ppc_progress() wrapper
  2009-01-15  6:43 ` [PATCH 2/4] powerpc: Add ppc_progress() wrapper Michael Ellerman
@ 2009-01-15  7:23   ` Grant Likely
  2009-01-15 11:34   ` Paul Mackerras
  1 sibling, 0 replies; 10+ messages in thread
From: Grant Likely @ 2009-01-15  7:23 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

On Wed, Jan 14, 2009 at 11:43 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> There's quite a lot of code that does:
>
> if (ppc_md.progress)
>        ppc_md.progress(...)
>
> So move that idiom into a wrapper. Having a wrapper also allows us
> to have a fallback to printk if no progress routine is specified.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Good idea.

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  arch/powerpc/include/asm/machdep.h |    2 ++
>  arch/powerpc/kernel/setup-common.c |    8 ++++++++
>  2 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
> index 6c34a0d..9e4ab07 100644
> --- a/arch/powerpc/include/asm/machdep.h
> +++ b/arch/powerpc/include/asm/machdep.h
> @@ -328,6 +328,8 @@ extern void __devinit smp_generic_take_timebase(void);
>  /* Print a boot progress message. */
>  void ppc64_boot_msg(unsigned int src, const char *msg);
>
> +extern void ppc_progress(char *msg, unsigned short code);
> +
>  static inline void log_error(char *buf, unsigned int err_type, int fatal)
>  {
>        if (ppc_md.log_error)
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index 705fc4b..cc4997b 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -669,3 +669,11 @@ static int powerpc_debugfs_init(void)
>  }
>  arch_initcall(powerpc_debugfs_init);
>  #endif
> +
> +void ppc_progress(char *msg, unsigned short code)
> +{
> +       if (ppc_md.progress)
> +               ppc_md.progress(msg, code);
> +       else
> +               printk(KERN_DEBUG "*** %04x : %s\n", code, msg ? msg : "");
> +}
> --
> 1.5.5
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: [PATCH 3/4] powerpc: Replace ppc_md.progress() uses with ppc_progress()
  2009-01-15  6:43 ` [PATCH 3/4] powerpc: Replace ppc_md.progress() uses with ppc_progress() Michael Ellerman
@ 2009-01-15  7:25   ` Grant Likely
  0 siblings, 0 replies; 10+ messages in thread
From: Grant Likely @ 2009-01-15  7:25 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

On Wed, Jan 14, 2009 at 11:43 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  arch/powerpc/kernel/setup_32.c                    |   11 +++++------
>  arch/powerpc/mm/init_32.c                         |   15 +++++----------
>  arch/powerpc/mm/ppc_mmu_32.c                      |    8 ++++----
>  arch/powerpc/platforms/52xx/efika.c               |    3 +--
>  arch/powerpc/platforms/52xx/lite5200.c            |    3 +--
>  arch/powerpc/platforms/52xx/mpc5200_simple.c      |    3 +--
>  arch/powerpc/platforms/82xx/ep8248e.c             |    6 ++----
>  arch/powerpc/platforms/82xx/mgcoge.c              |    6 ++----
>  arch/powerpc/platforms/82xx/mpc8272_ads.c         |    6 ++----
>  arch/powerpc/platforms/82xx/pq2fads.c             |    6 ++----
>  arch/powerpc/platforms/83xx/asp834x.c             |    3 +--
>  arch/powerpc/platforms/83xx/mpc831x_rdb.c         |    3 +--
>  arch/powerpc/platforms/83xx/mpc832x_mds.c         |    3 +--
>  arch/powerpc/platforms/83xx/mpc832x_rdb.c         |    3 +--
>  arch/powerpc/platforms/83xx/mpc834x_itx.c         |    3 +--
>  arch/powerpc/platforms/83xx/mpc834x_mds.c         |    3 +--
>  arch/powerpc/platforms/83xx/mpc836x_mds.c         |    3 +--
>  arch/powerpc/platforms/83xx/mpc836x_rdk.c         |    3 +--
>  arch/powerpc/platforms/83xx/mpc837x_mds.c         |    3 +--
>  arch/powerpc/platforms/83xx/mpc837x_rdb.c         |    3 +--
>  arch/powerpc/platforms/83xx/sbc834x.c             |    3 +--
>  arch/powerpc/platforms/85xx/ksi8560.c             |    3 +--
>  arch/powerpc/platforms/85xx/mpc8536_ds.c          |    3 +--
>  arch/powerpc/platforms/85xx/mpc85xx_ads.c         |    3 +--
>  arch/powerpc/platforms/85xx/mpc85xx_cds.c         |   13 +++++--------
>  arch/powerpc/platforms/85xx/mpc85xx_ds.c          |    3 +--
>  arch/powerpc/platforms/85xx/mpc85xx_mds.c         |    3 +--
>  arch/powerpc/platforms/85xx/sbc8548.c             |    3 +--
>  arch/powerpc/platforms/85xx/sbc8560.c             |    3 +--
>  arch/powerpc/platforms/85xx/stx_gp3.c             |    3 +--
>  arch/powerpc/platforms/85xx/tqm85xx.c             |    3 +--
>  arch/powerpc/platforms/86xx/mpc8610_hpcd.c        |    3 +--
>  arch/powerpc/platforms/86xx/mpc86xx_hpcn.c        |    3 +--
>  arch/powerpc/platforms/86xx/sbc8641d.c            |    3 +--
>  arch/powerpc/platforms/chrp/setup.c               |    5 ++---
>  arch/powerpc/platforms/embedded6xx/holly.c        |    6 ++----
>  arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c |    7 +++----
>  arch/powerpc/platforms/powermac/smp.c             |   18 ++++++++----------
>  arch/powerpc/platforms/pseries/setup.c            |    4 ++--
>  39 files changed, 70 insertions(+), 119 deletions(-)
>
> diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
> index 9e1ca74..a1caaa9 100644
> --- a/arch/powerpc/kernel/setup_32.c
> +++ b/arch/powerpc/kernel/setup_32.c
> @@ -139,8 +139,7 @@ notrace void __init machine_init(unsigned long dt_ptr)
>            cpu_has_feature(CPU_FTR_CAN_NAP))
>                ppc_md.power_save = e500_idle;
>  #endif
> -       if (ppc_md.progress)
> -               ppc_md.progress("id mach(): done", 0x200);
> +       ppc_progress("id mach(): done", 0x200);
>  }
>
>  #ifdef CONFIG_BOOKE_WDT
> @@ -219,8 +218,7 @@ EXPORT_SYMBOL(nvram_sync);
>  int __init ppc_init(void)
>  {
>        /* clear the progress line */
> -       if (ppc_md.progress)
> -               ppc_md.progress("             ", 0xffff);
> +       ppc_progress("             ", 0xffff);
>
>        /* call platform init */
>        if (ppc_md.init != NULL) {
> @@ -322,7 +320,7 @@ void __init setup_arch(char **cmdline_p)
>
>        /* set up the bootmem stuff with available memory */
>        do_init_bootmem();
> -       if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab);
> +       ppc_progress("setup_arch: bootmem", 0x3eab);
>
>  #ifdef CONFIG_DUMMY_CONSOLE
>        conswitchp = &dummy_con;
> @@ -330,7 +328,8 @@ void __init setup_arch(char **cmdline_p)
>
>        if (ppc_md.setup_arch)
>                ppc_md.setup_arch();
> -       if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
> +
> +       ppc_progress("arch: exit", 0x3eab);
>
>        paging_init();
>
> diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
> index 666a5e8..d1bd21e 100644
> --- a/arch/powerpc/mm/init_32.c
> +++ b/arch/powerpc/mm/init_32.c
> @@ -119,8 +119,7 @@ void MMU_setup(void)
>  */
>  void __init MMU_init(void)
>  {
> -       if (ppc_md.progress)
> -               ppc_md.progress("MMU:enter", 0x111);
> +       ppc_progress("MMU:enter", 0x111);
>
>        /* 601 can only access 16MB at the moment */
>        if (PVR_VER(mfspr(SPRN_PVR)) == 1)
> @@ -159,13 +158,11 @@ void __init MMU_init(void)
>        }
>
>        /* Initialize the MMU hardware */
> -       if (ppc_md.progress)
> -               ppc_md.progress("MMU:hw init", 0x300);
> +       ppc_progress("MMU:hw init", 0x300);
>        MMU_init_hw();
>
>        /* Map in all of RAM starting at KERNELBASE */
> -       if (ppc_md.progress)
> -               ppc_md.progress("MMU:mapin", 0x301);
> +       ppc_progress("MMU:mapin", 0x301);
>        mapin_ram();
>
>  #ifdef CONFIG_HIGHMEM
> @@ -176,11 +173,9 @@ void __init MMU_init(void)
>        ioremap_bot = ioremap_base;
>
>        /* Map in I/O resources */
> -       if (ppc_md.progress)
> -               ppc_md.progress("MMU:setio", 0x302);
> +       ppc_progress("MMU:setio", 0x302);
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("MMU:exit", 0x211);
> +       ppc_progress("MMU:exit", 0x211);
>
>        /* From now on, btext is no longer BAT mapped if it was at all */
>  #ifdef CONFIG_BOOTX_TEXT
> diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
> index 45d9253..c1a298c 100644
> --- a/arch/powerpc/mm/ppc_mmu_32.c
> +++ b/arch/powerpc/mm/ppc_mmu_32.c
> @@ -204,7 +204,7 @@ void __init MMU_init_hw(void)
>                return;
>        }
>
> -       if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105);
> +       ppc_progress("hash:enter", 0x105);
>
>  #define LG_HPTEG_SIZE  6               /* 64 bytes per HPTEG */
>  #define SDR1_LOW_BITS  ((n_hpteg - 1) >> 10)
> @@ -228,7 +228,7 @@ void __init MMU_init_hw(void)
>        /*
>         * Find some memory for the hash table.
>         */
> -       if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322);
> +       ppc_progress("hash:find piece", 0x322);
>        Hash = __va(lmb_alloc_base(Hash_size, Hash_size,
>                                   __initial_memory_limit_addr));
>        cacheable_memzero(Hash, Hash_size);
> @@ -243,7 +243,7 @@ void __init MMU_init_hw(void)
>        /*
>         * Patch up the instructions in hashtable.S:create_hpte
>         */
> -       if ( ppc_md.progress ) ppc_md.progress("hash:patch", 0x345);
> +       ppc_progress("hash:patch", 0x345);
>        Hash_mask = n_hpteg - 1;
>        hmask = Hash_mask >> (16 - LG_HPTEG_SIZE);
>        mb2 = mb = 32 - LG_HPTEG_SIZE - lg_n_hpteg;
> @@ -276,5 +276,5 @@ void __init MMU_init_hw(void)
>        flush_icache_range((unsigned long) &flush_hash_patch_A[0],
>                           (unsigned long) &flush_hash_patch_B[1]);
>
> -       if ( ppc_md.progress ) ppc_md.progress("hash:done", 0x205);
> +       ppc_progress("hash:done", 0x205);
>  }
> diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
> index a2068fa..4b0d689 100644
> --- a/arch/powerpc/platforms/52xx/efika.c
> +++ b/arch/powerpc/platforms/52xx/efika.c
> @@ -190,8 +190,7 @@ static void __init efika_setup_arch(void)
>        mpc52xx_pm_init();
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
> +       ppc_progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
>  }
>
>  static int __init efika_probe(void)
> diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
> index 6d584f4..7d86669 100644
> --- a/arch/powerpc/platforms/52xx/lite5200.c
> +++ b/arch/powerpc/platforms/52xx/lite5200.c
> @@ -149,8 +149,7 @@ static void lite5200_resume_finish(void __iomem *mbar)
>
>  static void __init lite5200_setup_arch(void)
>  {
> -       if (ppc_md.progress)
> -               ppc_md.progress("lite5200_setup_arch()", 0);
> +       ppc_progress("lite5200_setup_arch()", 0);
>
>        /* Map important registers from the internal memory map */
>        mpc52xx_map_common_devices();
> diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
> index a3bda0b..5d76177 100644
> --- a/arch/powerpc/platforms/52xx/mpc5200_simple.c
> +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
> @@ -36,8 +36,7 @@
>  */
>  static void __init mpc5200_simple_setup_arch(void)
>  {
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc5200_simple_setup_arch()", 0);
> +       ppc_progress("mpc5200_simple_setup_arch()", 0);
>
>        /* Map important registers from the internal memory map */
>        mpc52xx_map_common_devices();
> diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
> index 0eb6d7f..7daef42 100644
> --- a/arch/powerpc/platforms/82xx/ep8248e.c
> +++ b/arch/powerpc/platforms/82xx/ep8248e.c
> @@ -252,8 +252,7 @@ static void __init init_ioports(void)
>
>  static void __init ep8248e_setup_arch(void)
>  {
> -       if (ppc_md.progress)
> -               ppc_md.progress("ep8248e_setup_arch()", 0);
> +       ppc_progress("ep8248e_setup_arch()", 0);
>
>        cpm2_reset();
>
> @@ -283,8 +282,7 @@ static void __init ep8248e_setup_arch(void)
>
>        init_ioports();
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("ep8248e_setup_arch(), finish", 0);
> +       ppc_progress("ep8248e_setup_arch(), finish", 0);
>  }
>
>  static  __initdata struct of_device_id of_bus_ids[] = {
> diff --git a/arch/powerpc/platforms/82xx/mgcoge.c b/arch/powerpc/platforms/82xx/mgcoge.c
> index c2af169..30b7952 100644
> --- a/arch/powerpc/platforms/82xx/mgcoge.c
> +++ b/arch/powerpc/platforms/82xx/mgcoge.c
> @@ -78,8 +78,7 @@ static void __init init_ioports(void)
>
>  static void __init mgcoge_setup_arch(void)
>  {
> -       if (ppc_md.progress)
> -               ppc_md.progress("mgcoge_setup_arch()", 0);
> +       ppc_progress("mgcoge_setup_arch()", 0);
>
>        cpm2_reset();
>
> @@ -90,8 +89,7 @@ static void __init mgcoge_setup_arch(void)
>
>        init_ioports();
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mgcoge_setup_arch(), finish", 0);
> +       ppc_progress("mgcoge_setup_arch(), finish", 0);
>  }
>
>  static  __initdata struct of_device_id of_bus_ids[] = {
> diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
> index 8054c68..42fd93c 100644
> --- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
> +++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
> @@ -126,8 +126,7 @@ static void __init mpc8272_ads_setup_arch(void)
>        struct device_node *np;
>        __be32 __iomem *bcsr;
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc8272_ads_setup_arch()", 0);
> +       ppc_progress("mpc8272_ads_setup_arch()", 0);
>
>        cpm2_reset();
>
> @@ -155,8 +154,7 @@ static void __init mpc8272_ads_setup_arch(void)
>        init_ioports();
>        pq2_init_pci();
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc8272_ads_setup_arch(), finish", 0);
> +       ppc_progress("mpc8272_ads_setup_arch(), finish", 0);
>  }
>
>  static struct of_device_id __initdata of_bus_ids[] = {
> diff --git a/arch/powerpc/platforms/82xx/pq2fads.c b/arch/powerpc/platforms/82xx/pq2fads.c
> index e1dceee..44a3153 100644
> --- a/arch/powerpc/platforms/82xx/pq2fads.c
> +++ b/arch/powerpc/platforms/82xx/pq2fads.c
> @@ -118,8 +118,7 @@ static void __init pq2fads_setup_arch(void)
>        struct device_node *np;
>        __be32 __iomem *bcsr;
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("pq2fads_setup_arch()", 0);
> +       ppc_progress("pq2fads_setup_arch()", 0);
>
>        cpm2_reset();
>
> @@ -153,8 +152,7 @@ static void __init pq2fads_setup_arch(void)
>
>        pq2_init_pci();
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("pq2fads_setup_arch(), finish", 0);
> +       ppc_progress("pq2fads_setup_arch(), finish", 0);
>  }
>
>  /*
> diff --git a/arch/powerpc/platforms/83xx/asp834x.c b/arch/powerpc/platforms/83xx/asp834x.c
> index bb30d67..2ee392d 100644
> --- a/arch/powerpc/platforms/83xx/asp834x.c
> +++ b/arch/powerpc/platforms/83xx/asp834x.c
> @@ -30,8 +30,7 @@
>  */
>  static void __init asp834x_setup_arch(void)
>  {
> -       if (ppc_md.progress)
> -               ppc_md.progress("asp834x_setup_arch()", 0);
> +       ppc_progress("asp834x_setup_arch()", 0);
>
>        mpc834x_usb_cfg();
>  }
> diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
> index 5177bdd..4e378f1 100644
> --- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c
> +++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
> @@ -32,8 +32,7 @@ static void __init mpc831x_rdb_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc831x_rdb_setup_arch()", 0);
> +       ppc_progress("mpc831x_rdb_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
> diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
> index ec0b401..079e60f 100644
> --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
> @@ -59,8 +59,7 @@ static void __init mpc832x_sys_setup_arch(void)
>        struct device_node *np;
>        u8 __iomem *bcsr_regs = NULL;
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc832x_sys_setup_arch()", 0);
> +       ppc_progress("mpc832x_sys_setup_arch()", 0);
>
>        /* Map BCSR area */
>        np = of_find_node_by_name(NULL, "bcsr");
> diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
> index 2a1295f..3d9d7f1 100644
> --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
> +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
> @@ -92,8 +92,7 @@ static void __init mpc832x_rdb_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc832x_rdb_setup_arch()", 0);
> +       ppc_progress("mpc832x_rdb_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
> diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> index 76092d3..1d8b887 100644
> --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
> +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> @@ -62,8 +62,7 @@ static void __init mpc834x_itx_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc834x_itx_setup_arch()", 0);
> +       ppc_progress("mpc834x_itx_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
> diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
> index fc3f2ed..fbd70a9 100644
> --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
> @@ -81,8 +81,7 @@ static void __init mpc834x_mds_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc834x_mds_setup_arch()", 0);
> +       ppc_progress("mpc834x_mds_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
> diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
> index 09e9d6f..7f33105 100644
> --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
> @@ -67,8 +67,7 @@ static void __init mpc836x_mds_setup_arch(void)
>        struct device_node *np;
>        u8 __iomem *bcsr_regs = NULL;
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc836x_mds_setup_arch()", 0);
> +       ppc_progress("mpc836x_mds_setup_arch()", 0);
>
>        /* Map BCSR area */
>        np = of_find_node_by_name(NULL, "bcsr");
> diff --git a/arch/powerpc/platforms/83xx/mpc836x_rdk.c b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
> index b0090aa..6174bd8 100644
> --- a/arch/powerpc/platforms/83xx/mpc836x_rdk.c
> +++ b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
> @@ -44,8 +44,7 @@ static void __init mpc836x_rdk_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc836x_rdk_setup_arch()", 0);
> +       ppc_progress("mpc836x_rdk_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
> diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
> index 530ef99..0970544 100644
> --- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
> @@ -80,8 +80,7 @@ static void __init mpc837x_mds_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc837x_mds_setup_arch()", 0);
> +       ppc_progress("mpc837x_mds_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") {
> diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
> index 1d09654..c5a987d 100644
> --- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
> +++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
> @@ -32,8 +32,7 @@ static void __init mpc837x_rdb_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc837x_rdb_setup_arch()", 0);
> +       ppc_progress("mpc837x_rdb_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
> diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c
> index 156c4e2..70c2ab2 100644
> --- a/arch/powerpc/platforms/83xx/sbc834x.c
> +++ b/arch/powerpc/platforms/83xx/sbc834x.c
> @@ -52,8 +52,7 @@ static void __init sbc834x_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("sbc834x_setup_arch()", 0);
> +       ppc_progress("sbc834x_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
> diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c
> index 81cee7b..9938c95 100644
> --- a/arch/powerpc/platforms/85xx/ksi8560.c
> +++ b/arch/powerpc/platforms/85xx/ksi8560.c
> @@ -181,8 +181,7 @@ static void __init ksi8560_setup_arch(void)
>        else
>                printk(KERN_ERR "Can't find CPLD in device tree\n");
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("ksi8560_setup_arch()", 0);
> +       ppc_progress("ksi8560_setup_arch()", 0);
>
>  #ifdef CONFIG_CPM2
>        cpm2_reset();
> diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c
> index 1bf5aef..17397cb 100644
> --- a/arch/powerpc/platforms/85xx/mpc8536_ds.c
> +++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c
> @@ -67,8 +67,7 @@ static void __init mpc8536_ds_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc8536_ds_setup_arch()", 0);
> +       ppc_progress("mpc8536_ds_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_node_by_type(np, "pci") {
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> index 21f0090..b83976c 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> @@ -188,8 +188,7 @@ static void __init mpc85xx_ads_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc85xx_ads_setup_arch()", 0);
> +       ppc_progress("mpc85xx_ads_setup_arch()", 0);
>
>  #ifdef CONFIG_CPM2
>        cpm2_reset();
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> index aeb6a5b..15b35e2 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> @@ -269,22 +269,19 @@ machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
>  */
>  static void __init mpc85xx_cds_setup_arch(void)
>  {
> +       char buf[40];
>  #ifdef CONFIG_PCI
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc85xx_cds_setup_arch()", 0);
> +       ppc_progress("mpc85xx_cds_setup_arch()", 0);
>
>        cadmus = ioremap(CADMUS_BASE, CADMUS_SIZE);
>        cds_pci_slot = ((cadmus[CM_CSR] >> 6) & 0x3) + 1;
>
> -       if (ppc_md.progress) {
> -               char buf[40];
> -               snprintf(buf, 40, "CDS Version = 0x%x in slot %d\n",
> -                               cadmus[CM_VER], cds_pci_slot);
> -               ppc_md.progress(buf, 0);
> -       }
> +       snprintf(buf, 40, "CDS Version = 0x%x in slot %d\n",
> +                cadmus[CM_VER], cds_pci_slot);
> +       ppc_progress(buf, 0);
>
>  #ifdef CONFIG_PCI
>        for_each_node_by_type(np, "pci") {
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
> index 7326d90..1101911 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
> @@ -157,8 +157,7 @@ static void __init mpc85xx_ds_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc85xx_ds_setup_arch()", 0);
> +       ppc_progress("mpc85xx_ds_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_node_by_type(np, "pci") {
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> index 658a36f..abd01df 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> @@ -156,8 +156,7 @@ static void __init mpc85xx_mds_setup_arch(void)
>        struct device_node *np;
>        static u8 __iomem *bcsr_regs = NULL;
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc85xx_mds_setup_arch()", 0);
> +       ppc_progress("mpc85xx_mds_setup_arch()", 0);
>
>        /* Map BCSR area */
>        np = of_find_node_by_name(NULL, "bcsr");
> diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c
> index 7ec77ce..7fca09a 100644
> --- a/arch/powerpc/platforms/85xx/sbc8548.c
> +++ b/arch/powerpc/platforms/85xx/sbc8548.c
> @@ -114,8 +114,7 @@ static void __init sbc8548_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("sbc8548_setup_arch()", 0);
> +       ppc_progress("sbc8548_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_node_by_type(np, "pci") {
> diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c
> index 472f254..fbee89e 100644
> --- a/arch/powerpc/platforms/85xx/sbc8560.c
> +++ b/arch/powerpc/platforms/85xx/sbc8560.c
> @@ -177,8 +177,7 @@ static void __init sbc8560_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("sbc8560_setup_arch()", 0);
> +       ppc_progress("sbc8560_setup_arch()", 0);
>
>  #ifdef CONFIG_CPM2
>        cpm2_reset();
> diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c
> index 0cca8f5..0d9aa32 100644
> --- a/arch/powerpc/platforms/85xx/stx_gp3.c
> +++ b/arch/powerpc/platforms/85xx/stx_gp3.c
> @@ -114,8 +114,7 @@ static void __init stx_gp3_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("stx_gp3_setup_arch()", 0);
> +       ppc_progress("stx_gp3_setup_arch()", 0);
>
>  #ifdef CONFIG_CPM2
>        cpm2_reset();
> diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
> index 2933a8e..0f7a399 100644
> --- a/arch/powerpc/platforms/85xx/tqm85xx.c
> +++ b/arch/powerpc/platforms/85xx/tqm85xx.c
> @@ -112,8 +112,7 @@ static void __init tqm85xx_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("tqm85xx_setup_arch()", 0);
> +       ppc_progress("tqm85xx_setup_arch()", 0);
>
>  #ifdef CONFIG_CPM2
>        cpm2_reset();
> diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
> index e8d54ac..34bb86e 100644
> --- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
> +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
> @@ -221,8 +221,7 @@ static void __init mpc86xx_hpcd_setup_arch(void)
>        struct device_node *np;
>        unsigned char *pixis;
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc86xx_hpcd_setup_arch()", 0);
> +       ppc_progress("mpc86xx_hpcd_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_node_by_type(np, "pci") {
> diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> index 27e0e68..0e7d30d 100644
> --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> @@ -73,8 +73,7 @@ mpc86xx_hpcn_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0);
> +       ppc_progress("mpc86xx_hpcn_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") {
> diff --git a/arch/powerpc/platforms/86xx/sbc8641d.c b/arch/powerpc/platforms/86xx/sbc8641d.c
> index 5fd7ed4..68b4550 100644
> --- a/arch/powerpc/platforms/86xx/sbc8641d.c
> +++ b/arch/powerpc/platforms/86xx/sbc8641d.c
> @@ -44,8 +44,7 @@ sbc8641_setup_arch(void)
>        struct device_node *np;
>  #endif
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("sbc8641_setup_arch()", 0);
> +       ppc_progress("sbc8641_setup_arch()", 0);
>
>  #ifdef CONFIG_PCI
>        for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie")
> diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
> index 272d79a..a237d56 100644
> --- a/arch/powerpc/platforms/chrp/setup.c
> +++ b/arch/powerpc/platforms/chrp/setup.c
> @@ -361,7 +361,7 @@ void __init chrp_setup_arch(void)
>         * Print the banner, then scroll down so boot progress
>         * can be printed.  -- Cort
>         */
> -       if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0);
> +       ppc_progress("Linux/PPC "UTS_RELEASE"\n", 0x0);
>  }
>
>  void
> @@ -617,8 +617,7 @@ chrp_init2(void)
>        }
>        of_node_put(device);
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("  Have fun!    ", 0x7777);
> +       ppc_progress("  Have fun!    ", 0x7777);
>  }
>
>  static int __init chrp_probe(void)
> diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
> index b21fde5..20bbcae 100644
> --- a/arch/powerpc/platforms/embedded6xx/holly.c
> +++ b/arch/powerpc/platforms/embedded6xx/holly.c
> @@ -114,8 +114,7 @@ static void __init holly_setup_arch(void)
>  {
>        struct device_node *np;
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("holly_setup_arch():set_bridge", 0);
> +       ppc_progress("holly_setup_arch():set_bridge", 0);
>
>        tsi108_csr_vir_base = get_vir_csrbase();
>
> @@ -127,8 +126,7 @@ static void __init holly_setup_arch(void)
>                tsi108_setup_pci(np, HOLLY_PCI_CFG_PHYS, 1);
>
>        ppc_md.pci_exclude_device = holly_exclude_device;
> -       if (ppc_md.progress)
> -               ppc_md.progress("tsi108: resources set", 0x100);
> +       ppc_progress("tsi108: resources set", 0x100);
>
>        printk(KERN_INFO "PPC750GX/CL Platform\n");
>  }
> diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
> index 7a2ba39..e42cbf9 100644
> --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
> +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
> @@ -65,8 +65,8 @@ int mpc7448_hpc2_exclude_device(struct pci_controller *hose,
>  static void __init mpc7448_hpc2_setup_arch(void)
>  {
>        struct device_node *np;
> -       if (ppc_md.progress)
> -               ppc_md.progress("mpc7448_hpc2_setup_arch():set_bridge", 0);
> +
> +       ppc_progress("mpc7448_hpc2_setup_arch():set_bridge", 0);
>
>        tsi108_csr_vir_base = get_vir_csrbase();
>
> @@ -76,8 +76,7 @@ static void __init mpc7448_hpc2_setup_arch(void)
>                tsi108_setup_pci(np, MPC7448HPC2_PCI_CFG_PHYS, 0);
>
>        ppc_md.pci_exclude_device = mpc7448_hpc2_exclude_device;
> -       if (ppc_md.progress)
> -               ppc_md.progress("tsi108: resources set", 0x100);
> +       ppc_progress("tsi108: resources set", 0x100);
>  #endif
>
>        printk(KERN_INFO "MPC7448HPC2 (TAIGA) Platform\n");
> diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
> index bd8817b..c0e1c46 100644
> --- a/arch/powerpc/platforms/powermac/smp.c
> +++ b/arch/powerpc/platforms/powermac/smp.c
> @@ -241,7 +241,7 @@ static void __init psurge_quad_init(void)
>  {
>        int procbits;
>
> -       if (ppc_md.progress) ppc_md.progress("psurge_quad_init", 0x351);
> +       ppc_progress("psurge_quad_init", 0x351);
>        procbits = ~PSURGE_QUAD_IN(PSURGE_QUAD_WHICH_CPU);
>        if (psurge_type == PSURGE_QUAD_ICEGRASS)
>                PSURGE_QUAD_BIS(PSURGE_QUAD_RESET_CTL, procbits);
> @@ -321,7 +321,7 @@ static int __init smp_psurge_probe(void)
>                set_hard_smp_processor_id(i, i);
>        }
>
> -       if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352);
> +       ppc_progress("smp_psurge_probe - done", 0x352);
>
>        return ncpus;
>  }
> @@ -337,7 +337,7 @@ static void __init smp_psurge_kick_cpu(int nr)
>                asm volatile("dcbf 0,%0" : : "r" (a) : "memory");
>        asm volatile("sync");
>
> -       if (ppc_md.progress) ppc_md.progress("smp_psurge_kick_cpu", 0x353);
> +       ppc_progress("smp_psurge_kick_cpu", 0x353);
>
>        out_be32(psurge_start, start);
>        mb();
> @@ -350,7 +350,7 @@ static void __init smp_psurge_kick_cpu(int nr)
>                barrier();
>        psurge_clr_ipi(nr);
>
> -       if (ppc_md.progress) ppc_md.progress("smp_psurge_kick_cpu - done", 0x354);
> +       ppc_progress("smp_psurge_kick_cpu - done", 0x354);
>  }
>
>  /*
> @@ -753,7 +753,7 @@ static int __init smp_core99_probe(void)
>        struct device_node *cpus;
>        int ncpus = 0;
>
> -       if (ppc_md.progress) ppc_md.progress("smp_core99_probe", 0x345);
> +       ppc_progress("smp_core99_probe", 0x345);
>
>        /* Count CPUs in the device-tree */
>                for (cpus = NULL; (cpus = of_find_node_by_type(cpus, "cpu")) != NULL;)
> @@ -792,8 +792,7 @@ static void __devinit smp_core99_kick_cpu(int nr)
>        if (nr < 0 || nr > 3)
>                return;
>
> -       if (ppc_md.progress)
> -               ppc_md.progress("smp_core99_kick_cpu", 0x346);
> +       ppc_progress("smp_core99_kick_cpu", 0x346);
>
>        local_irq_save(flags);
>
> @@ -821,7 +820,7 @@ static void __devinit smp_core99_kick_cpu(int nr)
>        flush_icache_range((unsigned long) vector, (unsigned long) vector + 4);
>
>        local_irq_restore(flags);
> -       if (ppc_md.progress) ppc_md.progress("smp_core99_kick_cpu done", 0x347);
> +       ppc_progress("smp_core99_kick_cpu done", 0x347);
>  }
>
>  static void __devinit smp_core99_setup_cpu(int cpu_nr)
> @@ -851,8 +850,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
>                        g5_phy_disable_cpu1();
>  #endif /* CONFIG_PPC64 */
>
> -               if (ppc_md.progress)
> -                       ppc_md.progress("core99_setup_cpu 0 done", 0x349);
> +               ppc_progress("core99_setup_cpu 0 done", 0x349);
>        }
>  }
>
> diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
> index ec34170..325130b 100644
> --- a/arch/powerpc/platforms/pseries/setup.c
> +++ b/arch/powerpc/platforms/pseries/setup.c
> @@ -298,8 +298,8 @@ static void __init pSeries_setup_arch(void)
>  static int __init pSeries_init_panel(void)
>  {
>        /* Manually leave the kernel version on the panel. */
> -       ppc_md.progress("Linux ppc64\n", 0);
> -       ppc_md.progress(init_utsname()->version, 0);
> +       ppc_progress("Linux ppc64\n", 0);
> +       ppc_progress(init_utsname()->version, 0);
>
>        return 0;
>  }
> --
> 1.5.5
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: [PATCH 4/4] powerpc: Remove printk-only progress implementations
  2009-01-15  6:43 ` [PATCH 4/4] powerpc: Remove printk-only progress implementations Michael Ellerman
@ 2009-01-15  7:26   ` Grant Likely
  0 siblings, 0 replies; 10+ messages in thread
From: Grant Likely @ 2009-01-15  7:26 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

On Wed, Jan 14, 2009 at 11:43 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> Several platforms implement ppc_md.progress as a simple printk. Now that
> we have the ppc_progress() wrapper which falls back to printk if no
> routine is specified, we can remove all the printk-only progress
> implementations.
>
> This leaves us with iSeries_progress(), rtas_progress() and udbg_progress().
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: [PATCH 2/4] powerpc: Add ppc_progress() wrapper
  2009-01-15  6:43 ` [PATCH 2/4] powerpc: Add ppc_progress() wrapper Michael Ellerman
  2009-01-15  7:23   ` Grant Likely
@ 2009-01-15 11:34   ` Paul Mackerras
  2009-01-15 23:01     ` Benjamin Herrenschmidt
  2009-01-15 23:09     ` Michael Ellerman
  1 sibling, 2 replies; 10+ messages in thread
From: Paul Mackerras @ 2009-01-15 11:34 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

Michael Ellerman writes:

> There's quite a lot of code that does:
> 
> if (ppc_md.progress)
> 	ppc_md.progress(...)
> 
> So move that idiom into a wrapper. Having a wrapper also allows us
> to have a fallback to printk if no progress routine is specified.

It certainly used to be the case on ppc32 (and may still be) that
ppc_md.progress was called very very early, in some cases before the
MMU was set up, so we don't want to call printk from it.  Falling back
to udbg_printf would be more appropriate.

The idea of ppc_md.progress was that if you need to debug very early
boot and you have something that you can poke with absolutely minimal
setup and observe externally, you can hook that up to ppc_md.progress
and get an idea where the system is dying.  Once you get to the point
where printk works then you can just use printk.

Paul.

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

* Re: [PATCH 2/4] powerpc: Add ppc_progress() wrapper
  2009-01-15 11:34   ` Paul Mackerras
@ 2009-01-15 23:01     ` Benjamin Herrenschmidt
  2009-01-15 23:09     ` Michael Ellerman
  1 sibling, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2009-01-15 23:01 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev


> It certainly used to be the case on ppc32 (and may still be) that
> ppc_md.progress was called very very early, in some cases before the
> MMU was set up, so we don't want to call printk from it.  Falling back
> to udbg_printf would be more appropriate.
> 
> The idea of ppc_md.progress was that if you need to debug very early
> boot and you have something that you can poke with absolutely minimal
> setup and observe externally, you can hook that up to ppc_md.progress
> and get an idea where the system is dying.  Once you get to the point
> where printk works then you can just use printk.

Right, printk shouldn't be called before lockdep is initialized, though
I don't see a call to lockdep_init on ppc32 ..

Appart from that, printk is pretty safe as long as we have some kind
of translation from PAGE_OFFSET that covers the kernel text, data and
bss, which we do have fairly early.

I think the reasons we did that back then is that printk output will end
up nowhere. Nowadays however, we have udbg console which can possibly be
initialized very early too.

I'd say let's keep that patch on the back burner until we get a chance
to play a bit more with that stuff.

Among other things, I still want to change the early initialization
order of ppc32 to look more like ppc64 which would help in that are as
well so ...

Cheers,
Ben.
 

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

* Re: [PATCH 2/4] powerpc: Add ppc_progress() wrapper
  2009-01-15 11:34   ` Paul Mackerras
  2009-01-15 23:01     ` Benjamin Herrenschmidt
@ 2009-01-15 23:09     ` Michael Ellerman
  1 sibling, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2009-01-15 23:09 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

On Thu, 2009-01-15 at 22:34 +1100, Paul Mackerras wrote:
> Michael Ellerman writes:
> 
> > There's quite a lot of code that does:
> > 
> > if (ppc_md.progress)
> > 	ppc_md.progress(...)
> > 
> > So move that idiom into a wrapper. Having a wrapper also allows us
> > to have a fallback to printk if no progress routine is specified.
> 
> It certainly used to be the case on ppc32 (and may still be) that
> ppc_md.progress was called very very early, in some cases before the
> MMU was set up, so we don't want to call printk from it.  Falling back
> to udbg_printf would be more appropriate.

Except on some platforms udbg_printf() doesn't work. And all the
platforms that care still can and do use udbg_progress().

This just saves us having several implementations of progress that just
call printk().

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2009-01-15 23:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15  6:43 [PATCH 1/4] powerpc: Remove unused ppc64_terminate_msg() Michael Ellerman
2009-01-15  6:43 ` [PATCH 2/4] powerpc: Add ppc_progress() wrapper Michael Ellerman
2009-01-15  7:23   ` Grant Likely
2009-01-15 11:34   ` Paul Mackerras
2009-01-15 23:01     ` Benjamin Herrenschmidt
2009-01-15 23:09     ` Michael Ellerman
2009-01-15  6:43 ` [PATCH 3/4] powerpc: Replace ppc_md.progress() uses with ppc_progress() Michael Ellerman
2009-01-15  7:25   ` Grant Likely
2009-01-15  6:43 ` [PATCH 4/4] powerpc: Remove printk-only progress implementations Michael Ellerman
2009-01-15  7:26   ` Grant Likely

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).