powerpc/powernv/pci: Add helper to find ioda_pe from BDFN
authorOliver O'Halloran <oohall@gmail.com>
Fri, 17 Apr 2020 07:35:05 +0000 (17:35 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 28 May 2020 13:24:38 +0000 (23:24 +1000)
commita8d7d5fc2e1672924a391aa37ef8c02d1ec84a4e
treea25a4773ee37656e4eef8c66d1b0ceec607c81d7
parent9d0879a2dbc3d0c15f8c71490079c1c38f9f3800
powerpc/powernv/pci: Add helper to find ioda_pe from BDFN

For each PHB we maintain a reverse-map that can be used to find the
PE that a BDFN is currently mapped to. Add a helper for doing this
lookup so we can check if a PE has been configured without looking
at pdn->pe_number.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200417073508.30356-2-oohall@gmail.com
arch/powerpc/platforms/powernv/pci-ioda.c
arch/powerpc/platforms/powernv/pci.h