From: Oliver O'Halloran <oohall@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: sbobroff@linux.ibm.com, Oliver O'Halloran <oohall@gmail.com>
Subject: [PATCH 3/5] powerpc/eeh_sysfs: ifdef pseries sr-iov sysfs properties
Date: Mon, 15 Jul 2019 18:56:10 +1000 [thread overview]
Message-ID: <20190715085612.8802-4-oohall@gmail.com> (raw)
In-Reply-To: <20190715085612.8802-1-oohall@gmail.com>
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>
---
arch/powerpc/kernel/eeh_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_sysfs.c b/arch/powerpc/kernel/eeh_sysfs.c
index 6a2c2886f..3adf8cd 100644
--- a/arch/powerpc/kernel/eeh_sysfs.c
+++ b/arch/powerpc/kernel/eeh_sysfs.c
@@ -91,7 +91,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)
{
@@ -148,7 +148,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)
{
--
2.9.5
next prev parent reply other threads:[~2019-07-15 9:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 8:56 Misc EEH fixes Oliver O'Halloran
2019-07-15 8:56 ` [PATCH 1/5] powerpc/eeh_cache: Don't use pci_dn when inserting new ranges Oliver O'Halloran
2019-07-16 3:53 ` Sam Bobroff
2020-01-29 5:17 ` Michael Ellerman
2019-07-15 8:56 ` [PATCH 2/5] powerpc/eeh_sysfs: Fix incorrect comment Oliver O'Halloran
2019-07-16 3:54 ` Sam Bobroff
2019-07-15 8:56 ` Oliver O'Halloran [this message]
2019-07-16 3:54 ` [PATCH 3/5] powerpc/eeh_sysfs: ifdef pseries sr-iov sysfs properties Sam Bobroff
2019-07-15 8:56 ` [PATCH 4/5] powerpc/eeh_sysfs: Remove double pci_dn lookup Oliver O'Halloran
2019-07-16 3:55 ` Sam Bobroff
2019-07-15 8:56 ` [PATCH 5/5] powerpc/eeh_sysfs: Make clearing EEH_DEV_SYSFS saner Oliver O'Halloran
2019-07-16 4:00 ` Sam Bobroff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190715085612.8802-4-oohall@gmail.com \
--to=oohall@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sbobroff@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).