powerpc/powernv/pci-ioda: fix kdump with non-power-of-2 crashkernel=
authorNishanth Aravamudan <nacc@linux.vnet.ibm.com>
Fri, 4 Sep 2015 18:22:52 +0000 (11:22 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 7 Sep 2015 10:14:18 +0000 (20:14 +1000)
commitfa14486979b3a47307bcdb10f8b5baa875a5cf68
treeac40ffce991fa75b578d491a9a925b011b1174da
parentbb0054552d080dd929907c5925d4bedc8bf6def7
powerpc/powernv/pci-ioda: fix kdump with non-power-of-2 crashkernel=

The 32-bit TCE table initialization relies on the DMA window having a
size equal to a power of 2 (and checks for it explicitly). But
crashkernel= has no constraint that requires a power-of-2 be specified.
This causes the kdump kernel to fail to boot as none of the PCI devices
(including the disk controller) are successfully initialized.

After this change, the PCI devices successfully set up the 32-bit TCE
table and kdump succeeds.

Fixes: aca6913f5551 ("powerpc/powernv/ioda2: Introduce helpers to allocate TCE pages")
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org # 4.2
Tested-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c