Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 May 2020 13:07:01 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360870 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <202005101307.04AD712L036240@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005101307.04AD712L036240>