diff options
| -rw-r--r-- | arch/tile/include/asm/bitops.h | 1 | ||||
| -rw-r--r-- | arch/x86/include/asm/bitops.h | 2 | ||||
| -rw-r--r-- | include/asm-generic/atomic.h | 34 | ||||
| -rw-r--r-- | include/asm-generic/bitops/find.h | 39 | ||||
| -rw-r--r-- | include/asm-generic/fcntl.h | 2 | ||||
| -rw-r--r-- | include/asm-generic/io.h | 26 | ||||
| -rw-r--r-- | include/asm-generic/kdebug.h | 2 | ||||
| -rw-r--r-- | include/asm-generic/system.h | 20 | ||||
| -rw-r--r-- | include/linux/bitops.h | 45 |
9 files changed, 86 insertions, 85 deletions
diff --git a/arch/tile/include/asm/bitops.h b/arch/tile/include/asm/bitops.h index 6832b4be8990..6d4f0ff2c68c 100644 --- a/arch/tile/include/asm/bitops.h +++ b/arch/tile/include/asm/bitops.h | |||
| @@ -120,6 +120,7 @@ static inline unsigned long __arch_hweight64(__u64 w) | |||
| 120 | 120 | ||
| 121 | #include <asm-generic/bitops/const_hweight.h> | 121 | #include <asm-generic/bitops/const_hweight.h> |
| 122 | #include <asm-generic/bitops/lock.h> | 122 | #include <asm-generic/bitops/lock.h> |
| 123 | #include <asm-generic/bitops/find.h> | ||
| 123 | #include <asm-generic/bitops/sched.h> | 124 | #include <asm-generic/bitops/sched.h> |
| 124 | #include <asm-generic/bitops/ext2-non-atomic.h> | 125 | #include <asm-generic/bitops/ext2-non-atomic.h> |
| 125 | #include <asm-generic/bitops/minix.h> | 126 | #include <asm-generic/bitops/minix.h> |
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index bafd80defa43..903683b07e42 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h | |||
| @@ -440,6 +440,8 @@ static inline int fls(int x) | |||
| 440 | 440 | ||
| 441 | #ifdef __KERNEL__ | 441 | #ifdef __KERNEL__ |
| 442 | 442 | ||
| 443 | #include <asm-generic/bitops/find.h> | ||
| 444 | |||
| 443 | #include <asm-generic/bitops/sched.h> | 445 | #include <asm-generic/bitops/sched.h> |
| 444 | 446 | ||
| 445 | #define ARCH_HAS_FAST_MULTIPLIER 1 | 447 | #define ARCH_HAS_FAST_MULTIPLIER 1 |
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index fd57b8477fab..e994197f84b7 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
| @@ -120,14 +120,23 @@ static inline void atomic_dec(atomic_t *v) | |||
| 120 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | 120 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) |
| 121 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) | 121 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) |
| 122 | 122 | ||
| 123 | #define atomic_add_unless(v, a, u) \ | 123 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) |
| 124 | ({ \ | 124 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) |
| 125 | int c, old; \ | 125 | |
| 126 | c = atomic_read(v); \ | 126 | #define cmpxchg_local(ptr, o, n) \ |
| 127 | while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \ | 127 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ |
| 128 | c = old; \ | 128 | (unsigned long)(n), sizeof(*(ptr)))) |
| 129 | c != (u); \ | 129 | |
| 130 | }) | 130 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) |
| 131 | |||
| 132 | static inline int atomic_add_unless(atomic_t *v, int a, int u) | ||
| 133 | { | ||
| 134 | int c, old; | ||
| 135 | c = atomic_read(v); | ||
| 136 | while (c != u && (old = atomic_cmpxchg(v, c, c + a)) != c) | ||
| 137 | c = old; | ||
| 138 | return c != u; | ||
| 139 | } | ||
| 131 | 140 | ||
| 132 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 141 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
| 133 | 142 | ||
| @@ -141,15 +150,6 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) | |||
| 141 | raw_local_irq_restore(flags); | 150 | raw_local_irq_restore(flags); |
| 142 | } | 151 | } |
| 143 | 152 | ||
| 144 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) | ||
| 145 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) | ||
| 146 | |||
| 147 | #define cmpxchg_local(ptr, o, n) \ | ||
| 148 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
| 149 | (unsigned long)(n), sizeof(*(ptr)))) | ||
| 150 | |||
| 151 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
| 152 | |||
| 153 | /* Assume that atomic operations are already serializing */ | 153 | /* Assume that atomic operations are already serializing */ |
| 154 | #define smp_mb__before_atomic_dec() barrier() | 154 | #define smp_mb__before_atomic_dec() barrier() |
| 155 | #define smp_mb__after_atomic_dec() barrier() | 155 | #define smp_mb__after_atomic_dec() barrier() |
diff --git a/include/asm-generic/bitops/find.h b/include/asm-generic/bitops/find.h index 1914e9742512..110fa700f853 100644 --- a/include/asm-generic/bitops/find.h +++ b/include/asm-generic/bitops/find.h | |||
| @@ -1,15 +1,50 @@ | |||
| 1 | #ifndef _ASM_GENERIC_BITOPS_FIND_H_ | 1 | #ifndef _ASM_GENERIC_BITOPS_FIND_H_ |
| 2 | #define _ASM_GENERIC_BITOPS_FIND_H_ | 2 | #define _ASM_GENERIC_BITOPS_FIND_H_ |
| 3 | 3 | ||
| 4 | #ifndef CONFIG_GENERIC_FIND_NEXT_BIT | 4 | /** |
| 5 | * find_next_bit - find the next set bit in a memory region | ||
| 6 | * @addr: The address to base the search on | ||
| 7 | * @offset: The bitnumber to start searching at | ||
| 8 | * @size: The bitmap size in bits | ||
| 9 | */ | ||
| 5 | extern unsigned long find_next_bit(const unsigned long *addr, unsigned long | 10 | extern unsigned long find_next_bit(const unsigned long *addr, unsigned long |
| 6 | size, unsigned long offset); | 11 | size, unsigned long offset); |
| 7 | 12 | ||
| 13 | /** | ||
| 14 | * find_next_zero_bit - find the next cleared bit in a memory region | ||
| 15 | * @addr: The address to base the search on | ||
| 16 | * @offset: The bitnumber to start searching at | ||
| 17 | * @size: The bitmap size in bits | ||
| 18 | */ | ||
| 8 | extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned | 19 | extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned |
| 9 | long size, unsigned long offset); | 20 | long size, unsigned long offset); |
| 10 | #endif | 21 | |
| 22 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT | ||
| 23 | |||
| 24 | /** | ||
| 25 | * find_first_bit - find the first set bit in a memory region | ||
| 26 | * @addr: The address to start the search at | ||
| 27 | * @size: The maximum size to search | ||
| 28 | * | ||
| 29 | * Returns the bit number of the first set bit. | ||
| 30 | */ | ||
| 31 | extern unsigned long find_first_bit(const unsigned long *addr, | ||
| 32 | unsigned long size); | ||
| 33 | |||
| 34 | /** | ||
| 35 | * find_first_zero_bit - find the first cleared bit in a memory region | ||
| 36 | * @addr: The address to start the search at | ||
| 37 | * @size: The maximum size to search | ||
| 38 | * | ||
| 39 | * Returns the bit number of the first cleared bit. | ||
| 40 | */ | ||
| 41 | extern unsigned long find_first_zero_bit(const unsigned long *addr, | ||
| 42 | unsigned long size); | ||
| 43 | #else /* CONFIG_GENERIC_FIND_FIRST_BIT */ | ||
| 11 | 44 | ||
| 12 | #define find_first_bit(addr, size) find_next_bit((addr), (size), 0) | 45 | #define find_first_bit(addr, size) find_next_bit((addr), (size), 0) |
| 13 | #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0) | 46 | #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0) |
| 14 | 47 | ||
| 48 | #endif /* CONFIG_GENERIC_FIND_FIRST_BIT */ | ||
| 49 | |||
| 15 | #endif /*_ASM_GENERIC_BITOPS_FIND_H_ */ | 50 | #endif /*_ASM_GENERIC_BITOPS_FIND_H_ */ |
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h index a70b2d2bfc14..0fc16e3f0bfc 100644 --- a/include/asm-generic/fcntl.h +++ b/include/asm-generic/fcntl.h | |||
| @@ -122,7 +122,7 @@ | |||
| 122 | 122 | ||
| 123 | struct f_owner_ex { | 123 | struct f_owner_ex { |
| 124 | int type; | 124 | int type; |
| 125 | pid_t pid; | 125 | __kernel_pid_t pid; |
| 126 | }; | 126 | }; |
| 127 | 127 | ||
| 128 | /* for F_[GET|SET]FL */ | 128 | /* for F_[GET|SET]FL */ |
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 118601fce92d..3577ca11a0be 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h | |||
| @@ -19,7 +19,9 @@ | |||
| 19 | #include <asm-generic/iomap.h> | 19 | #include <asm-generic/iomap.h> |
| 20 | #endif | 20 | #endif |
| 21 | 21 | ||
| 22 | #ifndef mmiowb | ||
| 22 | #define mmiowb() do {} while (0) | 23 | #define mmiowb() do {} while (0) |
| 24 | #endif | ||
| 23 | 25 | ||
| 24 | /*****************************************************************************/ | 26 | /*****************************************************************************/ |
| 25 | /* | 27 | /* |
| @@ -28,39 +30,51 @@ | |||
| 28 | * differently. On the simple architectures, we just read/write the | 30 | * differently. On the simple architectures, we just read/write the |
| 29 | * memory location directly. | 31 | * memory location directly. |
| 30 | */ | 32 | */ |
| 33 | #ifndef __raw_readb | ||
| 31 | static inline u8 __raw_readb(const volatile void __iomem *addr) | 34 | static inline u8 __raw_readb(const volatile void __iomem *addr) |
| 32 | { | 35 | { |
| 33 | return *(const volatile u8 __force *) addr; | 36 | return *(const volatile u8 __force *) addr; |
| 34 | } | 37 | } |
| 38 | #endif | ||
| 35 | 39 | ||
| 40 | #ifndef __raw_readw | ||
| 36 | static inline u16 __raw_readw(const volatile void __iomem *addr) | 41 | static inline u16 __raw_readw(const volatile void __iomem *addr) |
| 37 | { | 42 | { |
| 38 | return *(const volatile u16 __force *) addr; | 43 | return *(const volatile u16 __force *) addr; |
| 39 | } | 44 | } |
| 45 | #endif | ||
| 40 | 46 | ||
| 47 | #ifndef __raw_readl | ||
| 41 | static inline u32 __raw_readl(const volatile void __iomem *addr) | 48 | static inline u32 __raw_readl(const volatile void __iomem *addr) |
| 42 | { | 49 | { |
| 43 | return *(const volatile u32 __force *) addr; | 50 | return *(const volatile u32 __force *) addr; |
| 44 | } | 51 | } |
| 52 | #endif | ||
| 45 | 53 | ||
| 46 | #define readb __raw_readb | 54 | #define readb __raw_readb |
| 47 | #define readw(addr) __le16_to_cpu(__raw_readw(addr)) | 55 | #define readw(addr) __le16_to_cpu(__raw_readw(addr)) |
| 48 | #define readl(addr) __le32_to_cpu(__raw_readl(addr)) | 56 | #define readl(addr) __le32_to_cpu(__raw_readl(addr)) |
| 49 | 57 | ||
| 58 | #ifndef __raw_writeb | ||
| 50 | static inline void __raw_writeb(u8 b, volatile void __iomem *addr) | 59 | static inline void __raw_writeb(u8 b, volatile void __iomem *addr) |
| 51 | { | 60 | { |
| 52 | *(volatile u8 __force *) addr = b; | 61 | *(volatile u8 __force *) addr = b; |
| 53 | } | 62 | } |
| 63 | #endif | ||
| 54 | 64 | ||
| 65 | #ifndef __raw_writew | ||
| 55 | static inline void __raw_writew(u16 b, volatile void __iomem *addr) | 66 | static inline void __raw_writew(u16 b, volatile void __iomem *addr) |
| 56 | { | 67 | { |
| 57 | *(volatile u16 __force *) addr = b; | 68 | *(volatile u16 __force *) addr = b; |
| 58 | } | 69 | } |
| 70 | #endif | ||
| 59 | 71 | ||
| 72 | #ifndef __raw_writel | ||
| 60 | static inline void __raw_writel(u32 b, volatile void __iomem *addr) | 73 | static inline void __raw_writel(u32 b, volatile void __iomem *addr) |
| 61 | { | 74 | { |
| 62 | *(volatile u32 __force *) addr = b; | 75 | *(volatile u32 __force *) addr = b; |
| 63 | } | 76 | } |
| 77 | #endif | ||
| 64 | 78 | ||
| 65 | #define writeb __raw_writeb | 79 | #define writeb __raw_writeb |
| 66 | #define writew(b,addr) __raw_writew(__cpu_to_le16(b),addr) | 80 | #define writew(b,addr) __raw_writew(__cpu_to_le16(b),addr) |
| @@ -122,6 +136,7 @@ static inline void outl(u32 b, unsigned long addr) | |||
| 122 | #define outw_p(x, addr) outw((x), (addr)) | 136 | #define outw_p(x, addr) outw((x), (addr)) |
| 123 | #define outl_p(x, addr) outl((x), (addr)) | 137 | #define outl_p(x, addr) outl((x), (addr)) |
| 124 | 138 | ||
| 139 | #ifndef insb | ||
| 125 | static inline void insb(unsigned long addr, void *buffer, int count) | 140 | static inline void insb(unsigned long addr, void *buffer, int count) |
| 126 | { | 141 | { |
| 127 | if (count) { | 142 | if (count) { |
| @@ -132,7 +147,9 @@ static inline void insb(unsigned long addr, void *buffer, int count) | |||
| 132 | } while (--count); | 147 | } while (--count); |
| 133 | } | 148 | } |
| 134 | } | 149 | } |
| 150 | #endif | ||
| 135 | 151 | ||
| 152 | #ifndef insw | ||
| 136 | static inline void insw(unsigned long addr, void *buffer, int count) | 153 | static inline void insw(unsigned long addr, void *buffer, int count) |
| 137 | { | 154 | { |
| 138 | if (count) { | 155 | if (count) { |
| @@ -143,7 +160,9 @@ static inline void insw(unsigned long addr, void *buffer, int count) | |||
| 143 | } while (--count); | 160 | } while (--count); |
| 144 | } | 161 | } |
| 145 | } | 162 | } |
| 163 | #endif | ||
| 146 | 164 | ||
| 165 | #ifndef insl | ||
| 147 | static inline void insl(unsigned long addr, void *buffer, int count) | 166 | static inline void insl(unsigned long addr, void *buffer, int count) |
| 148 | { | 167 | { |
| 149 | if (count) { | 168 | if (count) { |
| @@ -154,7 +173,9 @@ static inline void insl(unsigned long addr, void *buffer, int count) | |||
| 154 | } while (--count); | 173 | } while (--count); |
| 155 | } | 174 | } |
| 156 | } | 175 | } |
| 176 | #endif | ||
| 157 | 177 | ||
| 178 | #ifndef outsb | ||
| 158 | static inline void outsb(unsigned long addr, const void *buffer, int count) | 179 | static inline void outsb(unsigned long addr, const void *buffer, int count) |
| 159 | { | 180 | { |
| 160 | if (count) { | 181 | if (count) { |
| @@ -164,7 +185,9 @@ static inline void outsb(unsigned long addr, const void *buffer, int count) | |||
| 164 | } while (--count); | 185 | } while (--count); |
| 165 | } | 186 | } |
| 166 | } | 187 | } |
| 188 | #endif | ||
| 167 | 189 | ||
| 190 | #ifndef outsw | ||
| 168 | static inline void outsw(unsigned long addr, const void *buffer, int count) | 191 | static inline void outsw(unsigned long addr, const void *buffer, int count) |
| 169 | { | 192 | { |
| 170 | if (count) { | 193 | if (count) { |
| @@ -174,7 +197,9 @@ static inline void outsw(unsigned long addr, const void *buffer, int count) | |||
| 174 | } while (--count); | 197 | } while (--count); |
| 175 | } | 198 | } |
| 176 | } | 199 | } |
| 200 | #endif | ||
| 177 | 201 | ||
| 202 | #ifndef outsl | ||
| 178 | static inline void outsl(unsigned long addr, const void *buffer, int count) | 203 | static inline void outsl(unsigned long addr, const void *buffer, int count) |
| 179 | { | 204 | { |
| 180 | if (count) { | 205 | if (count) { |
| @@ -184,6 +209,7 @@ static inline void outsl(unsigned long addr, const void *buffer, int count) | |||
| 184 | } while (--count); | 209 | } while (--count); |
| 185 | } | 210 | } |
| 186 | } | 211 | } |
| 212 | #endif | ||
| 187 | 213 | ||
| 188 | #ifndef CONFIG_GENERIC_IOMAP | 214 | #ifndef CONFIG_GENERIC_IOMAP |
| 189 | #define ioread8(addr) readb(addr) | 215 | #define ioread8(addr) readb(addr) |
diff --git a/include/asm-generic/kdebug.h b/include/asm-generic/kdebug.h index 11e57b6a85fc..d1814497bcdb 100644 --- a/include/asm-generic/kdebug.h +++ b/include/asm-generic/kdebug.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | enum die_val { | 4 | enum die_val { |
| 5 | DIE_UNUSED, | 5 | DIE_UNUSED, |
| 6 | DIE_OOPS=1 | 6 | DIE_OOPS = 1, |
| 7 | }; | 7 | }; |
| 8 | 8 | ||
| 9 | #endif /* _ASM_GENERIC_KDEBUG_H */ | 9 | #endif /* _ASM_GENERIC_KDEBUG_H */ |
diff --git a/include/asm-generic/system.h b/include/asm-generic/system.h index efa403b5e121..4b0b9cbbfae5 100644 --- a/include/asm-generic/system.h +++ b/include/asm-generic/system.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/irqflags.h> | 21 | #include <linux/irqflags.h> |
| 22 | 22 | ||
| 23 | #include <asm/cmpxchg-local.h> | 23 | #include <asm/cmpxchg-local.h> |
| 24 | #include <asm/cmpxchg.h> | ||
| 24 | 25 | ||
| 25 | struct task_struct; | 26 | struct task_struct; |
| 26 | 27 | ||
| @@ -136,25 +137,6 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) | |||
| 136 | #define xchg(ptr, x) \ | 137 | #define xchg(ptr, x) \ |
| 137 | ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) | 138 | ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) |
| 138 | 139 | ||
| 139 | static inline unsigned long __cmpxchg(volatile unsigned long *m, | ||
| 140 | unsigned long old, unsigned long new) | ||
| 141 | { | ||
| 142 | unsigned long retval; | ||
| 143 | unsigned long flags; | ||
| 144 | |||
| 145 | local_irq_save(flags); | ||
| 146 | retval = *m; | ||
| 147 | if (retval == old) | ||
| 148 | *m = new; | ||
| 149 | local_irq_restore(flags); | ||
| 150 | return retval; | ||
| 151 | } | ||
| 152 | |||
| 153 | #define cmpxchg(ptr, o, n) \ | ||
| 154 | ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \ | ||
| 155 | (unsigned long)(o), \ | ||
| 156 | (unsigned long)(n))) | ||
| 157 | |||
| 158 | #endif /* !__ASSEMBLY__ */ | 140 | #endif /* !__ASSEMBLY__ */ |
| 159 | 141 | ||
| 160 | #endif /* __KERNEL__ */ | 142 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index fc68053378ce..827cc95711ef 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -136,28 +136,6 @@ static inline unsigned long __ffs64(u64 word) | |||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | #ifdef __KERNEL__ | 138 | #ifdef __KERNEL__ |
| 139 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT | ||
| 140 | |||
| 141 | /** | ||
| 142 | * find_first_bit - find the first set bit in a memory region | ||
| 143 | * @addr: The address to start the search at | ||
| 144 | * @size: The maximum size to search | ||
| 145 | * | ||
| 146 | * Returns the bit number of the first set bit. | ||
| 147 | */ | ||
| 148 | extern unsigned long find_first_bit(const unsigned long *addr, | ||
| 149 | unsigned long size); | ||
| 150 | |||
| 151 | /** | ||
| 152 | * find_first_zero_bit - find the first cleared bit in a memory region | ||
| 153 | * @addr: The address to start the search at | ||
| 154 | * @size: The maximum size to search | ||
| 155 | * | ||
| 156 | * Returns the bit number of the first cleared bit. | ||
| 157 | */ | ||
| 158 | extern unsigned long find_first_zero_bit(const unsigned long *addr, | ||
| 159 | unsigned long size); | ||
| 160 | #endif /* CONFIG_GENERIC_FIND_FIRST_BIT */ | ||
| 161 | 139 | ||
| 162 | #ifdef CONFIG_GENERIC_FIND_LAST_BIT | 140 | #ifdef CONFIG_GENERIC_FIND_LAST_BIT |
| 163 | /** | 141 | /** |
| @@ -171,28 +149,5 @@ extern unsigned long find_last_bit(const unsigned long *addr, | |||
| 171 | unsigned long size); | 149 | unsigned long size); |
| 172 | #endif /* CONFIG_GENERIC_FIND_LAST_BIT */ | 150 | #endif /* CONFIG_GENERIC_FIND_LAST_BIT */ |
| 173 | 151 | ||
| 174 | #ifdef CONFIG_GENERIC_FIND_NEXT_BIT | ||
| 175 | |||
| 176 | /** | ||
| 177 | * find_next_bit - find the next set bit in a memory region | ||
| 178 | * @addr: The address to base the search on | ||
| 179 | * @offset: The bitnumber to start searching at | ||
| 180 | * @size: The bitmap size in bits | ||
| 181 | */ | ||
| 182 | extern unsigned long find_next_bit(const unsigned long *addr, | ||
| 183 | unsigned long size, unsigned long offset); | ||
| 184 | |||
| 185 | /** | ||
| 186 | * find_next_zero_bit - find the next cleared bit in a memory region | ||
| 187 | * @addr: The address to base the search on | ||
| 188 | * @offset: The bitnumber to start searching at | ||
| 189 | * @size: The bitmap size in bits | ||
| 190 | */ | ||
| 191 | |||
| 192 | extern unsigned long find_next_zero_bit(const unsigned long *addr, | ||
| 193 | unsigned long size, | ||
| 194 | unsigned long offset); | ||
| 195 | |||
| 196 | #endif /* CONFIG_GENERIC_FIND_NEXT_BIT */ | ||
| 197 | #endif /* __KERNEL__ */ | 152 | #endif /* __KERNEL__ */ |
| 198 | #endif | 153 | #endif |
