lkml.org 
[lkml]   [2004]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] mask ADT: simplify a couple cpumask uses [8/22]
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [from the cache]
©2003-2011 Jasper Spaans