Re: [PATCH 1/1] powerpc/pseries/iommu: Fix window size for direct mapping with pmem

From
Leonardo Bras <hidden>
Date
2021-04-20 05:29:47
Also in
lkml
Reply to
Alexey Kardashevskiy, 2021-04-20
On Tue, 2021-04-20 at 15:18 +1000, Alexey Kardashevskiy wrote:
On 20/04/2021 14:54, Leonardo Bras wrote:
quoted
As of today, if the DDW is big enough to fit (1 << MAX_PHYSMEM_BITS) it's
possible to use direct DMA mapping even with pmem region.

But, if that happens, the window size (len) is set to
(MAX_PHYSMEM_BITS - page_shift) instead of MAX_PHYSMEM_BITS, causing a
pagesize times smaller DDW to be created, being insufficient for correct
usage.

Fix this so the correct window size is used in this case.
Good find indeed.

afaict this does not create a huge problem though as 
query.largest_available_block is always smaller than (MAX_PHYSMEM_BITS - 
page_shift) where it matters (phyp).


Reviewed-by: Alexey Kardashevskiy <redacted>
Thanks for reviewing!

Leonardo Bras
Thread (4 messages) 4 messages, 3 authors, last reply 2021-04-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help