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
3a09fa0468
commit
bfc168b30e
@ -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…
x
Reference in New Issue
Block a user