* Re: Aw: A500 boot crash in 4.2.0-rc3-00246-g763e326
[not found] ` <trinity-5720bef8-5a4c-4465-b9eb-622daaef650a-1439902901415@3capp-gmx-bs02>
@ 2015-08-18 18:44 ` Meelis Roos
2015-08-18 19:47 ` Helge Deller
0 siblings, 1 reply; 13+ messages in thread
From: Meelis Roos @ 2015-08-18 18:44 UTC (permalink / raw)
To: Helge Deller, Yinghai Lu
Cc: linux-parisc, linux-pci, David Ahern, Bjorn Helgaas, sparclinux
(CC-s added)
> > > Tried 4.2.0-rc3-00246-g763e326 on A500 but it crashes on boot. This is
> > > still present in todays 4.2.0-rc6+git. 4.1 was fine, I Will bisect but
> > > it takes time.
> > >
> > > PDC Stable Storage facility v0.30
> > > STI GSC/PCI core graphics driver Version 0.9b
> > > Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
> > > serial 0000:00:04.0: enabling device (0146 -> 0147)
> > > console [ttyS0] disabled
> > > 0000:00:04.0: ttyS0 at MMIO 0xfffffffff8000000 (irq = 21, base_baud = 115200) is a 16550A
> > > console [ttyS0] enabled
> > > console [ttyS0] enabled
> > > bootconsole [ttyB0] disabled
> > > bootconsole [ttyB0] disabled
> > > 0000:00:04.0: ttyS1 at MMIO 0xfffffffff8000008 (irq = 21, base_baud = 115200) is a 16550A
> > > 0000:00:04.0: ttyS2 at MMIO 0xfffffffff8000010 (irq = 21, base_baud = 115200) is a 16550A
> > > serial 0000:00:05.0: enabling device (0000 -> 0003)
> > > serial 0000:00:05.0: enabling SERR and PARITY (0003 -> 0143)
> > > 0000:00:05.0: ttyS3 at MMIO 0xfffffffff8003000 (irq = 22, base_baud = 115200) is a 16550A
> > > serial 0000:00:05.0: Couldn't register serial port 0, irq 22, type 2, error -28
> > > sym53c8xx 0000:00:01.0: enabling device (0000 -> 0003)
> > > sym53c8xx 0000:00:01.0: enabling SERR and PARITY (0003 -> 0143)
> >
> > I'm seeing the same problem on my rp5470 with Kernel 4.2-rc7. My machine just hangs though and doesn't crash.
>
> 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
>
> Since the patch has "CC: stable@vger.kernel.org # v3.19+", it might be the reason why you see kernel 3.19 failing too...
I just found the same commit breaking my A500 parisc machine by
bisecting.
CC: patch author and linux-pci.
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Aw: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-18 18:44 ` Aw: A500 boot crash in 4.2.0-rc3-00246-g763e326 Meelis Roos
@ 2015-08-18 19:47 ` Helge Deller
2015-08-18 21:24 ` Yinghai Lu
0 siblings, 1 reply; 13+ messages in thread
From: Helge Deller @ 2015-08-18 19:47 UTC (permalink / raw)
To: Meelis Roos, Yinghai Lu
Cc: linux-parisc, linux-pci, David Ahern, Bjorn Helgaas, sparclinux,
James Bottomley
On 18.08.2015 20:44, Meelis Roos wrote:
> (CC-s added)
>
>>>> Tried 4.2.0-rc3-00246-g763e326 on A500 but it crashes on boot. This is
>>>> still present in todays 4.2.0-rc6+git. 4.1 was fine, I Will bisect but
>>>> it takes time.
>>>>
>>>> PDC Stable Storage facility v0.30
>>>> STI GSC/PCI core graphics driver Version 0.9b
>>>> Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
>>>> serial 0000:00:04.0: enabling device (0146 -> 0147)
>>>> console [ttyS0] disabled
>>>> 0000:00:04.0: ttyS0 at MMIO 0xfffffffff8000000 (irq = 21, base_baud = 115200) is a 16550A
>>>> console [ttyS0] enabled
>>>> console [ttyS0] enabled
>>>> bootconsole [ttyB0] disabled
>>>> bootconsole [ttyB0] disabled
>>>> 0000:00:04.0: ttyS1 at MMIO 0xfffffffff8000008 (irq = 21, base_baud = 115200) is a 16550A
>>>> 0000:00:04.0: ttyS2 at MMIO 0xfffffffff8000010 (irq = 21, base_baud = 115200) is a 16550A
>>>> serial 0000:00:05.0: enabling device (0000 -> 0003)
>>>> serial 0000:00:05.0: enabling SERR and PARITY (0003 -> 0143)
>>>> 0000:00:05.0: ttyS3 at MMIO 0xfffffffff8003000 (irq = 22, base_baud = 115200) is a 16550A
>>>> serial 0000:00:05.0: Couldn't register serial port 0, irq 22, type 2, error -28
>>>> sym53c8xx 0000:00:01.0: enabling device (0000 -> 0003)
>>>> sym53c8xx 0000:00:01.0: enabling SERR and PARITY (0003 -> 0143)
>>>
>>> I'm seeing the same problem on my rp5470 with Kernel 4.2-rc7. My machine just hangs though and doesn't crash.
>>
>> 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
>>
>> Since the patch has "CC: stable@vger.kernel.org # v3.19+", it might be the reason why you see kernel 3.19 failing too...
>
> I just found the same commit breaking my A500 parisc machine by
> bisecting.
>
> 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
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) {
but the real problem is probably, that the sym53c8xx driver or maybe the parisc PCI core code isn't 64bit clean?
I did some more debugging, and on parisc the first hang happens in function sym_check_raid() [called from sym2_probe()]
indrivers/scsi/sym53c8xx_2/sym_glue.c while trying to call readl():
ram_val = readl(device->s.ramaddr + ram_size - 16);
Helge
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Aw: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-18 19:47 ` Helge Deller
@ 2015-08-18 21:24 ` Yinghai Lu
2015-08-19 4:48 ` Meelis Roos
2015-08-19 10:40 ` Aw: " Meelis Roos
0 siblings, 2 replies; 13+ messages in thread
From: Yinghai Lu @ 2015-08-18 21:24 UTC (permalink / raw)
To: Helge Deller
Cc: Meelis Roos, linux-parisc, linux-pci@vger.kernel.org, David Ahern,
Bjorn Helgaas, sparclinux@vger.kernel.org, James Bottomley
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Aw: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-18 21:24 ` Yinghai Lu
@ 2015-08-19 4:48 ` Meelis Roos
2015-08-19 5:30 ` Yinghai Lu
2015-08-19 10:40 ` Aw: " Meelis Roos
1 sibling, 1 reply; 13+ messages in thread
From: Meelis Roos @ 2015-08-19 4:48 UTC (permalink / raw)
To: Yinghai Lu
Cc: Helge Deller, linux-parisc, linux-pci@vger.kernel.org,
David Ahern, Bjorn Helgaas, sparclinux@vger.kernel.org,
James Bottomley
> 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.
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Aw: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-19 4:48 ` Meelis Roos
@ 2015-08-19 5:30 ` Yinghai Lu
2015-08-19 11:25 ` John David Anglin
0 siblings, 1 reply; 13+ messages in thread
From: Yinghai Lu @ 2015-08-19 5:30 UTC (permalink / raw)
To: Meelis Roos
Cc: Helge Deller, linux-parisc, linux-pci@vger.kernel.org,
Bjorn Helgaas, sparclinux@vger.kernel.org, James Bottomley
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Aw: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-18 21:24 ` Yinghai Lu
2015-08-19 4:48 ` Meelis Roos
@ 2015-08-19 10:40 ` Meelis Roos
1 sibling, 0 replies; 13+ messages in thread
From: Meelis Roos @ 2015-08-19 10:40 UTC (permalink / raw)
To: Yinghai Lu
Cc: Helge Deller, linux-parisc, linux-pci@vger.kernel.org,
Bjorn Helgaas, sparclinux@vger.kernel.org, James Bottomley
> >>> 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.
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Aw: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-19 5:30 ` Yinghai Lu
@ 2015-08-19 11:25 ` John David Anglin
2015-08-19 14:06 ` Aw: " Helge Deller
0 siblings, 1 reply; 13+ messages in thread
From: John David Anglin @ 2015-08-19 11:25 UTC (permalink / raw)
To: Yinghai Lu
Cc: Meelis Roos, Helge Deller, linux-parisc,
linux-pci@vger.kernel.org, Bjorn Helgaas,
sparclinux@vger.kernel.org, James Bottomley
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Aw: Re: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-19 11:25 ` John David Anglin
@ 2015-08-19 14:06 ` Helge Deller
2015-08-20 5:42 ` Bjorn Helgaas
0 siblings, 1 reply; 13+ messages in thread
From: Helge Deller @ 2015-08-19 14:06 UTC (permalink / raw)
To: John David Anglin
Cc: Yinghai Lu, Meelis Roos, linux-parisc, linux-pci@vger.kernel.org,
Bjorn Helgaas, sparclinux@vger.kernel.org, James Bottomley
> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-19 14:06 ` Aw: " Helge Deller
@ 2015-08-20 5:42 ` Bjorn Helgaas
2015-08-20 6:53 ` Helge Deller
2015-08-20 19:31 ` Yinghai Lu
0 siblings, 2 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2015-08-20 5:42 UTC (permalink / raw)
To: Helge Deller
Cc: John David Anglin, Yinghai Lu, Meelis Roos, linux-parisc,
linux-pci@vger.kernel.org, sparclinux@vger.kernel.org,
James Bottomley
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@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.
I doubt we can fix the underlying issue before v4.2, 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.
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@google.com>
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 <mroos@linux.ee>
Reported-by: Helge Deller <deller@gmx.de>
Based-on-idea-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-20 5:42 ` Bjorn Helgaas
@ 2015-08-20 6:53 ` Helge Deller
2015-08-20 19:31 ` Yinghai Lu
1 sibling, 0 replies; 13+ messages in thread
From: Helge Deller @ 2015-08-20 6:53 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: John David Anglin, Yinghai Lu, Meelis Roos, linux-parisc,
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 <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.
>
> 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@google.com>
> 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 <mroos@linux.ee>
> Reported-by: Helge Deller <deller@gmx.de>
> Based-on-idea-by: Yinghai Lu <yinghai@kernel.org>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-20 5:42 ` Bjorn Helgaas
2015-08-20 6:53 ` Helge Deller
@ 2015-08-20 19:31 ` Yinghai Lu
2015-08-20 21:15 ` Helge Deller
1 sibling, 1 reply; 13+ messages in thread
From: Yinghai Lu @ 2015-08-20 19:31 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Helge Deller, John David Anglin, Meelis Roos, linux-parisc,
linux-pci@vger.kernel.org, sparclinux@vger.kernel.org,
James Bottomley
On Wed, Aug 19, 2015 at 10:42 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> commit 51a660a2732c
> Author: Bjorn Helgaas <bhelgaas@google.com>
> 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 <mroos@linux.ee>
> Reported-by: Helge Deller <deller@gmx.de>
> Based-on-idea-by: Yinghai Lu <yinghai@kernel.org>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>
> 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
Yes, that is better.
Acked-by: Yinghai Lu <yinghai@kernel.org>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-20 19:31 ` Yinghai Lu
@ 2015-08-20 21:15 ` Helge Deller
2015-08-20 21:30 ` Bjorn Helgaas
0 siblings, 1 reply; 13+ messages in thread
From: Helge Deller @ 2015-08-20 21:15 UTC (permalink / raw)
To: Yinghai Lu, Bjorn Helgaas
Cc: John David Anglin, Meelis Roos, linux-parisc,
linux-pci@vger.kernel.org, sparclinux@vger.kernel.org,
James Bottomley
On 20.08.2015 21:31, Yinghai Lu wrote:
> On Wed, Aug 19, 2015 at 10:42 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>
>> commit 51a660a2732c
>> Author: Bjorn Helgaas <bhelgaas@google.com>
>> 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 <mroos@linux.ee>
>> Reported-by: Helge Deller <deller@gmx.de>
>> Based-on-idea-by: Yinghai Lu <yinghai@kernel.org>
>> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>>
>> 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
>
> Yes, that is better.
>
> Acked-by: Yinghai Lu <yinghai@kernel.org>
Tested-by: Helge Deller <deller@gmx.de>
and please add:
CC: stable@vger.kernel.org # v3.19+
Helge
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: A500 boot crash in 4.2.0-rc3-00246-g763e326
2015-08-20 21:15 ` Helge Deller
@ 2015-08-20 21:30 ` Bjorn Helgaas
0 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2015-08-20 21:30 UTC (permalink / raw)
To: Helge Deller
Cc: Yinghai Lu, John David Anglin, Meelis Roos, linux-parisc,
linux-pci@vger.kernel.org, sparclinux@vger.kernel.org,
James Bottomley
On Thu, Aug 20, 2015 at 2:15 PM, Helge Deller <deller@gmx.de> wrote:
> On 20.08.2015 21:31, Yinghai Lu wrote:
>>
>> On Wed, Aug 19, 2015 at 10:42 PM, Bjorn Helgaas <bhelgaas@google.com>
>> wrote:
>>
>>> commit 51a660a2732c
>>> Author: Bjorn Helgaas <bhelgaas@google.com>
>>> 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 <mroos@linux.ee>
>>> Reported-by: Helge Deller <deller@gmx.de>
>>> Based-on-idea-by: Yinghai Lu <yinghai@kernel.org>
>>> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>>>
>>> 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
>>
>>
>> Yes, that is better.
>>
>> Acked-by: Yinghai Lu <yinghai@kernel.org>
>
>
>
> Tested-by: Helge Deller <deller@gmx.de>
> and please add:
> CC: stable@vger.kernel.org # v3.19+
Done, thanks for testing this!
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-08-20 21:31 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <alpine.LRH.2.11.1507260929000.30065@math.ut.ee>
[not found] ` <trinity-122a736f-3aac-4830-afc5-2abcd91792ea-1439820380917@3capp-gmx-bs71>
[not found] ` <trinity-5720bef8-5a4c-4465-b9eb-622daaef650a-1439902901415@3capp-gmx-bs02>
2015-08-18 18:44 ` Aw: A500 boot crash in 4.2.0-rc3-00246-g763e326 Meelis Roos
2015-08-18 19:47 ` Helge Deller
2015-08-18 21:24 ` Yinghai Lu
2015-08-19 4:48 ` Meelis Roos
2015-08-19 5:30 ` Yinghai Lu
2015-08-19 11:25 ` John David Anglin
2015-08-19 14:06 ` Aw: " Helge Deller
2015-08-20 5:42 ` Bjorn Helgaas
2015-08-20 6:53 ` Helge Deller
2015-08-20 19:31 ` Yinghai Lu
2015-08-20 21:15 ` Helge Deller
2015-08-20 21:30 ` Bjorn Helgaas
2015-08-19 10:40 ` Aw: " Meelis Roos
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).