aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/ppc-pci.h
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2019-08-16 14:48:11 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2019-08-22 23:12:46 +1000
commit7c33a994d32d89937b23673e7507e8ec1daad893 (patch)
tree4efd1a58aa42991978d373949452d9b3b3d262a8 /arch/powerpc/include/asm/ppc-pci.h
parentpowerpc/eeh: Refactor around eeh_probe_devices() (diff)
downloadlinux-dev-7c33a994d32d89937b23673e7507e8ec1daad893.tar.xz
linux-dev-7c33a994d32d89937b23673e7507e8ec1daad893.zip
powerpc/eeh: Add bdfn field to eeh_dev
Preparation for removing pci_dn from the powernv EEH code. The only thing we really use pci_dn for is to get the bdfn of the device for config space accesses, so adding that information to eeh_dev reduces the need to carry around the pci_dn. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [SB: Re-wrapped commit message, fixed whitespace damage.] Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/e458eb69a1f591d8a120782f23a8506b15d3c654.1565930772.git.sbobroff@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/ppc-pci.h')
-rw-r--r--arch/powerpc/include/asm/ppc-pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h
index cec2d6409515..72860de205a0 100644
--- a/arch/powerpc/include/asm/ppc-pci.h
+++ b/arch/powerpc/include/asm/ppc-pci.h
@@ -74,6 +74,8 @@ static inline const char *eeh_driver_name(struct pci_dev *pdev)
#endif /* CONFIG_EEH */
+#define PCI_BUSNO(bdfn) ((bdfn >> 8) & 0xff)
+
#else /* CONFIG_PCI */
static inline void init_pci_config_tokens(void) { }
#endif /* !CONFIG_PCI */