* [PATCH] Hide resources on Axon PCIE root complex nodes
@ 2008-03-19 6:10 Michael Ellerman
2008-03-19 6:19 ` Benjamin Herrenschmidt
2008-03-19 21:59 ` Paul Mackerras
0 siblings, 2 replies; 3+ messages in thread
From: Michael Ellerman @ 2008-03-19 6:10 UTC (permalink / raw)
To: linuxppc-dev
The PCI bridge representing the PCIE root complex on Axon, contains device
BARs for a memory range and ROM that define inbound accesses. This confuses
the kernel resource management code, the resources need to be hidden when
Axon is a host bridge.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/cell/setup.c | 36 +++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index dda3465..5c531e8 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -81,6 +81,42 @@ static void cell_progress(char *s, unsigned short hex)
printk("*** %04x : %s\n", hex, s ? s : "");
}
+static void cell_fixup_pcie_rootcomplex(struct pci_dev *dev)
+{
+ struct pci_controller *hose;
+ const char *s;
+ int i;
+
+ if (!machine_is(cell))
+ return;
+
+ /* We're searching for a direct child of the PHB */
+ if (dev->bus->self != NULL || dev->devfn != 0)
+ return;
+
+ hose = pci_bus_to_host(dev->bus);
+ if (hose == NULL)
+ return;
+
+ /* Only on PCIE */
+ if (!of_device_is_compatible(hose->dn, "pciex"))
+ return;
+
+ /* And only on axon */
+ s = of_get_property(hose->dn, "model", NULL);
+ if (!s || strcmp(s, "Axon") != 0)
+ return;
+
+ for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) {
+ dev->resource[i].start = dev->resource[i].end = 0;
+ dev->resource[i].flags = 0;
+ }
+
+ printk(KERN_DEBUG "PCI: Hiding resources on Axon PCIE RC %s\n",
+ pci_name(dev));
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex);
+
static int __init cell_publish_devices(void)
{
int node;
--
1.5.2.rc1.1884.g59b20
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Hide resources on Axon PCIE root complex nodes
2008-03-19 6:10 [PATCH] Hide resources on Axon PCIE root complex nodes Michael Ellerman
@ 2008-03-19 6:19 ` Benjamin Herrenschmidt
2008-03-19 21:59 ` Paul Mackerras
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2008-03-19 6:19 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
On Wed, 2008-03-19 at 17:10 +1100, Michael Ellerman wrote:
> The PCI bridge representing the PCIE root complex on Axon, contains device
> BARs for a memory range and ROM that define inbound accesses. This confuses
> the kernel resource management code, the resources need to be hidden when
> Axon is a host bridge.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Hide resources on Axon PCIE root complex nodes
2008-03-19 6:10 [PATCH] Hide resources on Axon PCIE root complex nodes Michael Ellerman
2008-03-19 6:19 ` Benjamin Herrenschmidt
@ 2008-03-19 21:59 ` Paul Mackerras
1 sibling, 0 replies; 3+ messages in thread
From: Paul Mackerras @ 2008-03-19 21:59 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
Michael Ellerman writes:
> The PCI bridge representing the PCIE root complex on Axon, contains device
> BARs for a memory range and ROM that define inbound accesses. This confuses
> the kernel resource management code, the resources need to be hidden when
> Axon is a host bridge.
Since you didn't say, I assume this isn't needed for 2.6.25... right?
(Please, everybody, if you want a patch in 2.6.25, put something in the
subject line to indicate that, such as a [2.6.25] tag.)
Paul.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-19 21:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 6:10 [PATCH] Hide resources on Axon PCIE root complex nodes Michael Ellerman
2008-03-19 6:19 ` Benjamin Herrenschmidt
2008-03-19 21:59 ` Paul Mackerras
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).