[PATCH 02/17] powerpc/85xx: do not sync time base at boot time

Zhao Chenhui chenhui.zhao at freescale.com
Thu Apr 4 00:09:10 EST 2013


From: Chen-Hui Zhao <chenhui.zhao at freescale.com>

The bootloader have done time base sync for all cores, so skip
the synchronization process at boot time of kernel.

Signed-off-by: Zhao Chenhui <chenhui.zhao at freescale.com>
Signed-off-by: Li Yang <leoli at freescale.com>
Signed-off-by: Andy Fleming <afleming at freescale.com>
---
 arch/powerpc/platforms/85xx/smp.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index 6a17599..35dae8e 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -62,6 +62,10 @@ static void mpc85xx_give_timebase(void)
 {
 	unsigned long flags;
 
+	/* only do time base sync when system is running */
+	if (system_state == SYSTEM_BOOTING)
+		return;
+
 	local_irq_save(flags);
 
 	while (!tb_req)
@@ -85,6 +89,10 @@ static void mpc85xx_take_timebase(void)
 {
 	unsigned long flags;
 
+	/* only do time base sync when system is running */
+	if (system_state == SYSTEM_BOOTING)
+		return;
+
 	local_irq_save(flags);
 
 	tb_req = 1;
-- 
1.7.3




More information about the Linuxppc-dev mailing list