Page MenuHomeFreeBSD

powerpc/dma: Fix accounting and loading large segments
ClosedPublic

Authored by jhibbits on Aug 3 2026, 9:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 6, 4:39 PM
Unknown Object (File)
Sun, Sep 6, 5:20 AM
Unknown Object (File)
Sat, Sep 5, 7:25 PM
Unknown Object (File)
Sat, Sep 5, 3:51 PM
Unknown Object (File)
Fri, Sep 4, 7:23 AM
Unknown Object (File)
Fri, Sep 4, 7:16 AM
Unknown Object (File)
Thu, Sep 3, 4:56 PM
Unknown Object (File)
Thu, Sep 3, 6:27 AM
Subscribers

Details

Summary

When the first page of a segment fits alignment, the second likely does
not, so the DMA infrastructure (must_bounce()) thinks it needs to bounce
the pages. Fix this by passing the previous end (address of byte
following the previous segment) as a third argument to must_bounce(), so
that the alignment check is done against the start of a new segment if
and only if necessary, instead of the current page.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

booted on ppc64be pseries9 VM, works fine so far. I assume ppc64le pseries9 VM will work the same.

Will test the powermac G5 next. I assume you did p8/p9 testing already? :-)

build / boot tested on g5 powermac, ran a buildworld on it. all good so far.

This revision is now accepted and ready to land.Thu, Aug 20, 8:00 PM