aboutsummaryrefslogtreecommitdiffstats
path: root/lib/genalloc.c
diff options
context:
space:
mode:
authorAkinobu Mita <[email protected]>2009-12-16 00:48:25 +0000
committerLinus Torvalds <[email protected]>2009-12-16 15:20:18 +0000
commitc1a2a962a2ad103846e7950b4591471fabecece7 (patch)
tree9a06ab8d1c65037456bad02c821033197f67f03f /lib/genalloc.c
parentqnx4: use hweight8 (diff)
downloadkernel-c1a2a962a2ad103846e7950b4591471fabecece7.tar.gz
kernel-c1a2a962a2ad103846e7950b4591471fabecece7.zip
bitmap: introduce bitmap_set, bitmap_clear, bitmap_find_next_zero_area
This introduces new bitmap functions: bitmap_set: Set specified bit area bitmap_clear: Clear specified bit area bitmap_find_next_zero_area: Find free bit area These are mostly stolen from iommu helper. The differences are: - Use find_next_bit instead of doing test_bit for each bit - Rewrite bitmap_set and bitmap_clear Instead of setting or clearing for each bit. - Check the last bit of the limit iommu-helper doesn't want to find such area - The return value if there is no zero area find_next_zero_area in iommu helper: returns -1 bitmap_find_next_zero_area: return >= bitmap size Signed-off-by: Akinobu Mita <[email protected]> Cc: FUJITA Tomonori <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Lothar Wassmann <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Yevgeny Petrilin <[email protected]> Cc: Tony Luck <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: Joerg Roedel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions