From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: imunsie@au1.ibm.com, andrew.donnellan@au1.ibm.com,
mpe@ellerman.id.au, Gavin Shan <gwshan@linux.vnet.ibm.com>
Subject: [PATCH] drivers/misc/cxl: Avoid unnecessary error message
Date: Tue, 31 Jan 2017 14:43:36 +1100 [thread overview]
Message-ID: <1485834216-25191-1-git-send-email-gwshan@linux.vnet.ibm.com> (raw)
The following error message was observed. It's complaining M32
memory window is missed on virtual PHB, which is a bit confusing.
The problem is the memory windows are never updated from its
device-tree node.
PCI: Memory resource 0 not set for host bridge \
/pciex@3fffe40000000/pci@0/device@0
This avoids the unnecessary error message by updating the PHB's
memory windows with pci_process_bridge_OF_ranges(). The function
is exported as well.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
arch/powerpc/kernel/pci-common.c | 1 +
drivers/misc/cxl/vphb.c | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 74bec54..b5ffd8a 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -824,6 +824,7 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
}
}
}
+EXPORT_SYMBOL_GPL(pci_process_bridge_OF_ranges);
/* Decide whether to display the domain number in /proc */
int pci_proc_domain(struct pci_bus *bus)
diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl/vphb.c
index 3519ace..8382761 100644
--- a/drivers/misc/cxl/vphb.c
+++ b/drivers/misc/cxl/vphb.c
@@ -215,6 +215,15 @@ int cxl_pci_vphb_add(struct cxl_afu *afu)
if (!phb)
return -ENODEV;
+ /* Parse IO and memory ranges */
+ if (dev_is_pci(parent)) {
+ struct pci_dev *pdev;
+
+ pdev = to_pci_dev(parent);
+ vphb_dn = pnv_pci_get_phb_node(pdev);
+ pci_process_bridge_OF_ranges(phb, vphb_dn, false);
+ }
+
/* Setup parent in sysfs */
phb->parent = parent;
--
2.7.4
next reply other threads:[~2017-01-31 3:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 3:43 Gavin Shan [this message]
2017-02-07 8:14 ` [PATCH] drivers/misc/cxl: Avoid unnecessary error message Andrew Donnellan
2017-02-07 11:12 ` Michael Ellerman
2017-02-07 23:21 ` Gavin Shan
2017-02-07 23:39 ` Andrew Donnellan
2017-02-07 23:57 ` Gavin Shan
2017-02-08 2:41 ` Michael Ellerman
2017-02-08 2:46 ` Gavin Shan
2017-02-07 23:08 ` Gavin Shan
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=1485834216-25191-1-git-send-email-gwshan@linux.vnet.ibm.com \
--to=gwshan@linux.vnet.ibm.com \
--cc=andrew.donnellan@au1.ibm.com \
--cc=imunsie@au1.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).