From owner-svn-src-all@freebsd.org Tue Apr 30 09:38:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD9C5158A921; Tue, 30 Apr 2019 09:38:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54D0D9627A; Tue, 30 Apr 2019 09:38:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3045B7BBA; Tue, 30 Apr 2019 09:38:23 +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 x3U9cNcv022162; Tue, 30 Apr 2019 09:38:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3U9cMcI022160; Tue, 30 Apr 2019 09:38:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201904300938.x3U9cMcI022160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 30 Apr 2019 09:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346957 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 346957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 54D0D9627A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2019 09:38:23 -0000 Author: hselasky Date: Tue Apr 30 09:38:22 2019 New Revision: 346957 URL: https://svnweb.freebsd.org/changeset/base/346957 Log: Make the dma_pool structure private to the LinuxKPI similar to Linux. No functional change. Discussed with: kib @ Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/dmapool.h head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/include/linux/dmapool.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/dmapool.h Tue Apr 30 09:26:11 2019 (r346956) +++ head/sys/compat/linuxkpi/common/include/linux/dmapool.h Tue Apr 30 09:38:22 2019 (r346957) @@ -37,6 +37,7 @@ #include #include +struct dma_pool; struct dma_pool *linux_dma_pool_create(char *name, struct device *dev, size_t size, size_t align, size_t boundary); void linux_dma_pool_destroy(struct dma_pool *pool); @@ -44,16 +45,6 @@ void *linux_dma_pool_alloc(struct dma_pool *pool, gfp_ dma_addr_t *handle); void linux_dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma_addr); - -struct dma_pool { - struct device *pool_device; - uma_zone_t pool_zone; - struct mtx pool_dma_lock; - bus_dma_tag_t pool_dmat; - size_t pool_entry_size; - struct mtx pool_ptree_lock; - struct pctrie pool_ptree; -}; static inline struct dma_pool * dma_pool_create(char *name, struct device *dev, size_t size, Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Apr 30 09:26:11 2019 (r346956) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Apr 30 09:38:22 2019 (r346957) @@ -658,6 +658,16 @@ linux_dma_unmap_sg_attrs(struct device *dev, struct sc uma_zfree(linux_dma_obj_zone, obj); } +struct dma_pool { + struct device *pool_device; + uma_zone_t pool_zone; + struct mtx pool_dma_lock; + bus_dma_tag_t pool_dmat; + size_t pool_entry_size; + struct mtx pool_ptree_lock; + struct pctrie pool_ptree; +}; + static inline int dma_pool_obj_ctor(void *mem, int size, void *arg, int flags) {