svn commit: r316035 - head/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Mon Mar 27 17:18:05 UTC 2017


Author: hselasky
Date: Mon Mar 27 17:18:04 2017
New Revision: 316035
URL: https://svnweb.freebsd.org/changeset/base/316035

Log:
  Implement vmalloc_32() in the LinuxKPI.
  
  Obtained from:		kmacy @
  MFC after:		1 week
  Sponsored by:		Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/slab.h

Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/slab.h	Mon Mar 27 17:09:11 2017	(r316034)
+++ head/sys/compat/linuxkpi/common/include/linux/slab.h	Mon Mar 27 17:18:04 2017	(r316035)
@@ -34,6 +34,7 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/malloc.h>
+#include <sys/limits.h>
 #include <vm/uma.h>
 
 #include <linux/types.h>
@@ -106,6 +107,12 @@ __vmalloc(size_t size, gfp_t flags, int 
 }
 
 static inline void *
+vmalloc_32(size_t size)
+{
+	return (contigmalloc(size, M_KMALLOC, M_WAITOK, 0, UINT_MAX, 1, 1));
+}
+
+static inline void *
 kmalloc_array(size_t n, size_t size, gfp_t flags)
 {
 	if (size != 0 && n > (SIZE_MAX / size))


More information about the svn-src-head mailing list