RISC-V: busdma_bounce: fix BUS_DMA_ALLOCNOW for non-paged aligned sizes
RISC-V inherited this code from arm64, so implement the fix from r354712. See the revision for the full description. Submitted by: kevans (arm64 version)
This commit is contained in:
parent
e372160177
commit
9b461fa36e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354765
@ -214,7 +214,7 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
|
||||
if (ptoa(bz->total_bpages) < maxsize) {
|
||||
int pages;
|
||||
|
||||
pages = atop(maxsize) - bz->total_bpages;
|
||||
pages = atop(round_page(maxsize)) - bz->total_bpages;
|
||||
|
||||
/* Add pages to our bounce pool */
|
||||
if (alloc_bounce_pages(newtag, pages) < pages)
|
||||
|
Loading…
Reference in New Issue
Block a user