From owner-svn-src-head@freebsd.org Mon Mar 27 17:18:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADD8ED20089; Mon, 27 Mar 2017 17:18:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C395EC0; Mon, 27 Mar 2017 17:18:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2RHI4Xj088350; Mon, 27 Mar 2017 17:18:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2RHI41a088349; Mon, 27 Mar 2017 17:18:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703271718.v2RHI41a088349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 27 Mar 2017 17:18:04 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 17:18:05 -0000 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 #include #include +#include #include #include @@ -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))