diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/bitops.h | 2 | ||||
| -rw-r--r-- | include/asm-generic/cpumask_array.h | 2 | ||||
| -rw-r--r-- | include/asm-i386/mpspec.h | 2 | ||||
| -rw-r--r-- | include/asm-x86_64/mpspec.h | 2 | ||||
| -rw-r--r-- | include/linux/bitmap.h | 12 |
5 files changed, 14 insertions, 6 deletions
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) diff --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h index b2cc2feeb8a4..31a9717c1a8b 100644 --- a/include/asm-i386/mpspec.h +++ b/include/asm-i386/mpspec.h @@ -53,7 +53,7 @@ typedef struct physid_mask physid_mask_t; #define physids_and(dst, src1, src2) bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS) #define physids_or(dst, src1, src2) bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS) #define physids_clear(map) bitmap_zero((map).mask, MAX_APICS) -#define physids_complement(map) bitmap_complement((map).mask, MAX_APICS) +#define physids_complement(map) bitmap_complement((map).mask, (map).mask, MAX_APICS) #define physids_empty(map) bitmap_empty((map).mask, MAX_APICS) #define physids_equal(map1, map2) bitmap_equal((map1).mask, (map2).mask, MAX_APICS) #define physids_weight(map) bitmap_weight((map).mask, MAX_APICS) diff --git a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h index fd707a6a8bcd..a9a6f16672f2 100644 --- a/include/asm-x86_64/mpspec.h +++ b/include/asm-x86_64/mpspec.h @@ -212,7 +212,7 @@ typedef struct physid_mask physid_mask_t; #define physids_and(dst, src1, src2) bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS) #define physids_or(dst, src1, src2) bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS) #define physids_clear(map) bitmap_zero((map).mask, MAX_APICS) -#define physids_complement(map) bitmap_complement((map).mask, MAX_APICS) +#define physids_complement(map) bitmap_complement((map).mask, (map).mask, MAX_APICS) #define physids_empty(map) bitmap_empty((map).mask, MAX_APICS) #define physids_equal(map1, map2) bitmap_equal((map1).mask, (map2).mask, MAX_APICS) #define physids_weight(map) bitmap_weight((map).mask, MAX_APICS) diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index c301d121c8d0..bc93e0167a81 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -13,8 +13,8 @@ int bitmap_empty(const unsigned long *bitmap, int bits); int bitmap_full(const unsigned long *bitmap, int bits); int bitmap_equal(const unsigned long *bitmap1, - unsigned long *bitmap2, int bits); -void bitmap_complement(unsigned long *bitmap, int bits); + const unsigned long *bitmap2, int bits); +void bitmap_complement(unsigned long *dst, const unsigned long *src, int bits); static inline void bitmap_zero(unsigned long *bitmap, int bits) { @@ -41,6 +41,14 @@ void bitmap_and(unsigned long *dst, const unsigned long *bitmap1, const unsigned long *bitmap2, int bits); void bitmap_or(unsigned long *dst, const unsigned long *bitmap1, const unsigned long *bitmap2, int bits); +void bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +void bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +int bitmap_intersects(const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +int bitmap_subset(const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); int bitmap_weight(const unsigned long *bitmap, int bits); int bitmap_scnprintf(char *buf, unsigned int buflen, const unsigned long *maskp, int bits); |
