• Alexey Kardashevskiy's avatar
    powerpc/pseries/iommu: Use memory@ nodes in max RAM address calculation · 68c0449e
    Alexey Kardashevskiy authored
    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: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    68c0449e
iommu.c 37.2 KB