mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
	Michael Hennerich <michael.hennerich@analog.com>,
	device-driver-devel@blackfin.uclinux.org,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 3/4] blackfin: don't touch task->cpus_allowed directly
Date: Mon, 25 Apr 2011 18:31:53 +0900 (JST)	[thread overview]
Message-ID: <20110425183328.267F.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20110425182906.2673.A69D9226@jp.fujitsu.com>

Every callter (except kthread_bind) should use proper
set_cpus_allowed_ptr() APIs.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: device-driver-devel@blackfin.uclinux.org
---

I'm curious why this mysterious code is necessary. Why sys_clone()
restrict allowed cpus automatically and why don't it restore the restriction
when do_fork() is finished.

 arch/blackfin/kernel/process.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index b407bc8..6a660fa 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -171,10 +171,8 @@ asmlinkage int bfin_clone(struct pt_regs *regs)
 	unsigned long newsp;
 
 #ifdef __ARCH_SYNC_CORE_DCACHE
-	if (current->rt.nr_cpus_allowed == num_possible_cpus()) {
-		current->cpus_allowed = cpumask_of_cpu(smp_processor_id());
-		current->rt.nr_cpus_allowed = 1;
-	}
+	if (current->rt.nr_cpus_allowed == num_possible_cpus())
+		set_cpus_allowed_ptr(current, cpumask_of(smp_processor_id()));
 #endif
 
 	/* syscall2 puts clone_flags in r0 and usp in r1 */
-- 
1.7.3.1




  parent reply	other threads:[~2011-04-25  9:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25  9:27 [PATCH 0/4] blackfin: convet cpumask apis KOSAKI Motohiro
2011-04-25  9:28 ` [PATCH 1/4] blackfin: remove unused function KOSAKI Motohiro
2011-04-25  9:29 ` [PATCH 2/4] blackfin: don't touch cpu_possible_map and cpu_present_map directly KOSAKI Motohiro
2011-04-25  9:31 ` KOSAKI Motohiro [this message]
2011-04-25  9:32 ` [PATCH 4/4] blackfin: convert old cpumask API to new one KOSAKI Motohiro
2011-04-25 18:11 ` [PATCH 0/4] blackfin: convet cpumask apis Mike Frysinger
2011-04-25 18:18   ` Mike Frysinger
2011-04-26  1:49     ` KOSAKI Motohiro
2011-04-26  1:53       ` (resend) [PATCH 1/4] blackfin: remove unused function KOSAKI Motohiro
2011-04-26  1:55         ` (resend) [PATCH 2/4] blackfin: don't touch cpu_possible_map and cpu_present_map directly KOSAKI Motohiro
2011-05-13  2:45           ` Mike Frysinger
2011-04-26  1:56         ` (resend) [PATCH 3/4] blackfin: don't touch task->cpus_allowed directly KOSAKI Motohiro
2011-05-13  2:47           ` Mike Frysinger
2011-04-26  1:57         ` (resend) [PATCH 4/4] blackfin: convert old cpumask API to new one KOSAKI Motohiro
2011-05-13  2:51           ` Mike Frysinger
2011-04-26  4:47         ` (resend) [PATCH 1/4] blackfin: remove unused function Mike Frysinger
2011-04-26 18:26 ` [PATCH 0/4] blackfin: convet cpumask apis Thiago Farina

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=20110425183328.267F.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=device-driver-devel@blackfin.uclinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®