Message ID | 49E7FF48.1060509@kernel.org (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
* Yinghai Lu <yinghai@kernel.org> wrote: > > Impact: cleanup > > it will be assigned late pci_scan_child_bus/pcibios_fixup_bus > > Signed-off-by: Yinghai Lu <yinghai@kernel.org> > > --- > drivers/pci/probe.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > Index: linux-2.6/drivers/pci/probe.c > =================================================================== > --- linux-2.6.orig/drivers/pci/probe.c > +++ linux-2.6/drivers/pci/probe.c > @@ -1177,8 +1177,12 @@ struct pci_bus * pci_create_bus(struct d > pci_create_legacy_files(b); > > b->number = b->secondary = bus; > - b->resource[0] = &ioport_resource; > - b->resource[1] = &iomem_resource; > + > + /* don't need assign those for non root buses */ > + if (!parent) { > + b->resource[0] = &ioport_resource; > + b->resource[1] = &iomem_resource; > + } whitespace damage? Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Apr 16, 2009 at 09:02:16PM -0700, Yinghai Lu wrote: > Impact: cleanup > > it will be assigned late pci_scan_child_bus/pcibios_fixup_bus Seems to me they're assigned in pci_alloc_child_bus(), not in pci_scan_child_bus(). Also, pcibios_fixup_bus may adjust them, but it doesn't assign them. This is all moot as: > b->number = b->secondary = bus; > - b->resource[0] = &ioport_resource; > - b->resource[1] = &iomem_resource; > + > + /* don't need assign those for non root buses */ > + if (!parent) { > + b->resource[0] = &ioport_resource; > + b->resource[1] = &iomem_resource; > + } > parent != NULL does *NOT* mean non-root bus. Get your head out of x86 and realise we have architectures which have pci root busses which have parents.
Matthew Wilcox wrote: > On Thu, Apr 16, 2009 at 09:02:16PM -0700, Yinghai Lu wrote: >> Impact: cleanup >> >> it will be assigned late pci_scan_child_bus/pcibios_fixup_bus > > Seems to me they're assigned in pci_alloc_child_bus(), not in > pci_scan_child_bus(). Also, pcibios_fixup_bus may adjust them, but it > doesn't assign them. right. > This is all moot as: > >> b->number = b->secondary = bus; >> - b->resource[0] = &ioport_resource; >> - b->resource[1] = &iomem_resource; >> + >> + /* don't need assign those for non root buses */ >> + if (!parent) { >> + b->resource[0] = &ioport_resource; >> + b->resource[1] = &iomem_resource; >> + } >> > > parent != NULL does *NOT* mean non-root bus. Get your head out of > x86 and realise we have architectures which have pci root busses which > have parents. > interesting. how does lspci -tv look like ? YH -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Index: linux-2.6/drivers/pci/probe.c =================================================================== --- linux-2.6.orig/drivers/pci/probe.c +++ linux-2.6/drivers/pci/probe.c @@ -1177,8 +1177,12 @@ struct pci_bus * pci_create_bus(struct d pci_create_legacy_files(b); b->number = b->secondary = bus; - b->resource[0] = &ioport_resource; - b->resource[1] = &iomem_resource; + + /* don't need assign those for non root buses */ + if (!parent) { + b->resource[0] = &ioport_resource; + b->resource[1] = &iomem_resource; + } return b;
Impact: cleanup it will be assigned late pci_scan_child_bus/pcibios_fixup_bus Signed-off-by: Yinghai Lu <yinghai@kernel.org> --- drivers/pci/probe.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html