Author: manu Date: Sun May 10 13:07:00 2020 New Revision: 360870 URL: https://svnweb.freebsd.org/changeset/base/360870
Log: linuxkpi: Add bitmap_alloc and bitmap_free This is a simple call to kmallock_array/kfree, therefore include linux/slab.h as this is where the kmalloc_array/kfree definition is. Sponsored-by: The FreeBSD Foundation Reviewed by: hselsasky Differential Revision: https://reviews.freebsd.org/D24794 Modified: head/sys/compat/linuxkpi/common/include/linux/bitmap.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitmap.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitmap.h Sun May 10 10:03:10 2020 (r360869) +++ head/sys/compat/linuxkpi/common/include/linux/bitmap.h Sun May 10 13:07:00 2020 (r360870) @@ -30,6 +30,7 @@ #define _LINUX_BITMAP_H_ #include <linux/bitops.h> +#include <linux/slab.h> static inline void bitmap_zero(unsigned long *addr, const unsigned int size) @@ -307,6 +308,12 @@ bitmap_xor(unsigned long *dst, const unsigned long *sr for (i = 0; i != end; i++) dst[i] = src1[i] ^ src2[i]; +} + +static inline void +bitmap_free(const unsigned long *bitmap) +{ + kfree(bitmap); } #endif /* _LINUX_BITMAP_H_ */ _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"