* [PATCH v2] powerpc/kernel: Remove error message in pcibios_setup_phb_resources()
@ 2017-02-08 3:11 Gavin Shan
2017-02-08 6:57 ` Andrew Donnellan
2017-02-19 11:33 ` [v2] " Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Gavin Shan @ 2017-02-08 3:11 UTC (permalink / raw)
To: linuxppc-dev; +Cc: andrew.donnellan, imunsie, mpe, Gavin Shan
The CAPI driver creates virtual PHB (vPHB) from the CAPI adapter.
The vPHB's IO and memory windows aren't built from device-tree node
as we do for normal PHBs. A error message is thrown in below path
when trying to probe AFUs contained in the adapter. The error message
is confusing and unnecessary.
cxl_probe()
pci_init_afu()
cxl_pci_vphb_add()
pcibios_scan_phb()
pcibios_setup_phb_resources()
This removes the error message. We might have the case where the
first memory window on real PHB isn't populated properly because
of error in "ranges" property in the device-tree node. We can check
the device-tree instead for that. This also removes one unnecessary
blank line in the function.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
v2: Removes the error message instead of avoiding it
---
arch/powerpc/kernel/pci-common.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 74bec54..05bfdae 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1559,16 +1559,10 @@ static void pcibios_setup_phb_resources(struct pci_controller *hose,
/* Hookup PHB Memory resources */
for (i = 0; i < 3; ++i) {
res = &hose->mem_resources[i];
- if (!res->flags) {
- if (i == 0)
- printk(KERN_ERR "PCI: Memory resource 0 not set for "
- "host bridge %s (domain %d)\n",
- hose->dn->full_name, hose->global_number);
+ if (!res->flags)
continue;
- }
- offset = hose->mem_offset[i];
-
+ offset = hose->mem_offset[i];
pr_debug("PCI: PHB MEM resource %d = %pR off 0x%08llx\n", i,
res, (unsigned long long)offset);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] powerpc/kernel: Remove error message in pcibios_setup_phb_resources()
2017-02-08 3:11 [PATCH v2] powerpc/kernel: Remove error message in pcibios_setup_phb_resources() Gavin Shan
@ 2017-02-08 6:57 ` Andrew Donnellan
2017-02-19 11:33 ` [v2] " Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Donnellan @ 2017-02-08 6:57 UTC (permalink / raw)
To: Gavin Shan, linuxppc-dev; +Cc: imunsie, mpe
On 08/02/17 14:11, Gavin Shan wrote:
> The CAPI driver creates virtual PHB (vPHB) from the CAPI adapter.
> The vPHB's IO and memory windows aren't built from device-tree node
> as we do for normal PHBs. A error message is thrown in below path
> when trying to probe AFUs contained in the adapter. The error message
> is confusing and unnecessary.
>
> cxl_probe()
> pci_init_afu()
> cxl_pci_vphb_add()
> pcibios_scan_phb()
> pcibios_setup_phb_resources()
>
> This removes the error message. We might have the case where the
> first memory window on real PHB isn't populated properly because
> of error in "ranges" property in the device-tree node. We can check
> the device-tree instead for that. This also removes one unnecessary
> blank line in the function.
>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> ---
> v2: Removes the error message instead of avoiding it
> ---
> arch/powerpc/kernel/pci-common.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
> index 74bec54..05bfdae 100644
> --- a/arch/powerpc/kernel/pci-common.c
> +++ b/arch/powerpc/kernel/pci-common.c
> @@ -1559,16 +1559,10 @@ static void pcibios_setup_phb_resources(struct pci_controller *hose,
> /* Hookup PHB Memory resources */
> for (i = 0; i < 3; ++i) {
> res = &hose->mem_resources[i];
> - if (!res->flags) {
> - if (i == 0)
> - printk(KERN_ERR "PCI: Memory resource 0 not set for "
> - "host bridge %s (domain %d)\n",
> - hose->dn->full_name, hose->global_number);
> + if (!res->flags)
> continue;
> - }
> - offset = hose->mem_offset[i];
> -
>
> + offset = hose->mem_offset[i];
> pr_debug("PCI: PHB MEM resource %d = %pR off 0x%08llx\n", i,
> res, (unsigned long long)offset);
>
>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v2] powerpc/kernel: Remove error message in pcibios_setup_phb_resources()
2017-02-08 3:11 [PATCH v2] powerpc/kernel: Remove error message in pcibios_setup_phb_resources() Gavin Shan
2017-02-08 6:57 ` Andrew Donnellan
@ 2017-02-19 11:33 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2017-02-19 11:33 UTC (permalink / raw)
To: Gavin Shan, linuxppc-dev; +Cc: imunsie, andrew.donnellan, Gavin Shan
On Wed, 2017-02-08 at 03:11:03 UTC, Gavin Shan wrote:
> The CAPI driver creates virtual PHB (vPHB) from the CAPI adapter.
> The vPHB's IO and memory windows aren't built from device-tree node
> as we do for normal PHBs. A error message is thrown in below path
> when trying to probe AFUs contained in the adapter. The error message
> is confusing and unnecessary.
>
> cxl_probe()
> pci_init_afu()
> cxl_pci_vphb_add()
> pcibios_scan_phb()
> pcibios_setup_phb_resources()
>
> This removes the error message. We might have the case where the
> first memory window on real PHB isn't populated properly because
> of error in "ranges" property in the device-tree node. We can check
> the device-tree instead for that. This also removes one unnecessary
> blank line in the function.
>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/727597d12140b342a3deef10348b5e
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-19 11:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 3:11 [PATCH v2] powerpc/kernel: Remove error message in pcibios_setup_phb_resources() Gavin Shan
2017-02-08 6:57 ` Andrew Donnellan
2017-02-19 11:33 ` [v2] " Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.