]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism
authorGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Mon, 11 Apr 2016 19:17:23 +0000 (16:17 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 12 May 2016 09:52:21 +0000 (19:52 +1000)
commita89af2bc195c5adb96ba0b32e0be2d853623a105
tree5b9ace304e3667589c9db1959bb56652e3648b5b
parenta8bf2cbbe0bfa1651e4b2b9f862e6d59cbfe923e
powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism

Commit ce7d0fae9921 ("powerpc/eeh: Remove eeh information from pci_dn")
changed the pci_dn struct by removing its EEH-related members.
As part of this clean-up, DDW mechanism was modified to read the device
configuration address from eeh_dev struct.

As a consequence, now if we disable EEH mechanism on kernel command-line
for example, the DDW mechanism will fail, generating a kernel oops by
dereferencing a NULL pointer (which turns to be the eeh_dev pointer).

This patch just changes the configuration address calculation on DDW
functions to a manual calculation based on pci_dn members instead of
using eeh_dev-based address.

No functional changes were made. This was tested on pSeries, both
in PHyp and qemu guest.

Fixes: ce7d0fae9921 ("powerpc/eeh: Remove eeh information from pci_dn")
Cc: stable@vger.kernel.org # v3.4+
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/iommu.c