#include <linux/string.h>
#include <linux/uaccess.h>
-@@ -1129,6 +1130,25 @@ bitmap_from_u32array(unsigned long *bitm
- if (src_idx < nwords)
- part = buf[src_idx++];
-
+@@ -1212,3 +1213,22 @@ void bitmap_copy_le(unsigned long *dst,
+ }
+ EXPORT_SYMBOL(bitmap_copy_le);
+ #endif
++
+unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags)
+{
+ return kmalloc_array(BITS_TO_LONGS(nbits), sizeof(unsigned long),
+ kfree(bitmap);
+}
+EXPORT_SYMBOL(bitmap_free);
-+
- #if BITS_PER_LONG == 64
- if (src_idx < nwords)
- part |= ((unsigned long) buf[src_idx++]) << 32;
#include <linux/string.h>
#include <linux/uaccess.h>
-@@ -1129,6 +1130,25 @@ bitmap_from_u32array(unsigned long *bitm
- if (src_idx < nwords)
- part = buf[src_idx++];
-
+@@ -1212,3 +1213,22 @@ void bitmap_copy_le(unsigned long *dst,
+ }
+ EXPORT_SYMBOL(bitmap_copy_le);
+ #endif
++
+unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags)
+{
+ return kmalloc_array(BITS_TO_LONGS(nbits), sizeof(unsigned long),
+ kfree(bitmap);
+}
+EXPORT_SYMBOL(bitmap_free);
-+
- #if BITS_PER_LONG == 64
- if (src_idx < nwords)
- part |= ((unsigned long) buf[src_idx++]) << 32;