* [PATCH 0/2] Remove pcibios_last_bus stuff @ 2013-10-23 3:23 Bjorn Helgaas 2013-10-23 3:24 ` [PATCH 1/2] frv/PCI: Remove pcibios_last_bus Bjorn Helgaas 2013-10-23 3:24 ` [PATCH 2/2] mn10300/PCI: Remove useless pcibios_last_bus Bjorn Helgaas 0 siblings, 2 replies; 5+ messages in thread From: Bjorn Helgaas @ 2013-10-23 3:23 UTC (permalink / raw) To: David Howells, Koichi Yasutake; +Cc: linux-pci, linux-am33-list, linux-kernel pcibios_last_bus is an x86 thing that has gotten copied into mn10300 and FR-V. On mn10300, it is clearly useless because it is set but never tested. On FR-V, I suspect it is also useless, but it is possible that people boot with "pci=lastbus=<X>". Please speak up if you think it should be kept for FR-V. --- Bjorn Helgaas (2): frv/PCI: Remove pcibios_last_bus mn10300/PCI: Remove useless pcibios_last_bus arch/frv/mb93090-mb00/pci-frv.h | 1 - arch/frv/mb93090-mb00/pci-vdk.c | 36 ------------------------------- arch/mn10300/unit-asb2305/pci-asb2305.h | 1 - arch/mn10300/unit-asb2305/pci.c | 5 ---- 4 files changed, 43 deletions(-) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] frv/PCI: Remove pcibios_last_bus 2013-10-23 3:23 [PATCH 0/2] Remove pcibios_last_bus stuff Bjorn Helgaas @ 2013-10-23 3:24 ` Bjorn Helgaas 2013-10-29 22:46 ` Bjorn Helgaas 2013-10-23 3:24 ` [PATCH 2/2] mn10300/PCI: Remove useless pcibios_last_bus Bjorn Helgaas 1 sibling, 1 reply; 5+ messages in thread From: Bjorn Helgaas @ 2013-10-23 3:24 UTC (permalink / raw) To: David Howells, Koichi Yasutake; +Cc: linux-pci, linux-am33-list, linux-kernel pcibios_last_bus was apparently copied from x86. On FR-V, it is statically initialized to -1 and never changed unless the user boots with "pci=lastbus=<X>". I doubt that option is used on FR-V, so this patch removes all the code related to pcibios_last_bus. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> --- arch/frv/mb93090-mb00/pci-frv.h | 1 - arch/frv/mb93090-mb00/pci-vdk.c | 36 ------------------------------------ 2 files changed, 37 deletions(-) diff --git a/arch/frv/mb93090-mb00/pci-frv.h b/arch/frv/mb93090-mb00/pci-frv.h index 76c4e73..a7e487fe 100644 --- a/arch/frv/mb93090-mb00/pci-frv.h +++ b/arch/frv/mb93090-mb00/pci-frv.h @@ -30,7 +30,6 @@ void pcibios_resource_survey(void); /* pci-vdk.c */ -extern int __nongpreldata pcibios_last_bus; extern struct pci_ops *__nongpreldata pci_root_ops; /* pci-irq.c */ diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index deb6784..efa5d65 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c @@ -25,7 +25,6 @@ unsigned int __nongpreldata pci_probe = 1; -int __nongpreldata pcibios_last_bus = -1; struct pci_ops *__nongpreldata pci_root_ops; /* @@ -220,37 +219,6 @@ static struct pci_ops * __init pci_check_direct(void) } /* - * Discover remaining PCI buses in case there are peer host bridges. - * We use the number of last PCI bus provided by the PCI BIOS. - */ -static void __init pcibios_fixup_peer_bridges(void) -{ - struct pci_bus bus; - struct pci_dev dev; - int n; - u16 l; - - if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff) - return; - printk("PCI: Peer bridge fixup\n"); - for (n=0; n <= pcibios_last_bus; n++) { - if (pci_find_bus(0, n)) - continue; - bus.number = n; - bus.ops = pci_root_ops; - dev.bus = &bus; - for(dev.devfn=0; dev.devfn<256; dev.devfn += 8) - if (!pci_read_config_word(&dev, PCI_VENDOR_ID, &l) && - l != 0x0000 && l != 0xffff) { - printk("Found device at %02x:%02x [%04x]\n", n, dev.devfn, l); - printk("PCI: Discovered peer bus %02x\n", n); - pci_scan_bus(n, pci_root_ops, NULL); - break; - } - } -} - -/* * Exceptions for specific devices. Usually work-arounds for fatal design flaws. */ @@ -418,7 +386,6 @@ int __init pcibios_init(void) pci_scan_root_bus(NULL, 0, pci_root_ops, NULL, &resources); pcibios_irq_init(); - pcibios_fixup_peer_bridges(); pcibios_fixup_irqs(); pcibios_resource_survey(); @@ -432,9 +399,6 @@ char * __init pcibios_setup(char *str) if (!strcmp(str, "off")) { pci_probe = 0; return NULL; - } else if (!strncmp(str, "lastbus=", 8)) { - pcibios_last_bus = simple_strtol(str+8, NULL, 0); - return NULL; } return str; } ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] frv/PCI: Remove pcibios_last_bus 2013-10-23 3:24 ` [PATCH 1/2] frv/PCI: Remove pcibios_last_bus Bjorn Helgaas @ 2013-10-29 22:46 ` Bjorn Helgaas 0 siblings, 0 replies; 5+ messages in thread From: Bjorn Helgaas @ 2013-10-29 22:46 UTC (permalink / raw) To: David Howells, Koichi Yasutake; +Cc: linux-pci, linux-am33-list, linux-kernel On Tue, Oct 22, 2013 at 9:24 PM, Bjorn Helgaas <bhelgaas@google.com> wrote: > pcibios_last_bus was apparently copied from x86. On FR-V, it is > statically initialized to -1 and never changed unless the user boots > with "pci=lastbus=<X>". I doubt that option is used on FR-V, so this > patch removes all the code related to pcibios_last_bus. > > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Applied to my pci/misc branch for v3.13. Let me know if anybody objects. > --- > arch/frv/mb93090-mb00/pci-frv.h | 1 - > arch/frv/mb93090-mb00/pci-vdk.c | 36 ------------------------------------ > 2 files changed, 37 deletions(-) > > diff --git a/arch/frv/mb93090-mb00/pci-frv.h b/arch/frv/mb93090-mb00/pci-frv.h > index 76c4e73..a7e487fe 100644 > --- a/arch/frv/mb93090-mb00/pci-frv.h > +++ b/arch/frv/mb93090-mb00/pci-frv.h > @@ -30,7 +30,6 @@ void pcibios_resource_survey(void); > > /* pci-vdk.c */ > > -extern int __nongpreldata pcibios_last_bus; > extern struct pci_ops *__nongpreldata pci_root_ops; > > /* pci-irq.c */ > diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c > index deb6784..efa5d65 100644 > --- a/arch/frv/mb93090-mb00/pci-vdk.c > +++ b/arch/frv/mb93090-mb00/pci-vdk.c > @@ -25,7 +25,6 @@ > > unsigned int __nongpreldata pci_probe = 1; > > -int __nongpreldata pcibios_last_bus = -1; > struct pci_ops *__nongpreldata pci_root_ops; > > /* > @@ -220,37 +219,6 @@ static struct pci_ops * __init pci_check_direct(void) > } > > /* > - * Discover remaining PCI buses in case there are peer host bridges. > - * We use the number of last PCI bus provided by the PCI BIOS. > - */ > -static void __init pcibios_fixup_peer_bridges(void) > -{ > - struct pci_bus bus; > - struct pci_dev dev; > - int n; > - u16 l; > - > - if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff) > - return; > - printk("PCI: Peer bridge fixup\n"); > - for (n=0; n <= pcibios_last_bus; n++) { > - if (pci_find_bus(0, n)) > - continue; > - bus.number = n; > - bus.ops = pci_root_ops; > - dev.bus = &bus; > - for(dev.devfn=0; dev.devfn<256; dev.devfn += 8) > - if (!pci_read_config_word(&dev, PCI_VENDOR_ID, &l) && > - l != 0x0000 && l != 0xffff) { > - printk("Found device at %02x:%02x [%04x]\n", n, dev.devfn, l); > - printk("PCI: Discovered peer bus %02x\n", n); > - pci_scan_bus(n, pci_root_ops, NULL); > - break; > - } > - } > -} > - > -/* > * Exceptions for specific devices. Usually work-arounds for fatal design flaws. > */ > > @@ -418,7 +386,6 @@ int __init pcibios_init(void) > pci_scan_root_bus(NULL, 0, pci_root_ops, NULL, &resources); > > pcibios_irq_init(); > - pcibios_fixup_peer_bridges(); > pcibios_fixup_irqs(); > pcibios_resource_survey(); > > @@ -432,9 +399,6 @@ char * __init pcibios_setup(char *str) > if (!strcmp(str, "off")) { > pci_probe = 0; > return NULL; > - } else if (!strncmp(str, "lastbus=", 8)) { > - pcibios_last_bus = simple_strtol(str+8, NULL, 0); > - return NULL; > } > return str; > } > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] mn10300/PCI: Remove useless pcibios_last_bus 2013-10-23 3:23 [PATCH 0/2] Remove pcibios_last_bus stuff Bjorn Helgaas 2013-10-23 3:24 ` [PATCH 1/2] frv/PCI: Remove pcibios_last_bus Bjorn Helgaas @ 2013-10-23 3:24 ` Bjorn Helgaas 2013-10-29 22:47 ` Bjorn Helgaas 1 sibling, 1 reply; 5+ messages in thread From: Bjorn Helgaas @ 2013-10-23 3:24 UTC (permalink / raw) To: David Howells, Koichi Yasutake; +Cc: linux-pci, linux-am33-list, linux-kernel pcibios_last_bus was apparently copied from x86. On mn10300, it is statically initialized to -1 and may be set with the "pci=lastbus=<X>" boot option, but it is never tested. This patch removes everything related to pcibios_last_bus. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> --- arch/mn10300/unit-asb2305/pci-asb2305.h | 1 - arch/mn10300/unit-asb2305/pci.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.h b/arch/mn10300/unit-asb2305/pci-asb2305.h index 7fa66a0..9e17aca 100644 --- a/arch/mn10300/unit-asb2305/pci-asb2305.h +++ b/arch/mn10300/unit-asb2305/pci-asb2305.h @@ -35,7 +35,6 @@ extern void pcibios_resource_survey(void); /* pci.c */ -extern int pcibios_last_bus; extern struct pci_ops *pci_root_ops; extern struct irq_routing_table *pcibios_get_irq_routing_table(void); diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c index e37fac0..6b4339f 100644 --- a/arch/mn10300/unit-asb2305/pci.c +++ b/arch/mn10300/unit-asb2305/pci.c @@ -24,7 +24,6 @@ unsigned int pci_probe = 1; -int pcibios_last_bus = -1; struct pci_ops *pci_root_ops; /* @@ -392,10 +391,6 @@ char *__init pcibios_setup(char *str) if (!strcmp(str, "off")) { pci_probe = 0; return NULL; - - } else if (!strncmp(str, "lastbus=", 8)) { - pcibios_last_bus = simple_strtol(str+8, NULL, 0); - return NULL; } return str; ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] mn10300/PCI: Remove useless pcibios_last_bus 2013-10-23 3:24 ` [PATCH 2/2] mn10300/PCI: Remove useless pcibios_last_bus Bjorn Helgaas @ 2013-10-29 22:47 ` Bjorn Helgaas 0 siblings, 0 replies; 5+ messages in thread From: Bjorn Helgaas @ 2013-10-29 22:47 UTC (permalink / raw) To: David Howells, Koichi Yasutake; +Cc: linux-pci, linux-am33-list, linux-kernel On Tue, Oct 22, 2013 at 9:24 PM, Bjorn Helgaas <bhelgaas@google.com> wrote: > pcibios_last_bus was apparently copied from x86. On mn10300, it is > statically initialized to -1 and may be set with the "pci=lastbus=<X>" > boot option, but it is never tested. This patch removes everything > related to pcibios_last_bus. > > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Applied to my pci/misc branch for v3.13. Let me know if anybody objects. > --- > arch/mn10300/unit-asb2305/pci-asb2305.h | 1 - > arch/mn10300/unit-asb2305/pci.c | 5 ----- > 2 files changed, 6 deletions(-) > > diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.h b/arch/mn10300/unit-asb2305/pci-asb2305.h > index 7fa66a0..9e17aca 100644 > --- a/arch/mn10300/unit-asb2305/pci-asb2305.h > +++ b/arch/mn10300/unit-asb2305/pci-asb2305.h > @@ -35,7 +35,6 @@ extern void pcibios_resource_survey(void); > > /* pci.c */ > > -extern int pcibios_last_bus; > extern struct pci_ops *pci_root_ops; > > extern struct irq_routing_table *pcibios_get_irq_routing_table(void); > diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c > index e37fac0..6b4339f 100644 > --- a/arch/mn10300/unit-asb2305/pci.c > +++ b/arch/mn10300/unit-asb2305/pci.c > @@ -24,7 +24,6 @@ > > unsigned int pci_probe = 1; > > -int pcibios_last_bus = -1; > struct pci_ops *pci_root_ops; > > /* > @@ -392,10 +391,6 @@ char *__init pcibios_setup(char *str) > if (!strcmp(str, "off")) { > pci_probe = 0; > return NULL; > - > - } else if (!strncmp(str, "lastbus=", 8)) { > - pcibios_last_bus = simple_strtol(str+8, NULL, 0); > - return NULL; > } > > return str; > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-29 22:47 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-10-23 3:23 [PATCH 0/2] Remove pcibios_last_bus stuff Bjorn Helgaas 2013-10-23 3:24 ` [PATCH 1/2] frv/PCI: Remove pcibios_last_bus Bjorn Helgaas 2013-10-29 22:46 ` Bjorn Helgaas 2013-10-23 3:24 ` [PATCH 2/2] mn10300/PCI: Remove useless pcibios_last_bus Bjorn Helgaas 2013-10-29 22:47 ` Bjorn Helgaas
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).