]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv/ioda2: Reduce upper limit for DMA window size
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Fri, 1 Jun 2018 08:06:16 +0000 (18:06 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 2 Jul 2018 13:54:29 +0000 (23:54 +1000)
commit472dee594a14297fce4fd2464624e7c891e62169
tree246eb16b4fe245bf32384da4e3677b218333dc05
parentde12720418440ccb36aab6ababd6becc09ee24b0
powerpc/powernv/ioda2: Reduce upper limit for DMA window size

We use PHB in mode1 which uses bit 59 to select a correct DMA window.
However there is mode2 which uses bits 59:55 and allows up to 32 DMA
windows per a PE.

Even though documentation does not clearly specify that, it seems that
the actual hardware does not support bits 59:55 even in mode1, in other
words we can create a window as big as 1<<58 but DMA simply won't work.

This reduces the upper limit from 59 to 55 bits to let the userspace know
about the hardware limits.

Fixes: e0ae9422c0 "powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested"
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c