All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.6.7-rc3-mm1] perfctr cpumask cleanup
@ 2004-06-09 20:50 Mikael Pettersson
  2004-06-09 22:47 ` Paul Jackson
  2004-06-09 22:55 ` Paul Jackson
  0 siblings, 2 replies; 8+ messages in thread
From: Mikael Pettersson @ 2004-06-09 20:50 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, pj

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;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-06-10 16:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-09 20:50 [PATCH][2.6.7-rc3-mm1] perfctr cpumask cleanup Mikael Pettersson
2004-06-09 22:47 ` Paul Jackson
2004-06-10  9:16   ` Mikael Pettersson
2004-06-10 16:01     ` Paul Jackson
2004-06-10 16:03       ` William Lee Irwin III
2004-06-10 16:11         ` Randy.Dunlap
2004-06-10 16:42         ` Paul Jackson
2004-06-09 22:55 ` Paul Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.