From 0a475c59a9dbacca1b6fd16f0b337b97a6b08d7f Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Mon, 27 Mar 2017 17:18:04 +0000 Subject: [PATCH] Implement vmalloc_32() in the LinuxKPI. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies --- sys/compat/linuxkpi/common/include/linux/slab.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index c0b30d1b7ad..541441df25d 100644 --- a/sys/compat/linuxkpi/common/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -105,6 +106,12 @@ __vmalloc(size_t size, gfp_t flags, int other) return (malloc(size, M_KMALLOC, linux_check_m_flags(flags))); } +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) {