diff options
author | Akinobu Mita <[email protected]> | 2009-12-15 16:48:25 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2009-12-16 07:20:18 -0800 |
commit | c1a2a962a2ad103846e7950b4591471fabecece7 (patch) | |
tree | 9a06ab8d1c65037456bad02c821033197f67f03f /tools/perf/util/trace-event-scripting.c | |
parent | 868d64812ae84e8f094e0bcf95157c7d79d625ec (diff) |
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 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions