All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yong Zhang <yong.zhang0@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Konrad Eisele <konrad@gaisler.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>,
	sparclinux@vger.kernel.org, davem@davemloft.net,
	daniel@gaisler.com
Subject: Re: [PATCH 1/1] sparc: task_cpu() for stopper thread on sparc32 returns 0
Date: Fri, 20 Apr 2012 11:36:34 +0800	[thread overview]
Message-ID: <20120420033634.GA13068@zhy> (raw)
In-Reply-To: <20120419153428.GB1120@merkur.ravnborg.org>

On Thu, Apr 19, 2012 at 05:34:28PM +0200, Sam Ravnborg wrote:
> Added a few more people - as this patch touches a core file.
> 
> I expect we have an issue on sparc32 - that manifest
> in this bug. But I do not know this code at all.
> 
> 	Sam
> 
> On Thu, Apr 19, 2012 at 11:22:42AM +0200, Konrad Eisele wrote:
> > The stopper thread for CPU > 0 (at least in sparc32)
> > has on initialization task_cpu() set to zero even
> > for CPUs > 0. The patch explicitly checks weather the
> > CPU is allowed to run on the cpu that task_cpu()
> > return or changes the return cpu.

Actually try_to_wake_up() will put the task to the right place.

Could you please try the following patch? (Hope I'm putting
notify_cpu_starting() in the right place).

---
From: Yong Zhang <yong.zhang@windriver.com>
Date: Fri, 20 Apr 2012 11:31:45 +0800
Subject: [PATCH] sparc32,leon: add notify_cpu_starting()

Otherwise cpu_active_mask will not set, which lead to other issue.

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

diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c
index 1210fde..bb017e7 100644
--- a/arch/sparc/kernel/leon_smp.c
+++ b/arch/sparc/kernel/leon_smp.c
@@ -78,6 +78,8 @@ void __cpuinit leon_callin(void)
 	local_flush_tlb_all();
 	leon_configure_cache_smp();
 
+	notify_cpu_starting(cpuid);
+
 	/* Get our local ticker going. */
 	smp_setup_percpu_timer();
 
-- 
1.7.5.4

WARNING: multiple messages have this Message-ID (diff)
From: Yong Zhang <yong.zhang0@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Konrad Eisele <konrad@gaisler.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>,
	sparclinux@vger.kernel.org, davem@davemloft.net,
	daniel@gaisler.com
Subject: Re: [PATCH 1/1] sparc: task_cpu() for stopper thread on sparc32 returns 0
Date: Fri, 20 Apr 2012 03:36:34 +0000	[thread overview]
Message-ID: <20120420033634.GA13068@zhy> (raw)
In-Reply-To: <20120419153428.GB1120@merkur.ravnborg.org>

On Thu, Apr 19, 2012 at 05:34:28PM +0200, Sam Ravnborg wrote:
> Added a few more people - as this patch touches a core file.
> 
> I expect we have an issue on sparc32 - that manifest
> in this bug. But I do not know this code at all.
> 
> 	Sam
> 
> On Thu, Apr 19, 2012 at 11:22:42AM +0200, Konrad Eisele wrote:
> > The stopper thread for CPU > 0 (at least in sparc32)
> > has on initialization task_cpu() set to zero even
> > for CPUs > 0. The patch explicitly checks weather the
> > CPU is allowed to run on the cpu that task_cpu()
> > return or changes the return cpu.

Actually try_to_wake_up() will put the task to the right place.

Could you please try the following patch? (Hope I'm putting
notify_cpu_starting() in the right place).

---
From: Yong Zhang <yong.zhang@windriver.com>
Date: Fri, 20 Apr 2012 11:31:45 +0800
Subject: [PATCH] sparc32,leon: add notify_cpu_starting()

Otherwise cpu_active_mask will not set, which lead to other issue.

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

diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c
index 1210fde..bb017e7 100644
--- a/arch/sparc/kernel/leon_smp.c
+++ b/arch/sparc/kernel/leon_smp.c
@@ -78,6 +78,8 @@ void __cpuinit leon_callin(void)
 	local_flush_tlb_all();
 	leon_configure_cache_smp();
 
+	notify_cpu_starting(cpuid);
+
 	/* Get our local ticker going. */
 	smp_setup_percpu_timer();
 
-- 
1.7.5.4

  reply	other threads:[~2012-04-20  3:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19  9:22 [PATCH 1/1] sparc: task_cpu() for stopper thread on sparc32 returns 0 Konrad Eisele
2012-04-19 15:34 ` Sam Ravnborg
2012-04-19 15:34   ` Sam Ravnborg
2012-04-20  3:36   ` Yong Zhang [this message]
2012-04-20  3:36     ` Yong Zhang
2012-04-20  3:56     ` David Miller
2012-04-20  3:56       ` David Miller
2012-04-20  6:28     ` [PATCH 1/1] sparc32,leon: add notify_cpu_starting() Konrad Eisele
2012-04-20  6:28       ` Konrad Eisele
2012-04-20  6:32       ` Konrad Eisele
2012-04-20  6:32         ` Konrad Eisele
2012-04-20  7:06         ` David Miller
2012-04-20  7:06           ` David Miller
2012-04-20  7:46           ` [PATCH] " Konrad Eisele
2012-04-20  7:46             ` Konrad Eisele
2012-04-20  7:47             ` Konrad Eisele
2012-04-20  7:47               ` Konrad Eisele
2012-04-20  8:01             ` Srivatsa S. Bhat
2012-04-20  8:13               ` Srivatsa S. Bhat
2012-04-19 17:35 ` [PATCH 1/1] sparc: task_cpu() for stopper thread on sparc32 returns 0 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120420033634.GA13068@zhy \
    --to=yong.zhang0@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=daniel@gaisler.com \
    --cc=davem@davemloft.net \
    --cc=konrad@gaisler.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sam@ravnborg.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.