Messages in this thread Patch in this message | | | Date | Wed, 9 Jun 2004 22:50:32 +0200 (MEST) | From | Mikael Pettersson <> | 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/
| |