git: 330e4f6acbdc - main - powerpc: create a tag with the parents implementation if supplied
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 01 May 2026 21:15:17 UTC
The branch main has been updated by adrian:
URL: https://cgit.FreeBSD.org/src/commit/?id=330e4f6acbdc360c0dc466f4d54bc63e663d307a
commit 330e4f6acbdc360c0dc466f4d54bc63e663d307a
Author: Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2026-02-15 02:10:31 +0000
Commit: Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2026-05-01 21:14:31 +0000
powerpc: create a tag with the parents implementation if supplied
If a parent tag is supplied then use its implementation.
Differential Revision: https://reviews.freebsd.org/D55314
---
sys/powerpc/powerpc/busdma_machdep.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c
index 5118a8847375..8e73e303cb11 100644
--- a/sys/powerpc/powerpc/busdma_machdep.c
+++ b/sys/powerpc/powerpc/busdma_machdep.c
@@ -71,15 +71,24 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
void *lockfuncarg, bus_dma_tag_t *dmat)
{
+ struct bus_dma_tag_common *tc;
+ int error;
/* Filters are no longer supported. */
if (filter != NULL || filterarg != NULL)
return (EINVAL);
-
- return bus_dma_bounce_impl.tag_create(parent, alignment,
- boundary, lowaddr, highaddr, maxsize, nsegments,
- maxsegsz, flags, lockfunc, lockfuncarg, dmat);
+ if (parent == NULL) {
+ error = bus_dma_bounce_impl.tag_create(parent, alignment,
+ boundary, lowaddr, highaddr, maxsize, nsegments, maxsegsz,
+ flags, lockfunc, lockfuncarg, dmat);
+ } else {
+ tc = (struct bus_dma_tag_common *)parent;
+ error = tc->impl->tag_create(parent, alignment,
+ boundary, lowaddr, highaddr, maxsize, nsegments, maxsegsz,
+ flags, lockfunc, lockfuncarg, dmat);
+ }
+ return (error);
}