lkml.org 
[lkml]   [2004]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.6.7-rc3-mm1] perfctr cpumask cleanup
Clean up perfctr/virtual by using the new cpus_andnot() operation
instead of messing with cpus_complement() and a new temporary.

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>

diff -ruN linux-2.6.7-rc3-mm1/drivers/perfctr/virtual.c linux-2.6.7-rc3-mm1.perfctr-update/drivers/perfctr/virtual.c
--- linux-2.6.7-rc3-mm1/drivers/perfctr/virtual.c 2004-06-09 19:38:38.000000000 +0200
+++ linux-2.6.7-rc3-mm1.perfctr-update/drivers/perfctr/virtual.c 2004-06-09 21:04:33.000000000 +0200
@@ -403,13 +403,11 @@
return -EFAULT;

if (control.cpu_control.nractrs || control.cpu_control.nrictrs) {
- cpumask_t tmp, old_mask, new_mask, tmp1;
+ cpumask_t tmp, old_mask, new_mask;

tmp = perfctr_cpus_forbidden_mask;
- cpus_complement(tmp1, tmp);
- tmp = tmp1;
old_mask = tsk->cpus_allowed;
- cpus_and(new_mask, old_mask, tmp);
+ cpus_andnot(new_mask, old_mask, tmp);

if (cpus_empty(new_mask))
return -EINVAL;
-
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:03    [W:0.095 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site