From mboxrd@z Thu Jan 1 00:00:00 1970 From: Helge Deller Subject: Re: A500 boot crash in 4.2.0-rc3-00246-g763e326 Date: Thu, 20 Aug 2015 08:53:11 +0200 Message-ID: <55D57957.8020708@gmx.de> References: <55D38BE6.6080302@gmx.de> <20150820054234.GA10267@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Cc: John David Anglin , Yinghai Lu , Meelis Roos , linux-parisc@vger.kernel.org, "linux-pci@vger.kernel.org" , "sparclinux@vger.kernel.org" , James Bottomley To: Bjorn Helgaas Return-path: In-Reply-To: <20150820054234.GA10267@google.com> List-ID: List-Id: linux-parisc.vger.kernel.org On 20.08.2015 07:42, Bjorn Helgaas wrote: > On Wed, Aug 19, 2015 at 04:06:38PM +0200, Helge Deller wrote: >>> On 2015-08-19, at 1:30 AM, Yinghai Lu wrote: >>>> On Tue, Aug 18, 2015 at 9:48 PM, Meelis Roos wrote: >>>>>> On Tue, Aug 18, 2015 at 12:47 PM, Helge Deller 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. > > I doubt we can fix the underlying issue before v4.2, Agreed. > but I'd at least like to avoid it. I applied the patch below to > for-linus. > > Yinghai proposed this: > >>>>>> def_bool y if (ARCH_DMA_ADDR_T_64BIT || SPARC64) > > I did this instead: > > + def_bool y if (ARCH_DMA_ADDR_T_64BIT || (64BIT && !PARISC)) > > because (a) Yinghai's proposal suggests this change is related to > SPARC64, which is misleading, and (b) I want to keep 64-bit bus > addresses for all 64-bit kernels *except* PA-RISC. Ok. > I didn't mark it as Tested-by Meelis because I think he tested > Yinghai's proposal. But I can add that back, given confirmation. > > > commit 51a660a2732c > Author: Bjorn Helgaas > Date: Thu Aug 20 00:08:15 2015 -0500 > > PCI: Don't use 64-bit bus addresses on PA-RISC > > Meelis and Helge reported that 3a9ad0b4fdcd ("PCI: Add pci_bus_addr_t") > caused HPMCs on A500 and hangs on rp5470. > > PA-RISC does not set ARCH_DMA_ADDR_T_64BIT, even for 64-bit kernels, so > prior to 3a9ad0b4fdcd, we always used 32-bit PCI addresses. After > 3a9ad0b4fdcd, we do use 64-bit PCI addresses in 64-bit kernels, and > apparently there's some PA-RISC problem related to them. > > Fixes: 3a9ad0b4fdcd ("PCI: Add pci_bus_addr_t") > Link: http://lkml.kernel.org/r/alpine.LRH.2.11.1507260929000.30065@math.ut.ee > Reported-by: Meelis Roos > Reported-by: Helge Deller > Based-on-idea-by: Yinghai Lu > Signed-off-by: Bjorn Helgaas Looks OK. I will test later today. Can you please add CC: stable@vger.kernel.org # v3.19+ since commit 3a9ad0b4fdcd had that too and now all kernels down to 3.19+ are broken on parisc... Thanks! Helge > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig > index 73de4ef..944f500 100644 > --- a/drivers/pci/Kconfig > +++ b/drivers/pci/Kconfig > @@ -2,7 +2,7 @@ > # PCI configuration > # > config PCI_BUS_ADDR_T_64BIT > - def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT) > + def_bool y if (ARCH_DMA_ADDR_T_64BIT || (64BIT && !PARISC)) > depends on PCI > > config PCI_MSI From mboxrd@z Thu Jan 1 00:00:00 1970 From: Helge Deller Date: Thu, 20 Aug 2015 06:53:11 +0000 Subject: Re: A500 boot crash in 4.2.0-rc3-00246-g763e326 Message-Id: <55D57957.8020708@gmx.de> List-Id: References: <55D38BE6.6080302@gmx.de> <20150820054234.GA10267@google.com> In-Reply-To: <20150820054234.GA10267@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bjorn Helgaas Cc: John David Anglin , Yinghai Lu , Meelis Roos , linux-parisc@vger.kernel.org, "linux-pci@vger.kernel.org" , "sparclinux@vger.kernel.org" , James Bottomley On 20.08.2015 07:42, Bjorn Helgaas wrote: > On Wed, Aug 19, 2015 at 04:06:38PM +0200, Helge Deller wrote: >>> On 2015-08-19, at 1:30 AM, Yinghai Lu wrote: >>>> On Tue, Aug 18, 2015 at 9:48 PM, Meelis Roos wrote: >>>>>> On Tue, Aug 18, 2015 at 12:47 PM, Helge Deller 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. > > I doubt we can fix the underlying issue before v4.2, Agreed. > but I'd at least like to avoid it. I applied the patch below to > for-linus. > > Yinghai proposed this: > >>>>>> def_bool y if (ARCH_DMA_ADDR_T_64BIT || SPARC64) > > I did this instead: > > + def_bool y if (ARCH_DMA_ADDR_T_64BIT || (64BIT && !PARISC)) > > because (a) Yinghai's proposal suggests this change is related to > SPARC64, which is misleading, and (b) I want to keep 64-bit bus > addresses for all 64-bit kernels *except* PA-RISC. Ok. > I didn't mark it as Tested-by Meelis because I think he tested > Yinghai's proposal. But I can add that back, given confirmation. > > > commit 51a660a2732c > Author: Bjorn Helgaas > Date: Thu Aug 20 00:08:15 2015 -0500 > > PCI: Don't use 64-bit bus addresses on PA-RISC > > Meelis and Helge reported that 3a9ad0b4fdcd ("PCI: Add pci_bus_addr_t") > caused HPMCs on A500 and hangs on rp5470. > > PA-RISC does not set ARCH_DMA_ADDR_T_64BIT, even for 64-bit kernels, so > prior to 3a9ad0b4fdcd, we always used 32-bit PCI addresses. After > 3a9ad0b4fdcd, we do use 64-bit PCI addresses in 64-bit kernels, and > apparently there's some PA-RISC problem related to them. > > Fixes: 3a9ad0b4fdcd ("PCI: Add pci_bus_addr_t") > Link: http://lkml.kernel.org/r/alpine.LRH.2.11.1507260929000.30065@math.ut.ee > Reported-by: Meelis Roos > Reported-by: Helge Deller > Based-on-idea-by: Yinghai Lu > Signed-off-by: Bjorn Helgaas Looks OK. I will test later today. Can you please add CC: stable@vger.kernel.org # v3.19+ since commit 3a9ad0b4fdcd had that too and now all kernels down to 3.19+ are broken on parisc... Thanks! Helge > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig > index 73de4ef..944f500 100644 > --- a/drivers/pci/Kconfig > +++ b/drivers/pci/Kconfig > @@ -2,7 +2,7 @@ > # PCI configuration > # > config PCI_BUS_ADDR_T_64BIT > - def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT) > + def_bool y if (ARCH_DMA_ADDR_T_64BIT || (64BIT && !PARISC)) > depends on PCI > > config PCI_MSI