Re: A500 boot crash in 4.2.0-rc3-00246-g763e326

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mroos@xxxxxxxx> wrote:
On Tue, Aug 18, 2015 at 12:47 PM, Helge Deller <deller@xxxxxx> 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 <bhelgaas@xxxxxxxxxx>
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@xxxxxxxxxx
     Reported-by: Meelis Roos <mroos@xxxxxxxx>
     Reported-by: Helge Deller <deller@xxxxxx>
     Based-on-idea-by: Yinghai Lu <yinghai@xxxxxxxxxx>
     Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

Looks OK. I will test later today.

Can you please add
 CC: stable@xxxxxxxxxxxxxxx  # 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

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux