Thread (7 messages) 7 messages, 3 authors, 2012-03-05

Re: [PATCH v1 09/11] powerpc/PCI: replace pci_probe_only with pci_flags

flat view

From: Bjorn Helgaas <bhelgaas@google.com>
Date: 2012-02-23 18:49:32
Also in: linux-arch, linux-pci

On Wed, Feb 22, 2012 at 1:41 PM, Benjamin Herrenschmidt
[off-list ref] wrote:
On Wed, 2012-02-22 at 11:19 -0700, Bjorn Helgaas wrote:
quoted
=A0int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
diff --git a/arch/powerpc/platforms/pasemi/pci.c
b/arch/powerpc/platforms/pasemi/pci.c
index b6a0ec4..b27d886 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -231,7 +231,7 @@ void __init pas_pci_init(void)
=A0 =A0 =A0 =A0 pci_devs_phb_init();

=A0 =A0 =A0 =A0 /* Use the common resource allocation mechanism */
- =A0 =A0 =A0 pci_probe_only =3D 1;
+ =A0 =A0 =A0 pci_add_flags(PCI_PROBE_ONLY);
=A0}
Olof, do you remember why you used to set that on pasemi ?

I would have expected it to be clear, so the kernel can re-assign things
if needed. We really only want it set for pseries because of the
hypervisor being a PITA :-)
Speaking of the hypervisor, powerpc has this of_scan_bus() thing which
seems to discover PCI devices using the OF device tree rather than
using PCI config accesses.  This seems related to the "pci_probe_only"
idea.

I wonder whether it would be possible/feasible/desirable to implement
this by using config space accessors that would internally look at the
OF device tree.  Then we possibly could use the standard PCI scan bus
path.  Maybe the core could detect non-changeable BARs somehow and
mark them, e.g., with IORESOURCE_PCI_FIXED.

Just a pie-in-the sky thought for now; I have no concrete plans to do
anything like this, but it seems like it might allow more unification
if it were possible.

Bjorn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help