Message ID | 55D38BE6.6080302@gmx.de (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
On Tue, Aug 18, 2015 at 12:47 PM, Helge Deller <deller@gmx.de> wrote: > On 18.08.2015 20:44, Meelis Roos wrote: >>> I did a bisect and commit 3a9ad0b4fdcd57f775d3615004c8c64c021a9e7d ("PCI: >>> Add pci_bus_addr_t") seems to be the culprit: >>> >>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3a9ad0b4fdcd57f775d3615004c8c64c021a9e7d >> >> CC: patch author and linux-pci. > > > I think this is the problem: > > --- a/drivers/pci/Kconfig > +++ b/drivers/pci/Kconfig > @@ -1,6 +1,10 @@ > # > # PCI configuration > # > +config PCI_BUS_ADDR_T_64BIT > + def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT) > + depends on PCI Thanks for bisecting. Then we should change to config PCI_BUS_ADDR_T_64BIT def_bool y if (ARCH_DMA_ADDR_T_64BIT || SPARC64) depends on PCI -- 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 Tue, Aug 18, 2015 at 12:47 PM, Helge Deller <deller@gmx.de> wrote: > > On 18.08.2015 20:44, Meelis Roos wrote: > >>> I did a bisect and commit 3a9ad0b4fdcd57f775d3615004c8c64c021a9e7d ("PCI: > >>> Add pci_bus_addr_t") seems to be the culprit: > >>> > >>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3a9ad0b4fdcd57f775d3615004c8c64c021a9e7d > >> > >> CC: patch author and linux-pci. > > > > > > I think this is the problem: > > > > --- a/drivers/pci/Kconfig > > +++ b/drivers/pci/Kconfig > > @@ -1,6 +1,10 @@ > > # > > # PCI configuration > > # > > +config PCI_BUS_ADDR_T_64BIT > > + def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT) > > + depends on PCI > > Thanks for bisecting. > > Then we should change to > > config PCI_BUS_ADDR_T_64BIT > def_bool y if (ARCH_DMA_ADDR_T_64BIT || SPARC64) > depends on PCI Why SPARC64? The problem happened on parisc.
On Tue, Aug 18, 2015 at 9:48 PM, Meelis Roos <mroos@linux.ee> wrote: >> On Tue, Aug 18, 2015 at 12:47 PM, Helge Deller <deller@gmx.de> wrote: >> >> Then we should change to >> >> config PCI_BUS_ADDR_T_64BIT >> def_bool y if (ARCH_DMA_ADDR_T_64BIT || SPARC64) >> depends on PCI > > Why SPARC64? The problem happened on parisc. > so will not set PCI_BUS_ADDR_T_64BIT for parisc. -- 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
> >>> I did a bisect and commit 3a9ad0b4fdcd57f775d3615004c8c64c021a9e7d ("PCI: > >>> Add pci_bus_addr_t") seems to be the culprit: > >>> > >>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3a9ad0b4fdcd57f775d3615004c8c64c021a9e7d > >> > >> CC: patch author and linux-pci. > > > > > > I think this is the problem: > > > > --- a/drivers/pci/Kconfig > > +++ b/drivers/pci/Kconfig > > @@ -1,6 +1,10 @@ > > # > > # PCI configuration > > # > > +config PCI_BUS_ADDR_T_64BIT > > + def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT) > > + depends on PCI > > Thanks for bisecting. > > Then we should change to > > config PCI_BUS_ADDR_T_64BIT > def_bool y if (ARCH_DMA_ADDR_T_64BIT || SPARC64) > depends on PCI This works for my A500.
On 2015-08-19, at 1:30 AM, Yinghai Lu wrote: > On Tue, Aug 18, 2015 at 9:48 PM, Meelis Roos <mroos@linux.ee> wrote: >>> On Tue, Aug 18, 2015 at 12:47 PM, Helge Deller <deller@gmx.de> wrote: >>> >>> Then we should change to >>> >>> config PCI_BUS_ADDR_T_64BIT >>> def_bool y if (ARCH_DMA_ADDR_T_64BIT || SPARC64) >>> depends on PCI >> >> Why SPARC64? The problem happened on parisc. >> > > so will not set PCI_BUS_ADDR_T_64BIT for parisc. I'm not sure this is optimal. While the A500 may only have 32-bit PCI, c8000 appears to have a mix of 32 and 64-bit, and rp34XX is all 64-bit. Dave -- John David Anglin dave.anglin@bell.net -- 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 2015-08-19, at 1:30 AM, Yinghai Lu wrote: > > On Tue, Aug 18, 2015 at 9:48 PM, Meelis Roos <mroos@linux.ee> wrote: > >>> On Tue, Aug 18, 2015 at 12:47 PM, Helge Deller <deller@gmx.de> wrote: > >>> > >>> Then we should change to > >>> > >>> config PCI_BUS_ADDR_T_64BIT > >>> def_bool y if (ARCH_DMA_ADDR_T_64BIT || SPARC64) > >>> depends on PCI > >> > >> Why SPARC64? The problem happened on parisc. > > so will not set PCI_BUS_ADDR_T_64BIT for parisc. I think given the current time frame it's probably the best approach to fix this problem for kernel 4.2. It reverts the behaviour back to how it was before (for all arches beside SPARC64). I'm still wondering if/why parisc is the only arch (in the sym53c8xx driver only!) which broke by this change... > I'm not sure this is optimal. While the A500 may only have 32-bit PCI, c8000 appears to have a mix > of 32 and 64-bit, and rp34XX is all 64-bit. True, but probably nobody of us noticed that we only used the 32-bit PCI interface even with 64bit kernel on parisc up to now? pci_bus_alloc_resource() in drivers/pci/bus.c just disabled (flag=0) all 64bit resources for us. But I agree, I think we need to fix drivers/parisc/lba_pci.c to correctly cope with 64bit pci addresses. In the meantime I did some more debugging on sym_iomap_device() in drivers/scsi/sym53c8xx_2/sym_glue.c: pcibios_resource_to_bus(pdev->bus, &bus_addr, &pdev->resource[i]); ram_base = bus_addr.start; with (working) 32bit PCI addresses I get: ressource = [mem 0xffffffff80002000-0xffffffff80003fff 64bit] and pcibios_resource_to_bus() returning: ram_base = 0x80002000 and with (failing) 64bit PCI addresses I get: ressource = [mem 0xfffffff004000000-0xfffffff004001fff 64bit] and pcibios_resource_to_bus() returning: ram_base = 0xfffffff004000000 It seems the resource window doesn't get initialized correctly for 64bit... Helge -- 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
--- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -1,6 +1,10 @@ # # PCI configuration # +config PCI_BUS_ADDR_T_64BIT + def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT) + depends on PCI CONFIG_PCI_BUS_ADDR_T_64BIT gets now defined on all 64bit arches. Then if CONFIG_PCI_BUS_ADDR_T_64BIT is set, in pci_bus_alloc_resource() 64bit address spaces (IORESOURCE_MEM_64) will be enabled which weren't enabled before. This trivial/temporary hack fixes the problem: --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -200,7 +200,7 @@ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, resource_size_t), void *alignf_data) { -#ifdef CONFIG_PCI_BUS_ADDR_T_64BIT +#if defined(CONFIG_PCI_BUS_ADDR_T_64BIT) && !defined(CONFIG_PARISC) int rc; if (res->flags & IORESOURCE_MEM_64) {