Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2019 09:38:22 +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: r346957 - in head/sys/compat/linuxkpi/common: include/linux src
Message-ID:  <201904300938.x3U9cMcI022160@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <linux/device.h>
 #include <linux/slab.h>
 
+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)
 {



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