OSDN Git Service

powerpc/pseries/iommu: Move window-removing part of remove_ddw into remove_dma_window
authorLeonardo Bras <leobras.c@gmail.com>
Wed, 5 Aug 2020 03:04:54 +0000 (00:04 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Sep 2020 12:57:11 +0000 (22:57 +1000)
commit74d0b3994e147a2b503170b5e02f1d07dc086586
tree1e8edd6a28f285d0f9cc41a24872968a893c657d
parent80f0251231131d164eddab78d2b6c1b8e37d0093
powerpc/pseries/iommu: Move window-removing part of remove_ddw into remove_dma_window

Move the window-removing part of remove_ddw into a new function
(remove_dma_window), so it can be used to remove other DMA windows.

It's useful for removing DMA windows that don't create DIRECT64_PROPNAME
property, like the default DMA window from the device, which uses
"ibm,dma-window".

Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
Tested-by: David Dai <zdai@linux.vnet.ibm.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200805030455.123024-4-leobras.c@gmail.com
arch/powerpc/platforms/pseries/iommu.c