]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/bitmap.h
mempolicy: add bitmap_onto() and bitmap_fold() operations
[mirror_ubuntu-artful-kernel.git] / include / linux / bitmap.h
index 1dbe074f1c645fed22e55484f26cdd90cc325bfb..43b406def35f6bfadcdbf5b621995e7f920bc851 100644 (file)
@@ -46,6 +46,8 @@
  * bitmap_shift_left(dst, src, n, nbits)       *dst = *src << n
  * bitmap_remap(dst, src, old, new, nbits)     *dst = map(old, new)(src)
  * bitmap_bitremap(oldbit, old, new, nbits)    newbit = map(old, new)(oldbit)
+ * bitmap_onto(dst, orig, relmap, nbits)       *dst = orig relative to relmap
+ * bitmap_fold(dst, orig, sz, nbits)           dst bits = orig bits mod sz
  * bitmap_scnprintf(buf, len, src, nbits)      Print bitmap src to buf
  * bitmap_parse(buf, buflen, dst, nbits)       Parse bitmap dst from kernel buf
  * bitmap_parse_user(ubuf, ulen, dst, nbits)   Parse bitmap dst from user buf
@@ -121,6 +123,10 @@ extern void bitmap_remap(unsigned long *dst, const unsigned long *src,
                const unsigned long *old, const unsigned long *new, int bits);
 extern int bitmap_bitremap(int oldbit,
                const unsigned long *old, const unsigned long *new, int bits);
+extern void bitmap_onto(unsigned long *dst, const unsigned long *orig,
+               const unsigned long *relmap, int bits);
+extern void bitmap_fold(unsigned long *dst, const unsigned long *orig,
+               int sz, int bits);
 extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
 extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
 extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);