diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2019-07-15 18:56:10 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-01-23 21:31:18 +1100 |
commit | 4107248c5615ab20b64073f2dd5917b3961239dc (patch) | |
tree | ae877251fd28eb6e04337ea778b08235f64ad965 /arch/powerpc/kernel/eeh_sysfs.c | |
parent | 89f51839bd75b1aa8fa062a5f2b4bbcde560f6e2 (diff) | |
download | linux-4107248c5615ab20b64073f2dd5917b3961239dc.tar.bz2 |
powerpc/eeh_sysfs: ifdef pseries sr-iov sysfs properties
There are several EEH sysfs properties that only exists when the
"ibm,is-open-sriov-pf" property appears in the device tree node of the PCI
device. This used on pseries to indicate to the guest that the hypervisor
allows the guest to configure the SR-IOV capability. Doing this requires
some handshaking between the guest, hypervisor and userspace when a VF is
EEH frozen which is why these properties exist.
This is all dead code on non-pseries platforms so wrap it in an #ifdef
CONFIG_PPC_PSERIES to make the dependency clearer.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Tested-by: Sam Bobroff <sbobroff@linux.ibm.com>
Reviewed-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190715085612.8802-4-oohall@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/eeh_sysfs.c')
-rw-r--r-- | arch/powerpc/kernel/eeh_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/eeh_sysfs.c b/arch/powerpc/kernel/eeh_sysfs.c index 6afd82662b76..64a6dd519bf6 100644 --- a/arch/powerpc/kernel/eeh_sysfs.c +++ b/arch/powerpc/kernel/eeh_sysfs.c @@ -75,7 +75,7 @@ static ssize_t eeh_pe_state_store(struct device *dev, static DEVICE_ATTR_RW(eeh_pe_state); -#ifdef CONFIG_PCI_IOV +#if defined(CONFIG_PCI_IOV) && defined(CONFIG_PPC_PSERIES) static ssize_t eeh_notify_resume_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -132,7 +132,7 @@ static void eeh_notify_resume_remove(struct pci_dev *pdev) #else static inline int eeh_notify_resume_add(struct pci_dev *pdev) { return 0; } static inline void eeh_notify_resume_remove(struct pci_dev *pdev) { } -#endif /* CONFIG_PCI_IOV */ +#endif /* CONFIG_PCI_IOV && CONFIG PPC_PSERIES*/ void eeh_sysfs_add_device(struct pci_dev *pdev) { |