linux-mips
[Top] [All Lists]

[PATCH 5/8] MIPS: call ->smp_finish() a little late

To: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/8] MIPS: call ->smp_finish() a little late
From: Yong Zhang <yong.zhang0@gmail.com>
Date: Thu, 17 May 2012 18:10:07 +0800
Cc: ralf@linux-mips.org, david.daney@cavium.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=xqY0MV5RGS8aeyjQ/6Qo9Jd7BcVSjwMgTeE6MhKWfdk=; b=XzoY/Q3z/rX5xFA0ZQ/x3NNFh1dKX1Mtl4xH13R30S+HVwqHRrdHer+zRKqQdpL1zz d4AJSbK2g0gdxyjqNjRzvRqJGugmvvjm4AdAarRajzyXbXj50FGtSzFsiqZ2Pdmo0vsR L3rcP5IccnbyRvP0MCGlAnKfMmecTArMigD6R7wvH+NeOTQ2j7uaf16DtMYFXzUfR/aI +Zcm+u7ArcWfvaZC4qC3lrd/7pKia0wTbSlxVSia+GJkot7QQBuq2/V6ToNEyGiEgxF+ aisejLpOb5rVhL65Jp5WnxZ9aGNzJg4eTPRdksOz5Ew2PvAYRrIuVD1NSBGCvMTynYrB gtYQ==
In-reply-to: <1337249410-7162-1-git-send-email-yong.zhang0@gmail.com>
References: <1337249410-7162-1-git-send-email-yong.zhang0@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: Yong Zhang <yong.zhang@windriver.com>

We have move irq enable to ->smp_finish. Place ->smp_finish() a little
late to prepare for move set_cpu_online() into start_secondary.
And it's not necessary to call cpu_set(cpu, cpu_callin_map) and
synchronise_count_slave() with irq enabled.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
---
 arch/mips/kernel/smp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index ba9376b..73a268a 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -122,13 +122,14 @@ asmlinkage __cpuinit void start_secondary(void)
 
        notify_cpu_starting(cpu);
 
-       mp_ops->smp_finish();
        set_cpu_sibling_map(cpu);
 
        cpu_set(cpu, cpu_callin_map);
 
        synchronise_count_slave();
 
+       mp_ops->smp_finish();
+
        cpu_idle();
 }
 
-- 
1.7.1


<Prev in Thread] Current Thread [Next in Thread>