From ea0c19290646e6bb7cd3657db83eac3a0d641418 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 23 Jun 2004 18:50:40 -0700 Subject: [PATCH] cpumask: bitmap cleanup preparation for cpumask overhaul From: Paul Jackson Document the bitmap bit model and handling of unused bits. Tighten up bitmap so it does not generate nonzero bits in the unused tail if it is not given any on input. Add intersects, subset, xor and andnot operators. Change bitmap_complement to take two operands. Add a couple of missing 'const' qualifiers on bitops test_bit and bitmap_equal args. Signed-off-by: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-generic/bitops.h | 2 +- include/asm-generic/cpumask_array.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include/asm-generic') diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h index 23ac5227b702..ce31b739fd80 100644 --- a/include/asm-generic/bitops.h +++ b/include/asm-generic/bitops.h @@ -42,7 +42,7 @@ extern __inline__ int clear_bit(int nr, long * addr) return retval; } -extern __inline__ int test_bit(int nr, long * addr) +extern __inline__ int test_bit(int nr, const unsigned long * addr) { int mask; diff --git a/include/asm-generic/cpumask_array.h b/include/asm-generic/cpumask_array.h index ddd6e1185dba..1be08ae2e93b 100644 --- a/include/asm-generic/cpumask_array.h +++ b/include/asm-generic/cpumask_array.h @@ -17,7 +17,7 @@ #define cpus_and(dst,src1,src2) bitmap_and((dst).mask,(src1).mask, (src2).mask, NR_CPUS) #define cpus_or(dst,src1,src2) bitmap_or((dst).mask, (src1).mask, (src2).mask, NR_CPUS) #define cpus_clear(map) bitmap_zero((map).mask, NR_CPUS) -#define cpus_complement(map) bitmap_complement((map).mask, NR_CPUS) +#define cpus_complement(map) bitmap_complement((map).mask, (map).mask, NR_CPUS) #define cpus_equal(map1, map2) bitmap_equal((map1).mask, (map2).mask, NR_CPUS) #define cpus_empty(map) bitmap_empty(map.mask, NR_CPUS) #define cpus_addr(map) ((map).mask) -- cgit v1.2.3