Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 May 2026 21:15:22 +0000
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c7040d3eaa03 - main - powerpc: busdma declaration shuffling
Message-ID:  <69f517ea.18a06.2a9a5b6@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by adrian:

URL: https://cgit.FreeBSD.org/src/commit/?id=c7040d3eaa03a9dd27fde69ccf585a76dfbb2c6c

commit c7040d3eaa03a9dd27fde69ccf585a76dfbb2c6c
Author:     Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2026-04-01 00:23:56 +0000
Commit:     Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2026-05-01 21:14:59 +0000

    powerpc: busdma declaration shuffling
    
    Shuffle some of the declarations around to match other implementations.
    Expected to be a no-op.
    
    Differential Revision: https://reviews.freebsd.org/D56243
---
 sys/powerpc/powerpc/busdma_bounce.c | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/sys/powerpc/powerpc/busdma_bounce.c b/sys/powerpc/powerpc/busdma_bounce.c
index df66f69b9f02..39e40b3a4284 100644
--- a/sys/powerpc/powerpc/busdma_bounce.c
+++ b/sys/powerpc/powerpc/busdma_bounce.c
@@ -32,9 +32,9 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/domainset.h>
 #include <sys/malloc.h>
 #include <sys/bus.h>
-#include <sys/domainset.h>
 #include <sys/interrupt.h>
 #include <sys/kernel.h>
 #include <sys/ktr.h>
@@ -68,6 +68,18 @@ enum {
 	BF_COHERENT		= 0x10,
 };
 
+struct bounce_page;
+struct bounce_zone;
+
+struct bus_dma_tag {
+	struct bus_dma_tag_common common;
+	int		  map_count;
+	int		  bounce_flags;
+	struct bounce_zone *bounce_zone;
+	device_t	  iommu;
+	void		 *iommu_cookie;
+};
+
 struct bus_dmamap {
 	STAILQ_HEAD(, bounce_page) bpages;
 	int		       pagesneeded;
@@ -86,8 +98,7 @@ struct bus_dmamap {
 static MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
 
 #define	dmat_alignment(dmat)	((dmat)->common.alignment)
-/* XXX TODO: bounce flags? */
-#define	dmat_bounce_flags(dmat)	(0)
+#define	dmat_bounce_flags(dmat)	((dmat)->bounce_flags)
 #define	dmat_boundary(dmat)	((dmat)->common.boundary)
 #define	dmat_domain(dmat)	((dmat)->common.domain)
 #define	dmat_flags(dmat)	((dmat)->common.flags)
@@ -98,20 +109,6 @@ static MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
 #define	dmat_maxsegsz(dmat)	((dmat)->common.maxsegsz)
 #define	dmat_nsegments(dmat)	((dmat)->common.nsegments)
 
-/*
- * Note: at this point the code requires a 'struct bus_dma_tag' to exist
- * or the included code will not function correctly.
- */
-
-struct bus_dma_tag {
-	struct bus_dma_tag_common common;
-	int		  map_count;
-	int		  bounce_flags;
-	struct bounce_zone *bounce_zone;
-	device_t	  iommu;
-	void		 *iommu_cookie;
-};
-
 static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
     "Busdma parameters");
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f517ea.18a06.2a9a5b6>