* [PATCH] mask ADT: simplify a couple cpumask uses [8/22]
@ 2004-03-29 12:13 Paul Jackson
2004-04-01 8:49 ` Paul Jackson
0 siblings, 1 reply; 2+ messages in thread
From: Paul Jackson @ 2004-03-29 12:13 UTC (permalink / raw)
To: linux-kernel; +Cc: mbligh, akpm, wli, haveblue, colpatch
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mask ADT: simplify a couple cpumask uses [8/22]
2004-03-29 12:13 [PATCH] mask ADT: simplify a couple cpumask uses [8/22] Paul Jackson
@ 2004-04-01 8:49 ` Paul Jackson
0 siblings, 0 replies; 2+ messages in thread
From: Paul Jackson @ 2004-04-01 8:49 UTC (permalink / raw)
To: Paul Jackson
Cc: linux-kernel, mbligh, akpm, wli, haveblue, colpatch,
Hariprasad Nellitheertha
I'm going to drop the cpumask_t refinements in this Patch to the files:
arch/i386/kernel/smp.c
arch/x86_64/kernel/smp.c
A gentleman named "Hari" (Hariprasad Nellitheertha <hari@in.ibm.com>) on
the thread "BUG_ON(!cpus_equal(cpumask, tmp));" is working more
essential changes to these same lines. No sense my colliding with him;
and if his changes go in, mine are no longer relevant.
So I will clear the path for his work.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-01 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-29 12:13 [PATCH] mask ADT: simplify a couple cpumask uses [8/22] Paul Jackson
2004-04-01 8:49 ` Paul Jackson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox