Message ID | 20120626033218.16434.50584.stgit@amt.stowe |
---|---|
State | Accepted |
Headers | show |
On 6/25/2012 11:32 PM, Myron Stowe wrote: > The PCI core provides a generic (__weak) 'pcibios_setup()' routine > that can be used by all architectures as a default. Drop tile's > architecture specific version in favor of that as it does not need to be > over-ridden. > > Signed-off-by: Myron Stowe <myron.stowe@redhat.com> > --- > > arch/tile/kernel/pci.c | 10 ---------- > 1 files changed, 0 insertions(+), 10 deletions(-) Acked-by: Chris Metcalf <cmetcalf@tilera.com> In our internal tree we have x86-like support for "pci=off" here. When I push that I can just push it as a new function to override the removed one, so I'm happy with your change as proposed. But perhaps it would make sense to move the support for "pci=off" to common code, since multiple architectures handle this the same way?
On Tue, 2012-06-26 at 09:18 -0400, Chris Metcalf wrote: > On 6/25/2012 11:32 PM, Myron Stowe wrote: > > The PCI core provides a generic (__weak) 'pcibios_setup()' routine > > that can be used by all architectures as a default. Drop tile's > > architecture specific version in favor of that as it does not need to be > > over-ridden. > > > > Signed-off-by: Myron Stowe <myron.stowe@redhat.com> > > --- > > > > arch/tile/kernel/pci.c | 10 ---------- > > 1 files changed, 0 insertions(+), 10 deletions(-) > > Acked-by: Chris Metcalf <cmetcalf@tilera.com> > > In our internal tree we have x86-like support for "pci=off" here. When I > push that I can just push it as a new function to override the removed one, > so I'm happy with your change as proposed. Yes, that should be fine. Just an FYI - when you introduce the over-ride, I believe that it should be __init and not __devinit as the previous tile version of 'pcibios_setup()' was. > But perhaps it would make sense > to move the support for "pci=off" to common code, since multiple > architectures handle this the same way? Looking at the tree I only see three of the architectures currently using/implementing "pci=off" (four with the 'tile' addition). Perhaps there is a way to avoid such but it seems like adding this to the core would require introducing the global variable 'pci_probe' which seems like unnecessary pollution? Myron -- 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 6/28/2012 1:30 PM, Myron Stowe wrote: > On Tue, 2012-06-26 at 09:18 -0400, Chris Metcalf wrote: >> On 6/25/2012 11:32 PM, Myron Stowe wrote: >>> The PCI core provides a generic (__weak) 'pcibios_setup()' routine >>> that can be used by all architectures as a default. Drop tile's >>> architecture specific version in favor of that as it does not need to be >>> over-ridden. >>> >>> Signed-off-by: Myron Stowe <myron.stowe@redhat.com> >>> --- >>> >>> arch/tile/kernel/pci.c | 10 ---------- >>> 1 files changed, 0 insertions(+), 10 deletions(-) >> [...] >> In our internal tree we have x86-like support for "pci=off" here. [...] >> But perhaps it would make sense >> to move the support for "pci=off" to common code, since multiple >> architectures handle this the same way? > Looking at the tree I only see three of the architectures currently > using/implementing "pci=off" (four with the 'tile' addition). Perhaps > there is a way to avoid such but it seems like adding this to the core > would require introducing the global variable 'pci_probe' which seems > like unnecessary pollution? I'd argue that the core might expose a pci_probing_disabled() function that returns whether "pci=off" was seen, and modify the other architectures that already support pci_probe to call that function instead. It's true that x86 has a much more elaborate use of pci_probe than the other architectures, which means x86 would probably want to keep the variable as-is and just call pci_probing_disabled() to set pci_probe to zero and return. All that said, I'm not volunteering to make this change, so if it doesn't seem right to you, I certainly won't insist. :-)
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index b56d12b..e257226 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c @@ -401,16 +401,6 @@ void pcibios_set_master(struct pci_dev *dev) } /* - * This can be called from the generic PCI layer, but doesn't need to - * do anything. - */ -char __devinit *pcibios_setup(char *str) -{ - /* Nothing needs to be done. */ - return str; -} - -/* * This is called from the generic Linux layer. */ void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
The PCI core provides a generic (__weak) 'pcibios_setup()' routine that can be used by all architectures as a default. Drop tile's architecture specific version in favor of that as it does not need to be over-ridden. Signed-off-by: Myron Stowe <myron.stowe@redhat.com> --- arch/tile/kernel/pci.c | 10 ---------- 1 files changed, 0 insertions(+), 10 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