Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Mar 2017 17:18:04 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316035 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201703271718.v2RHI41a088349@repo.freebsd.org>

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



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