]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/iommu: Use memory@ nodes in max RAM address calculation
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 19 Dec 2018 08:52:18 +0000 (19:52 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 21 Dec 2018 05:20:46 +0000 (16:20 +1100)
commit793fdd2b656ed182e20d97146048b3854e765f51
treed36f61ff990774027ca7d31614ee2082b1bee89f
parent48cdeb96bf94faa7904737fed8729be38bf5faad
powerpc/pseries/iommu: Use memory@ nodes in max RAM address calculation

We might have memory@ nodes with "linux,usable-memory" set to zero
(for example, to replicate powernv's behaviour for GPU coherent memory)
which means that the memory needs an extra initialization but since
it can be used afterwards, the pseries platform will try mapping it
for DMA so the DMA window needs to cover those memory regions too;
if the window cannot cover new memory regions, the memory onlining fails.

This walks through the memory nodes to find the highest RAM address to
let a huge DMA window cover that too in case this memory gets onlined
later.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/iommu.c