public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>, Paul Jackson <pj@sgi.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] sched hardcode non-smp set_cpus_allowed
Date: Thu, 27 Oct 2005 01:53:47 -0700 (PDT)	[thread overview]
Message-ID: <20051027085346.27658.76262.sendpatchset@sam.engr.sgi.com> (raw)

Simplify the UP (1 CPU) implementatin of set_cpus_allowed.

The one CPU is hardcoded to be cpu 0 - so just test for
that bit, and avoid having to pick up the cpu_online_map.

Signed-off-by: Paul Jackson <pj@sgi.com>

---

 include/linux/sched.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- 2.6.14-rc5-mm1.orig/include/linux/sched.h	2005-10-27 00:26:36.000000000 -0700
+++ 2.6.14-rc5-mm1/include/linux/sched.h	2005-10-27 00:35:34.000000000 -0700
@@ -945,7 +945,7 @@ extern int set_cpus_allowed(task_t *p, c
 #else
 static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask)
 {
-	if (!cpus_intersects(new_mask, cpu_online_map))
+	if (!cpu_isset(0, new_mask))
 		return -EINVAL;
 	return 0;
 }

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.650.933.1373, 1.925.600.0401

             reply	other threads:[~2005-10-27  8:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-27  8:53 Paul Jackson [this message]
2005-10-29  1:33 ` [PATCH] sched hardcode non-smp set_cpus_allowed Rusty Russell
2005-10-29  4:25   ` Paul Jackson

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=20051027085346.27658.76262.sendpatchset@sam.engr.sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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