* [PATCH] powerpc/powernv: Fix M64 resource name in /proc/iomem
@ 2015-10-22 1:03 Gavin Shan
2015-12-17 11:57 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Gavin Shan @ 2015-10-22 1:03 UTC (permalink / raw)
To: linuxppc-dev; +Cc: mpe, Gavin Shan
The name of PCI root bus's M64 resource isn't initialized properly.
When dumping "/proc/iomem", "<BAD>" is seen for those M64 resources
on PCI root buses.
~# cat /proc/iomem | grep -e "BAD"
3b0000000000-3b0fefffffff : <BAD>
3b1000000000-3b1fefffffff : <BAD>
3c0000000000-3c0fefffffff : <BAD>
3c1000000000-3c1fefffffff : <BAD>
3c2000000000-3c2fefffffff : <BAD>
This fixes the issue by setting the name of PCI root bus's M64
resource to that of PHB's device node full name. With the patch,
no "<BAD>" is seen from "/proc/iomem".
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/pci-ioda.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 414fd1a..3b726aa 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -357,6 +357,7 @@ static void __init pnv_ioda_parse_m64_window(struct pnv_phb *phb)
}
res = &hose->mem_resources[1];
+ res->name = dn->full_name;
res->start = of_translate_address(dn, r + 2);
res->end = res->start + of_read_number(r + 4, 2) - 1;
res->flags = (IORESOURCE_MEM | IORESOURCE_MEM_64 | IORESOURCE_PREFETCH);
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/powernv: Fix M64 resource name in /proc/iomem
2015-10-22 1:03 [PATCH] powerpc/powernv: Fix M64 resource name in /proc/iomem Gavin Shan
@ 2015-12-17 11:57 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2015-12-17 11:57 UTC (permalink / raw)
To: Gavin Shan, linuxppc-dev; +Cc: Gavin Shan
On Thu, 2015-22-10 at 01:03:08 UTC, Gavin Shan wrote:
> The name of PCI root bus's M64 resource isn't initialized properly.
> When dumping "/proc/iomem", "<BAD>" is seen for those M64 resources
> on PCI root buses.
>
> ~# cat /proc/iomem | grep -e "BAD"
> 3b0000000000-3b0fefffffff : <BAD>
> 3b1000000000-3b1fefffffff : <BAD>
> 3c0000000000-3c0fefffffff : <BAD>
> 3c1000000000-3c1fefffffff : <BAD>
> 3c2000000000-3c2fefffffff : <BAD>
>
> This fixes the issue by setting the name of PCI root bus's M64
> resource to that of PHB's device node full name. With the patch,
> no "<BAD>" is seen from "/proc/iomem".
>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/e80c4e7ca5aed7d2fa766191bc
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-17 11:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-22 1:03 [PATCH] powerpc/powernv: Fix M64 resource name in /proc/iomem Gavin Shan
2015-12-17 11:57 ` Michael Ellerman
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).