• Alexey Kardashevskiy's avatar
    powerpc/powernv/npu: Move single TVE handling to NPU PE · b04149c2
    Alexey Kardashevskiy authored
    Normal PCI PEs have 2 TVEs, one per a DMA window; however NPU PE has only
    one which points to one of two tables of the corresponding PCI PE.
    
    So whenever a new DMA window is programmed to PEs, the NPU PE needs to
    release old table in order to use the new one.
    
    Commit d41ce7b1 ("powerpc/powernv/npu: Do not try invalidating 32bit
    table when 64bit table is enabled") did just that but in pci-ioda.c
    while it actually belongs to npu-dma.c.
    
    This moves the single TVE handling to npu-dma.c. This does not implement
    restoring though as it is highly unlikely that we can set the table to
    PCI PE and cannot to NPU PE and if that fails, we could only set 32bit
    table to NPU PE and this configuration is not really supported or wanted.
    Signed-off-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    b04149c2
npu-dma.c 24.3 KB