From: Paul Jackson <pj@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: mbligh@aracnet.com, akpm@osdl.org, wli@holomorphy.com,
haveblue@us.ibm.com, colpatch@us.ibm.com
Subject: [PATCH] mask ADT: simplify a couple cpumask uses [8/22]
Date: Mon, 29 Mar 2004 04:13:15 -0800 [thread overview]
Message-ID: <20040329041315.765d4dd2.pj@sgi.com> (raw)
Patch_8_of_22 - Simplify a couple of cpumask checks using cpus_subset
Simplify a couple of code fragements using cpus_subset.
diffstat Patch_8_of_22:
i386/kernel/smp.c | 5 +----
x86_64/kernel/smp.c | 4 +---
2 files changed, 2 insertions(+), 7 deletions(-)
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1713 -> 1.1714
# arch/i386/kernel/smp.c 1.35 -> 1.36
# arch/x86_64/kernel/smp.c 1.19 -> 1.20
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/03/28 pj@sgi.com 1.1714
# Simplify two cpumask calculations using new cpus_subset() operator.
# --------------------------------------------
#
diff -Nru a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
--- a/arch/i386/kernel/smp.c Mon Mar 29 01:03:40 2004
+++ b/arch/i386/kernel/smp.c Mon Mar 29 01:03:40 2004
@@ -345,7 +345,6 @@
static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
unsigned long va)
{
- cpumask_t tmp;
/*
* A couple of (to be removed) sanity checks:
*
@@ -354,9 +353,7 @@
* - mask must exist :)
*/
BUG_ON(cpus_empty(cpumask));
-
- cpus_and(tmp, cpumask, cpu_online_map);
- BUG_ON(!cpus_equal(cpumask, tmp));
+ BUG_ON(!cpus_subset(cpumask, cpu_online_map));
BUG_ON(cpu_isset(smp_processor_id(), cpumask));
BUG_ON(!mm);
diff -Nru a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c
--- a/arch/x86_64/kernel/smp.c Mon Mar 29 01:03:40 2004
+++ b/arch/x86_64/kernel/smp.c Mon Mar 29 01:03:40 2004
@@ -234,7 +234,6 @@
static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
unsigned long va)
{
- cpumask_t tmp;
/*
* A couple of (to be removed) sanity checks:
*
@@ -243,8 +242,7 @@
* - mask must exist :)
*/
BUG_ON(cpus_empty(cpumask));
- cpus_and(tmp, cpumask, cpu_online_map);
- BUG_ON(!cpus_equal(tmp, cpumask));
+ BUG_ON(!cpus_subset(cpumask, cpu_online_map));
BUG_ON(cpu_isset(smp_processor_id(), cpumask));
if (!mm)
BUG();
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
next reply other threads:[~2004-03-29 12:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 12:13 Paul Jackson [this message]
2004-04-01 8:49 ` [PATCH] mask ADT: simplify a couple cpumask uses [8/22] 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=20040329041315.765d4dd2.pj@sgi.com \
--to=pj@sgi.com \
--cc=akpm@osdl.org \
--cc=colpatch@us.ibm.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
--cc=wli@holomorphy.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