* Re: earlycon issues in -next with amba-pl011 updates
2015-09-03 16:08 ` Marc Zyngier
@ 2015-09-03 17:49 ` Peter Hurley
2015-09-03 17:53 ` Greg Kroah-Hartman
2015-09-03 18:00 ` Marc Zyngier
2015-09-04 11:06 ` Will Deacon
2015-09-05 14:42 ` Jun Nie
2 siblings, 2 replies; 24+ messages in thread
From: Peter Hurley @ 2015-09-03 17:49 UTC (permalink / raw)
To: Marc Zyngier, Greg Kroah-Hartman
Cc: Jun Nie, Tyler Baker, linux-arm-kernel, Leif Lindholm,
linux-serial
On 09/03/2015 12:08 PM, Marc Zyngier wrote:
> On 03/09/15 16:52, Greg Kroah-Hartman wrote:
>> On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
>>> On 11/08/15 02:48, Jun Nie wrote:
>>>> 2015-08-11 7:23 GMT+08:00 Leif Lindholm <leif.lindholm@linaro.org>:
>>>>> Hi all,
>>>>>
>>>>> The kernelci.org bot picked up a complete boot failure (no output past
>>>>> UEFI stub) with next-20150806 and Tyler bisected it down to somewhere
>>>>> in
>>>>> 8cd90e5 uart: pl011: Add support to ZTE ZX296702 uart
>>>>> 09dcc7d uart: pl011: Improve LCRH register access decision
>>>>> 2c096a9 uart: pl011: Introduce register look up table
>>>>> 7b753f3 uart: pl011: Introduce register accessor
>>>>>
>>>>> The issue only appears with earlycon on command line, for pl011
>>>>> consoles.
>>>>>
>>>>> Some investigation shows that the cause lies with
>>>>> commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
>>>>> and
>>>>> commit 2c096a9eedc6 ("uart: pl011: Introduce register look up table")
>>>>>
>>>>> Specifically, the changes to pl011_putc() are incorrect:
>>>>> The new pl011_ accessors take a (struct uart_amba_port *) input, but
>>>>> pl011_putc() directly uses the incoming (struct uart_port *) for this.
>>>>>
>>>>> Apart from ending up with an unintended/incorrect UART base address,
>>>>> the introduction of the lookup table for register offsets also means
>>>>> the accessors try to dereference (struct uart_amba_port *)->reg_lut.
>>>>>
>>>>> The below is a hack that shows/resolves the issue, but some
>>>>> refactoring of the original patches might be in order.
>>>>>
>>>>> /
>>>>> Leif
>>>>
>>>> Leif,
>>>>
>>>> Sorry for the inconvenience. I do not have idea of early console till
>>>> now and I always have debug console for early panic debug. Learned
>>>> more from this issue.
>>>>
>>>> Suppose Peter's patch will resolve your issue.
>>>
>>> [+ Greg KH]
>>>
>>> So -next has now been broken for a while on a number of ARM platforms
>>> because of this (they simply cannot boot), and no progress has been made
>>> towards resolving this problem.
>>>
>>> Can we please drop this series (at least commits 7b753f3 and following)
>>> from -next until is has been reworked and reviewed?
>>
>> I don't have any patches in my -next tree, everything is in Linus's tree
>> now. So if I've missed something, or need to revert something, please
>> let me know specifcally what to do.
>
> Gahhh... Given that there is no obvious fix
Fix has been on list since Aug 10.
http://www.spinics.net/lists/linux-serial/msg18576.html
> that the discussion has
> stalled and that the author of the series is apparently away, the
> following patches should be reverted:
>
> 8cd90e50d140 uart: pl011: Add support to ZTE ZX296702 uart
> 09dcc7dfc05b uart: pl011: Improve LCRH register access decision
> 2c096a9eedc6 uart: pl011: Introduce register look up table
> 7b753f318d14 uart: pl011: Introduce register accessor
> 534e14e2293d uart: pl011: Rename regs with enumeration
>
> (7b753f318d14 being the one breaking everything, but it makes more sense
> to revert the whole series until it is properly fixed and reviewed).
>
> Thanks,
>
> M.
>
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: earlycon issues in -next with amba-pl011 updates
2015-09-03 17:49 ` Peter Hurley
@ 2015-09-03 17:53 ` Greg Kroah-Hartman
2015-09-03 18:03 ` Peter Hurley
2015-09-03 18:00 ` Marc Zyngier
1 sibling, 1 reply; 24+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-03 17:53 UTC (permalink / raw)
To: Peter Hurley
Cc: Marc Zyngier, Tyler Baker, Leif Lindholm, linux-serial, Jun Nie,
linux-arm-kernel
On Thu, Sep 03, 2015 at 01:49:02PM -0400, Peter Hurley wrote:
> On 09/03/2015 12:08 PM, Marc Zyngier wrote:
> > On 03/09/15 16:52, Greg Kroah-Hartman wrote:
> >> On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
> >>> On 11/08/15 02:48, Jun Nie wrote:
> >>>> 2015-08-11 7:23 GMT+08:00 Leif Lindholm <leif.lindholm@linaro.org>:
> >>>>> Hi all,
> >>>>>
> >>>>> The kernelci.org bot picked up a complete boot failure (no output past
> >>>>> UEFI stub) with next-20150806 and Tyler bisected it down to somewhere
> >>>>> in
> >>>>> 8cd90e5 uart: pl011: Add support to ZTE ZX296702 uart
> >>>>> 09dcc7d uart: pl011: Improve LCRH register access decision
> >>>>> 2c096a9 uart: pl011: Introduce register look up table
> >>>>> 7b753f3 uart: pl011: Introduce register accessor
> >>>>>
> >>>>> The issue only appears with earlycon on command line, for pl011
> >>>>> consoles.
> >>>>>
> >>>>> Some investigation shows that the cause lies with
> >>>>> commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
> >>>>> and
> >>>>> commit 2c096a9eedc6 ("uart: pl011: Introduce register look up table")
> >>>>>
> >>>>> Specifically, the changes to pl011_putc() are incorrect:
> >>>>> The new pl011_ accessors take a (struct uart_amba_port *) input, but
> >>>>> pl011_putc() directly uses the incoming (struct uart_port *) for this.
> >>>>>
> >>>>> Apart from ending up with an unintended/incorrect UART base address,
> >>>>> the introduction of the lookup table for register offsets also means
> >>>>> the accessors try to dereference (struct uart_amba_port *)->reg_lut.
> >>>>>
> >>>>> The below is a hack that shows/resolves the issue, but some
> >>>>> refactoring of the original patches might be in order.
> >>>>>
> >>>>> /
> >>>>> Leif
> >>>>
> >>>> Leif,
> >>>>
> >>>> Sorry for the inconvenience. I do not have idea of early console till
> >>>> now and I always have debug console for early panic debug. Learned
> >>>> more from this issue.
> >>>>
> >>>> Suppose Peter's patch will resolve your issue.
> >>>
> >>> [+ Greg KH]
> >>>
> >>> So -next has now been broken for a while on a number of ARM platforms
> >>> because of this (they simply cannot boot), and no progress has been made
> >>> towards resolving this problem.
> >>>
> >>> Can we please drop this series (at least commits 7b753f3 and following)
> >>> from -next until is has been reworked and reviewed?
> >>
> >> I don't have any patches in my -next tree, everything is in Linus's tree
> >> now. So if I've missed something, or need to revert something, please
> >> let me know specifcally what to do.
> >
> > Gahhh... Given that there is no obvious fix
>
> Fix has been on list since Aug 10.
>
> http://www.spinics.net/lists/linux-serial/msg18576.html
Now if only someone would have at least compile tested it :)
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: earlycon issues in -next with amba-pl011 updates
2015-09-03 17:53 ` Greg Kroah-Hartman
@ 2015-09-03 18:03 ` Peter Hurley
2015-09-03 18:16 ` Marc Zyngier
0 siblings, 1 reply; 24+ messages in thread
From: Peter Hurley @ 2015-09-03 18:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Marc Zyngier, Tyler Baker, Leif Lindholm, linux-serial, Jun Nie,
linux-arm-kernel
On 09/03/2015 01:53 PM, Greg Kroah-Hartman wrote:
> On Thu, Sep 03, 2015 at 01:49:02PM -0400, Peter Hurley wrote:
>> On 09/03/2015 12:08 PM, Marc Zyngier wrote:
>>> On 03/09/15 16:52, Greg Kroah-Hartman wrote:
>>>> On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
>>>>> On 11/08/15 02:48, Jun Nie wrote:
>>>>>> 2015-08-11 7:23 GMT+08:00 Leif Lindholm <leif.lindholm@linaro.org>:
>>>>>>> Hi all,
>>>>>>>
>>>>>>> The kernelci.org bot picked up a complete boot failure (no output past
>>>>>>> UEFI stub) with next-20150806 and Tyler bisected it down to somewhere
>>>>>>> in
>>>>>>> 8cd90e5 uart: pl011: Add support to ZTE ZX296702 uart
>>>>>>> 09dcc7d uart: pl011: Improve LCRH register access decision
>>>>>>> 2c096a9 uart: pl011: Introduce register look up table
>>>>>>> 7b753f3 uart: pl011: Introduce register accessor
>>>>>>>
>>>>>>> The issue only appears with earlycon on command line, for pl011
>>>>>>> consoles.
>>>>>>>
>>>>>>> Some investigation shows that the cause lies with
>>>>>>> commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
>>>>>>> and
>>>>>>> commit 2c096a9eedc6 ("uart: pl011: Introduce register look up table")
>>>>>>>
>>>>>>> Specifically, the changes to pl011_putc() are incorrect:
>>>>>>> The new pl011_ accessors take a (struct uart_amba_port *) input, but
>>>>>>> pl011_putc() directly uses the incoming (struct uart_port *) for this.
>>>>>>>
>>>>>>> Apart from ending up with an unintended/incorrect UART base address,
>>>>>>> the introduction of the lookup table for register offsets also means
>>>>>>> the accessors try to dereference (struct uart_amba_port *)->reg_lut.
>>>>>>>
>>>>>>> The below is a hack that shows/resolves the issue, but some
>>>>>>> refactoring of the original patches might be in order.
>>>>>>>
>>>>>>> /
>>>>>>> Leif
>>>>>>
>>>>>> Leif,
>>>>>>
>>>>>> Sorry for the inconvenience. I do not have idea of early console till
>>>>>> now and I always have debug console for early panic debug. Learned
>>>>>> more from this issue.
>>>>>>
>>>>>> Suppose Peter's patch will resolve your issue.
>>>>>
>>>>> [+ Greg KH]
>>>>>
>>>>> So -next has now been broken for a while on a number of ARM platforms
>>>>> because of this (they simply cannot boot), and no progress has been made
>>>>> towards resolving this problem.
>>>>>
>>>>> Can we please drop this series (at least commits 7b753f3 and following)
>>>>> from -next until is has been reworked and reviewed?
>>>>
>>>> I don't have any patches in my -next tree, everything is in Linus's tree
>>>> now. So if I've missed something, or need to revert something, please
>>>> let me know specifcally what to do.
>>>
>>> Gahhh... Given that there is no obvious fix
>>
>> Fix has been on list since Aug 10.
>>
>> http://www.spinics.net/lists/linux-serial/msg18576.html
>
> Now if only someone would have at least compile tested it :)
On 08/11/2015 06:07 AM, Leif Lindholm wrote:
> It works, but builds with:
> drivers/tty/serial/amba-pl011.c:329:13: warning: ‘pl011_writeb’
> defined but not used [-Wunused-function]
> static void pl011_writeb(struct uart_amba_port *uap, u8 val, int
> index)
> ^
> I was dithering about whether having _relaxed accessors in post boot
> code and plain ones in earlycon was an issue, but I guess it doesn't
> matter much.
Russell wanted me to do a bunch of improvements, but I wrote that
should wait until 4.3-rc cycle.
Regards,
Peter Hurley
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: earlycon issues in -next with amba-pl011 updates
2015-09-03 18:03 ` Peter Hurley
@ 2015-09-03 18:16 ` Marc Zyngier
2015-09-03 18:21 ` Peter Hurley
0 siblings, 1 reply; 24+ messages in thread
From: Marc Zyngier @ 2015-09-03 18:16 UTC (permalink / raw)
To: Peter Hurley, Greg Kroah-Hartman
Cc: Jun Nie, Tyler Baker, linux-arm-kernel, Leif Lindholm,
linux-serial
On 03/09/15 19:03, Peter Hurley wrote:
> On 09/03/2015 01:53 PM, Greg Kroah-Hartman wrote:
>> On Thu, Sep 03, 2015 at 01:49:02PM -0400, Peter Hurley wrote:
>>> On 09/03/2015 12:08 PM, Marc Zyngier wrote:
>>>> On 03/09/15 16:52, Greg Kroah-Hartman wrote:
>>>>> On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
>>>>>> On 11/08/15 02:48, Jun Nie wrote:
>>>>>>> 2015-08-11 7:23 GMT+08:00 Leif Lindholm <leif.lindholm@linaro.org>:
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> The kernelci.org bot picked up a complete boot failure (no output past
>>>>>>>> UEFI stub) with next-20150806 and Tyler bisected it down to somewhere
>>>>>>>> in
>>>>>>>> 8cd90e5 uart: pl011: Add support to ZTE ZX296702 uart
>>>>>>>> 09dcc7d uart: pl011: Improve LCRH register access decision
>>>>>>>> 2c096a9 uart: pl011: Introduce register look up table
>>>>>>>> 7b753f3 uart: pl011: Introduce register accessor
>>>>>>>>
>>>>>>>> The issue only appears with earlycon on command line, for pl011
>>>>>>>> consoles.
>>>>>>>>
>>>>>>>> Some investigation shows that the cause lies with
>>>>>>>> commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
>>>>>>>> and
>>>>>>>> commit 2c096a9eedc6 ("uart: pl011: Introduce register look up table")
>>>>>>>>
>>>>>>>> Specifically, the changes to pl011_putc() are incorrect:
>>>>>>>> The new pl011_ accessors take a (struct uart_amba_port *) input, but
>>>>>>>> pl011_putc() directly uses the incoming (struct uart_port *) for this.
>>>>>>>>
>>>>>>>> Apart from ending up with an unintended/incorrect UART base address,
>>>>>>>> the introduction of the lookup table for register offsets also means
>>>>>>>> the accessors try to dereference (struct uart_amba_port *)->reg_lut.
>>>>>>>>
>>>>>>>> The below is a hack that shows/resolves the issue, but some
>>>>>>>> refactoring of the original patches might be in order.
>>>>>>>>
>>>>>>>> /
>>>>>>>> Leif
>>>>>>>
>>>>>>> Leif,
>>>>>>>
>>>>>>> Sorry for the inconvenience. I do not have idea of early console till
>>>>>>> now and I always have debug console for early panic debug. Learned
>>>>>>> more from this issue.
>>>>>>>
>>>>>>> Suppose Peter's patch will resolve your issue.
>>>>>>
>>>>>> [+ Greg KH]
>>>>>>
>>>>>> So -next has now been broken for a while on a number of ARM platforms
>>>>>> because of this (they simply cannot boot), and no progress has been made
>>>>>> towards resolving this problem.
>>>>>>
>>>>>> Can we please drop this series (at least commits 7b753f3 and following)
>>>>>> from -next until is has been reworked and reviewed?
>>>>>
>>>>> I don't have any patches in my -next tree, everything is in Linus's tree
>>>>> now. So if I've missed something, or need to revert something, please
>>>>> let me know specifcally what to do.
>>>>
>>>> Gahhh... Given that there is no obvious fix
>>>
>>> Fix has been on list since Aug 10.
>>>
>>> http://www.spinics.net/lists/linux-serial/msg18576.html
>>
>> Now if only someone would have at least compile tested it :)
>
> On 08/11/2015 06:07 AM, Leif Lindholm wrote:
>> It works, but builds with:
>> drivers/tty/serial/amba-pl011.c:329:13: warning: ‘pl011_writeb’
>> defined but not used [-Wunused-function]
>> static void pl011_writeb(struct uart_amba_port *uap, u8 val, int
>> index)
>> ^
>> I was dithering about whether having _relaxed accessors in post boot
>> code and plain ones in earlycon was an issue, but I guess it doesn't
>> matter much.
>
> Russell wanted me to do a bunch of improvements, but I wrote that
> should wait until 4.3-rc cycle.
It is well known that we merge "improvements" outside of the merge
window. And what about starting with a series that is actually bisectable?
It is quite apparent that this code hasn't been tested enough, hasn't
been reviewed enough, and breaks a wide range of platforms (almost
anything that sits on and under my desk, TBH).
That's really for Greg to decide, but I'm not overly confident with the
state of this series as it stands.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: earlycon issues in -next with amba-pl011 updates
2015-09-03 18:16 ` Marc Zyngier
@ 2015-09-03 18:21 ` Peter Hurley
0 siblings, 0 replies; 24+ messages in thread
From: Peter Hurley @ 2015-09-03 18:21 UTC (permalink / raw)
To: Marc Zyngier, Greg Kroah-Hartman
Cc: Jun Nie, Tyler Baker, linux-arm-kernel, Leif Lindholm,
linux-serial
On 09/03/2015 02:16 PM, Marc Zyngier wrote:
> On 03/09/15 19:03, Peter Hurley wrote:
>> On 09/03/2015 01:53 PM, Greg Kroah-Hartman wrote:
>>> On Thu, Sep 03, 2015 at 01:49:02PM -0400, Peter Hurley wrote:
>>>> On 09/03/2015 12:08 PM, Marc Zyngier wrote:
>>>>> On 03/09/15 16:52, Greg Kroah-Hartman wrote:
>>>>>> On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
>>>>>>> On 11/08/15 02:48, Jun Nie wrote:
>>>>>>>> 2015-08-11 7:23 GMT+08:00 Leif Lindholm <leif.lindholm@linaro.org>:
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> The kernelci.org bot picked up a complete boot failure (no output past
>>>>>>>>> UEFI stub) with next-20150806 and Tyler bisected it down to somewhere
>>>>>>>>> in
>>>>>>>>> 8cd90e5 uart: pl011: Add support to ZTE ZX296702 uart
>>>>>>>>> 09dcc7d uart: pl011: Improve LCRH register access decision
>>>>>>>>> 2c096a9 uart: pl011: Introduce register look up table
>>>>>>>>> 7b753f3 uart: pl011: Introduce register accessor
>>>>>>>>>
>>>>>>>>> The issue only appears with earlycon on command line, for pl011
>>>>>>>>> consoles.
>>>>>>>>>
>>>>>>>>> Some investigation shows that the cause lies with
>>>>>>>>> commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
>>>>>>>>> and
>>>>>>>>> commit 2c096a9eedc6 ("uart: pl011: Introduce register look up table")
>>>>>>>>>
>>>>>>>>> Specifically, the changes to pl011_putc() are incorrect:
>>>>>>>>> The new pl011_ accessors take a (struct uart_amba_port *) input, but
>>>>>>>>> pl011_putc() directly uses the incoming (struct uart_port *) for this.
>>>>>>>>>
>>>>>>>>> Apart from ending up with an unintended/incorrect UART base address,
>>>>>>>>> the introduction of the lookup table for register offsets also means
>>>>>>>>> the accessors try to dereference (struct uart_amba_port *)->reg_lut.
>>>>>>>>>
>>>>>>>>> The below is a hack that shows/resolves the issue, but some
>>>>>>>>> refactoring of the original patches might be in order.
>>>>>>>>>
>>>>>>>>> /
>>>>>>>>> Leif
>>>>>>>>
>>>>>>>> Leif,
>>>>>>>>
>>>>>>>> Sorry for the inconvenience. I do not have idea of early console till
>>>>>>>> now and I always have debug console for early panic debug. Learned
>>>>>>>> more from this issue.
>>>>>>>>
>>>>>>>> Suppose Peter's patch will resolve your issue.
>>>>>>>
>>>>>>> [+ Greg KH]
>>>>>>>
>>>>>>> So -next has now been broken for a while on a number of ARM platforms
>>>>>>> because of this (they simply cannot boot), and no progress has been made
>>>>>>> towards resolving this problem.
>>>>>>>
>>>>>>> Can we please drop this series (at least commits 7b753f3 and following)
>>>>>>> from -next until is has been reworked and reviewed?
>>>>>>
>>>>>> I don't have any patches in my -next tree, everything is in Linus's tree
>>>>>> now. So if I've missed something, or need to revert something, please
>>>>>> let me know specifcally what to do.
>>>>>
>>>>> Gahhh... Given that there is no obvious fix
>>>>
>>>> Fix has been on list since Aug 10.
>>>>
>>>> http://www.spinics.net/lists/linux-serial/msg18576.html
>>>
>>> Now if only someone would have at least compile tested it :)
>>
>> On 08/11/2015 06:07 AM, Leif Lindholm wrote:
>>> It works, but builds with:
>>> drivers/tty/serial/amba-pl011.c:329:13: warning: ‘pl011_writeb’
>>> defined but not used [-Wunused-function]
>>> static void pl011_writeb(struct uart_amba_port *uap, u8 val, int
>>> index)
>>> ^
>>> I was dithering about whether having _relaxed accessors in post boot
>>> code and plain ones in earlycon was an issue, but I guess it doesn't
>>> matter much.
>>
>> Russell wanted me to do a bunch of improvements, but I wrote that
>> should wait until 4.3-rc cycle.
>
> It is well known that we merge "improvements" outside of the merge
> window. And what about starting with a series that is actually bisectable?
>
> It is quite apparent that this code hasn't been tested enough, hasn't
> been reviewed enough, and breaks a wide range of platforms (almost
> anything that sits on and under my desk, TBH).
>
> That's really for Greg to decide, but I'm not overly confident with the
> state of this series as it stands.
If you feel the code is not reliable enough/tested/not bisectable/whatever,
I have no objection to reverting and starting again.
But if the issue is only wrt earlycon, then my patch ought to address that.
Regards,
Peter Hurley
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: earlycon issues in -next with amba-pl011 updates
2015-09-03 17:49 ` Peter Hurley
2015-09-03 17:53 ` Greg Kroah-Hartman
@ 2015-09-03 18:00 ` Marc Zyngier
2015-09-03 18:15 ` Peter Hurley
1 sibling, 1 reply; 24+ messages in thread
From: Marc Zyngier @ 2015-09-03 18:00 UTC (permalink / raw)
To: Peter Hurley, Greg Kroah-Hartman
Cc: Jun Nie, Tyler Baker, linux-arm-kernel, Leif Lindholm,
linux-serial
On 03/09/15 18:49, Peter Hurley wrote:
> On 09/03/2015 12:08 PM, Marc Zyngier wrote:
>> On 03/09/15 16:52, Greg Kroah-Hartman wrote:
>>> On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
>>>> On 11/08/15 02:48, Jun Nie wrote:
>>>>> 2015-08-11 7:23 GMT+08:00 Leif Lindholm <leif.lindholm@linaro.org>:
>>>>>> Hi all,
>>>>>>
>>>>>> The kernelci.org bot picked up a complete boot failure (no output past
>>>>>> UEFI stub) with next-20150806 and Tyler bisected it down to somewhere
>>>>>> in
>>>>>> 8cd90e5 uart: pl011: Add support to ZTE ZX296702 uart
>>>>>> 09dcc7d uart: pl011: Improve LCRH register access decision
>>>>>> 2c096a9 uart: pl011: Introduce register look up table
>>>>>> 7b753f3 uart: pl011: Introduce register accessor
>>>>>>
>>>>>> The issue only appears with earlycon on command line, for pl011
>>>>>> consoles.
>>>>>>
>>>>>> Some investigation shows that the cause lies with
>>>>>> commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
>>>>>> and
>>>>>> commit 2c096a9eedc6 ("uart: pl011: Introduce register look up table")
>>>>>>
>>>>>> Specifically, the changes to pl011_putc() are incorrect:
>>>>>> The new pl011_ accessors take a (struct uart_amba_port *) input, but
>>>>>> pl011_putc() directly uses the incoming (struct uart_port *) for this.
>>>>>>
>>>>>> Apart from ending up with an unintended/incorrect UART base address,
>>>>>> the introduction of the lookup table for register offsets also means
>>>>>> the accessors try to dereference (struct uart_amba_port *)->reg_lut.
>>>>>>
>>>>>> The below is a hack that shows/resolves the issue, but some
>>>>>> refactoring of the original patches might be in order.
>>>>>>
>>>>>> /
>>>>>> Leif
>>>>>
>>>>> Leif,
>>>>>
>>>>> Sorry for the inconvenience. I do not have idea of early console till
>>>>> now and I always have debug console for early panic debug. Learned
>>>>> more from this issue.
>>>>>
>>>>> Suppose Peter's patch will resolve your issue.
>>>>
>>>> [+ Greg KH]
>>>>
>>>> So -next has now been broken for a while on a number of ARM platforms
>>>> because of this (they simply cannot boot), and no progress has been made
>>>> towards resolving this problem.
>>>>
>>>> Can we please drop this series (at least commits 7b753f3 and following)
>>>> from -next until is has been reworked and reviewed?
>>>
>>> I don't have any patches in my -next tree, everything is in Linus's tree
>>> now. So if I've missed something, or need to revert something, please
>>> let me know specifcally what to do.
>>
>> Gahhh... Given that there is no obvious fix
>
> Fix has been on list since Aug 10.
>
> http://www.spinics.net/lists/linux-serial/msg18576.html
... with both Leif and Russell outlining issues with this patch:
http://www.spinics.net/lists/linux-serial/msg18594.html
http://www.spinics.net/lists/linux-serial/msg18599.html
so maybe coming up with an updated series would have been a good move.
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: earlycon issues in -next with amba-pl011 updates
2015-09-03 18:00 ` Marc Zyngier
@ 2015-09-03 18:15 ` Peter Hurley
0 siblings, 0 replies; 24+ messages in thread
From: Peter Hurley @ 2015-09-03 18:15 UTC (permalink / raw)
To: Marc Zyngier, Greg Kroah-Hartman
Cc: Jun Nie, Tyler Baker, linux-arm-kernel, Leif Lindholm,
linux-serial
On 09/03/2015 02:00 PM, Marc Zyngier wrote:
> On 03/09/15 18:49, Peter Hurley wrote:
>> On 09/03/2015 12:08 PM, Marc Zyngier wrote:
>>> On 03/09/15 16:52, Greg Kroah-Hartman wrote:
>>>> On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
>>>>> On 11/08/15 02:48, Jun Nie wrote:
>>>>>> 2015-08-11 7:23 GMT+08:00 Leif Lindholm <leif.lindholm@linaro.org>:
>>>>>>> Hi all,
>>>>>>>
>>>>>>> The kernelci.org bot picked up a complete boot failure (no output past
>>>>>>> UEFI stub) with next-20150806 and Tyler bisected it down to somewhere
>>>>>>> in
>>>>>>> 8cd90e5 uart: pl011: Add support to ZTE ZX296702 uart
>>>>>>> 09dcc7d uart: pl011: Improve LCRH register access decision
>>>>>>> 2c096a9 uart: pl011: Introduce register look up table
>>>>>>> 7b753f3 uart: pl011: Introduce register accessor
>>>>>>>
>>>>>>> The issue only appears with earlycon on command line, for pl011
>>>>>>> consoles.
>>>>>>>
>>>>>>> Some investigation shows that the cause lies with
>>>>>>> commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
>>>>>>> and
>>>>>>> commit 2c096a9eedc6 ("uart: pl011: Introduce register look up table")
>>>>>>>
>>>>>>> Specifically, the changes to pl011_putc() are incorrect:
>>>>>>> The new pl011_ accessors take a (struct uart_amba_port *) input, but
>>>>>>> pl011_putc() directly uses the incoming (struct uart_port *) for this.
>>>>>>>
>>>>>>> Apart from ending up with an unintended/incorrect UART base address,
>>>>>>> the introduction of the lookup table for register offsets also means
>>>>>>> the accessors try to dereference (struct uart_amba_port *)->reg_lut.
>>>>>>>
>>>>>>> The below is a hack that shows/resolves the issue, but some
>>>>>>> refactoring of the original patches might be in order.
>>>>>>>
>>>>>>> /
>>>>>>> Leif
>>>>>>
>>>>>> Leif,
>>>>>>
>>>>>> Sorry for the inconvenience. I do not have idea of early console till
>>>>>> now and I always have debug console for early panic debug. Learned
>>>>>> more from this issue.
>>>>>>
>>>>>> Suppose Peter's patch will resolve your issue.
>>>>>
>>>>> [+ Greg KH]
>>>>>
>>>>> So -next has now been broken for a while on a number of ARM platforms
>>>>> because of this (they simply cannot boot), and no progress has been made
>>>>> towards resolving this problem.
>>>>>
>>>>> Can we please drop this series (at least commits 7b753f3 and following)
>>>>> from -next until is has been reworked and reviewed?
>>>>
>>>> I don't have any patches in my -next tree, everything is in Linus's tree
>>>> now. So if I've missed something, or need to revert something, please
>>>> let me know specifcally what to do.
>>>
>>> Gahhh... Given that there is no obvious fix
>>
>> Fix has been on list since Aug 10.
>>
>> http://www.spinics.net/lists/linux-serial/msg18576.html
>
> ... with both Leif and Russell outlining issues with this patch:
>
> http://www.spinics.net/lists/linux-serial/msg18594.html
> http://www.spinics.net/lists/linux-serial/msg18599.html
Russell's suggestions were noted in my reply
http://www.spinics.net/lists/linux-serial/msg18650.html
> so maybe coming up with an updated series would have been a good move.
Feel free to work from where I left off.
Regards,
Peter Hurley
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: earlycon issues in -next with amba-pl011 updates
2015-09-03 16:08 ` Marc Zyngier
2015-09-03 17:49 ` Peter Hurley
@ 2015-09-04 11:06 ` Will Deacon
2015-09-04 11:13 ` Russell King - ARM Linux
2015-09-04 16:15 ` Greg Kroah-Hartman
2015-09-05 14:42 ` Jun Nie
2 siblings, 2 replies; 24+ messages in thread
From: Will Deacon @ 2015-09-04 11:06 UTC (permalink / raw)
To: Marc Zyngier
Cc: Greg Kroah-Hartman, Tyler Baker, Leif Lindholm,
linux-serial@vger.kernel.org, Jun Nie,
linux-arm-kernel@lists.infradead.org
On Thu, Sep 03, 2015 at 05:08:53PM +0100, Marc Zyngier wrote:
> On 03/09/15 16:52, Greg Kroah-Hartman wrote:
> > On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
> >> So -next has now been broken for a while on a number of ARM platforms
> >> because of this (they simply cannot boot), and no progress has been made
> >> towards resolving this problem.
> >>
> >> Can we please drop this series (at least commits 7b753f3 and following)
> >> from -next until is has been reworked and reviewed?
> >
> > I don't have any patches in my -next tree, everything is in Linus's tree
> > now. So if I've missed something, or need to revert something, please
> > let me know specifcally what to do.
>
> Gahhh... Given that there is no obvious fix, that the discussion has
> stalled and that the author of the series is apparently away, the
> following patches should be reverted:
>
> 8cd90e50d140 uart: pl011: Add support to ZTE ZX296702 uart
> 09dcc7dfc05b uart: pl011: Improve LCRH register access decision
> 2c096a9eedc6 uart: pl011: Introduce register look up table
> 7b753f318d14 uart: pl011: Introduce register accessor
> 534e14e2293d uart: pl011: Rename regs with enumeration
>
> (7b753f318d14 being the one breaking everything, but it makes more sense
> to revert the whole series until it is properly fixed and reviewed).
For the reverts (git revert 534e14e2293d~1..8cd90e50d140):
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
We can discuss what could've and should've happened 'til we're blue in
the face but, in the meantime, I'd like my serial console back.
Greg -- any chance you could send these for -rc1, please?
Will
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: earlycon issues in -next with amba-pl011 updates
2015-09-04 11:06 ` Will Deacon
@ 2015-09-04 11:13 ` Russell King - ARM Linux
2015-09-05 14:54 ` Jun Nie
2015-09-04 16:15 ` Greg Kroah-Hartman
1 sibling, 1 reply; 24+ messages in thread
From: Russell King - ARM Linux @ 2015-09-04 11:13 UTC (permalink / raw)
To: Will Deacon
Cc: Marc Zyngier, Greg Kroah-Hartman, Tyler Baker, Leif Lindholm,
linux-serial@vger.kernel.org, Jun Nie,
linux-arm-kernel@lists.infradead.org
On Fri, Sep 04, 2015 at 12:06:52PM +0100, Will Deacon wrote:
> On Thu, Sep 03, 2015 at 05:08:53PM +0100, Marc Zyngier wrote:
> > On 03/09/15 16:52, Greg Kroah-Hartman wrote:
> > > On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
> > >> So -next has now been broken for a while on a number of ARM platforms
> > >> because of this (they simply cannot boot), and no progress has been made
> > >> towards resolving this problem.
> > >>
> > >> Can we please drop this series (at least commits 7b753f3 and following)
> > >> from -next until is has been reworked and reviewed?
> > >
> > > I don't have any patches in my -next tree, everything is in Linus's tree
> > > now. So if I've missed something, or need to revert something, please
> > > let me know specifcally what to do.
> >
> > Gahhh... Given that there is no obvious fix, that the discussion has
> > stalled and that the author of the series is apparently away, the
> > following patches should be reverted:
> >
> > 8cd90e50d140 uart: pl011: Add support to ZTE ZX296702 uart
> > 09dcc7dfc05b uart: pl011: Improve LCRH register access decision
> > 2c096a9eedc6 uart: pl011: Introduce register look up table
> > 7b753f318d14 uart: pl011: Introduce register accessor
> > 534e14e2293d uart: pl011: Rename regs with enumeration
> >
> > (7b753f318d14 being the one breaking everything, but it makes more sense
> > to revert the whole series until it is properly fixed and reviewed).
>
> For the reverts (git revert 534e14e2293d~1..8cd90e50d140):
>
> Acked-by: Will Deacon <will.deacon@arm.com>
> Tested-by: Will Deacon <will.deacon@arm.com>
>
> We can discuss what could've and should've happened 'til we're blue in
> the face but, in the meantime, I'd like my serial console back.
>
> Greg -- any chance you could send these for -rc1, please?
Given the number of reviews the patches went through, I eventually came
to the conclusion that it would be far better if I were to write the
set of patches for the driver - but I haven't had a slot to do that.
I basically stopped reviewing them because I decided it wasn't worth
spending the time anymore on the series. That wasn't an implicit
"I'm happy with the patch set" but more a "I've given up with this
patch set, it's still not up to scratch."
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: earlycon issues in -next with amba-pl011 updates
2015-09-04 11:13 ` Russell King - ARM Linux
@ 2015-09-05 14:54 ` Jun Nie
0 siblings, 0 replies; 24+ messages in thread
From: Jun Nie @ 2015-09-05 14:54 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Marc Zyngier, Greg Kroah-Hartman, Tyler Baker, Will Deacon,
Leif Lindholm, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
2015-09-04 19:13 GMT+08:00 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> On Fri, Sep 04, 2015 at 12:06:52PM +0100, Will Deacon wrote:
>> On Thu, Sep 03, 2015 at 05:08:53PM +0100, Marc Zyngier wrote:
>> > On 03/09/15 16:52, Greg Kroah-Hartman wrote:
>> > > On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
>> > >> So -next has now been broken for a while on a number of ARM platforms
>> > >> because of this (they simply cannot boot), and no progress has been made
>> > >> towards resolving this problem.
>> > >>
>> > >> Can we please drop this series (at least commits 7b753f3 and following)
>> > >> from -next until is has been reworked and reviewed?
>> > >
>> > > I don't have any patches in my -next tree, everything is in Linus's tree
>> > > now. So if I've missed something, or need to revert something, please
>> > > let me know specifcally what to do.
>> >
>> > Gahhh... Given that there is no obvious fix, that the discussion has
>> > stalled and that the author of the series is apparently away, the
>> > following patches should be reverted:
>> >
>> > 8cd90e50d140 uart: pl011: Add support to ZTE ZX296702 uart
>> > 09dcc7dfc05b uart: pl011: Improve LCRH register access decision
>> > 2c096a9eedc6 uart: pl011: Introduce register look up table
>> > 7b753f318d14 uart: pl011: Introduce register accessor
>> > 534e14e2293d uart: pl011: Rename regs with enumeration
>> >
>> > (7b753f318d14 being the one breaking everything, but it makes more sense
>> > to revert the whole series until it is properly fixed and reviewed).
>>
>> For the reverts (git revert 534e14e2293d~1..8cd90e50d140):
>>
>> Acked-by: Will Deacon <will.deacon@arm.com>
>> Tested-by: Will Deacon <will.deacon@arm.com>
>>
>> We can discuss what could've and should've happened 'til we're blue in
>> the face but, in the meantime, I'd like my serial console back.
>>
>> Greg -- any chance you could send these for -rc1, please?
>
> Given the number of reviews the patches went through, I eventually came
> to the conclusion that it would be far better if I were to write the
> set of patches for the driver - but I haven't had a slot to do that.
> I basically stopped reviewing them because I decided it wasn't worth
> spending the time anymore on the series. That wasn't an implicit
> "I'm happy with the patch set" but more a "I've given up with this
> patch set, it's still not up to scratch."
Russell,
Thanks for your time for reviewing that patch set. I did made some
mistake for the register naming for not understand your intention
clearly. I thought reviewing out of date patches also made you
desperate because I update patches frequently. Anyway, the existing
merged patches are made per your suggestion except the bugs. Could you
help comments for the below patch set even they are already merged? So
that I can polish existing code or re-prepare those changes. Or you
have other plan on supporting pl011 controller with different register
mapping? Thanks for you any comments!
http://www.spinics.net/lists/linux-serial/msg18363.html
Jun
>
> --
> FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
> according to speedtest.net.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: earlycon issues in -next with amba-pl011 updates
2015-09-04 11:06 ` Will Deacon
2015-09-04 11:13 ` Russell King - ARM Linux
@ 2015-09-04 16:15 ` Greg Kroah-Hartman
2015-09-04 16:16 ` Will Deacon
1 sibling, 1 reply; 24+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-04 16:15 UTC (permalink / raw)
To: Will Deacon
Cc: Marc Zyngier, Tyler Baker, Leif Lindholm,
linux-serial@vger.kernel.org, Jun Nie,
linux-arm-kernel@lists.infradead.org
On Fri, Sep 04, 2015 at 12:06:52PM +0100, Will Deacon wrote:
> On Thu, Sep 03, 2015 at 05:08:53PM +0100, Marc Zyngier wrote:
> > On 03/09/15 16:52, Greg Kroah-Hartman wrote:
> > > On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
> > >> So -next has now been broken for a while on a number of ARM platforms
> > >> because of this (they simply cannot boot), and no progress has been made
> > >> towards resolving this problem.
> > >>
> > >> Can we please drop this series (at least commits 7b753f3 and following)
> > >> from -next until is has been reworked and reviewed?
> > >
> > > I don't have any patches in my -next tree, everything is in Linus's tree
> > > now. So if I've missed something, or need to revert something, please
> > > let me know specifcally what to do.
> >
> > Gahhh... Given that there is no obvious fix, that the discussion has
> > stalled and that the author of the series is apparently away, the
> > following patches should be reverted:
> >
> > 8cd90e50d140 uart: pl011: Add support to ZTE ZX296702 uart
> > 09dcc7dfc05b uart: pl011: Improve LCRH register access decision
> > 2c096a9eedc6 uart: pl011: Introduce register look up table
> > 7b753f318d14 uart: pl011: Introduce register accessor
> > 534e14e2293d uart: pl011: Rename regs with enumeration
> >
> > (7b753f318d14 being the one breaking everything, but it makes more sense
> > to revert the whole series until it is properly fixed and reviewed).
>
> For the reverts (git revert 534e14e2293d~1..8cd90e50d140):
>
> Acked-by: Will Deacon <will.deacon@arm.com>
> Tested-by: Will Deacon <will.deacon@arm.com>
>
> We can discuss what could've and should've happened 'til we're blue in
> the face but, in the meantime, I'd like my serial console back.
>
> Greg -- any chance you could send these for -rc1, please?
Ok, now reverted, I'll send the pull request later today.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: earlycon issues in -next with amba-pl011 updates
2015-09-04 16:15 ` Greg Kroah-Hartman
@ 2015-09-04 16:16 ` Will Deacon
0 siblings, 0 replies; 24+ messages in thread
From: Will Deacon @ 2015-09-04 16:16 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Marc Zyngier, Tyler Baker, Leif Lindholm,
linux-serial@vger.kernel.org, Jun Nie,
linux-arm-kernel@lists.infradead.org
On Fri, Sep 04, 2015 at 05:15:10PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Sep 04, 2015 at 12:06:52PM +0100, Will Deacon wrote:
> > On Thu, Sep 03, 2015 at 05:08:53PM +0100, Marc Zyngier wrote:
> > > Gahhh... Given that there is no obvious fix, that the discussion has
> > > stalled and that the author of the series is apparently away, the
> > > following patches should be reverted:
> > >
> > > 8cd90e50d140 uart: pl011: Add support to ZTE ZX296702 uart
> > > 09dcc7dfc05b uart: pl011: Improve LCRH register access decision
> > > 2c096a9eedc6 uart: pl011: Introduce register look up table
> > > 7b753f318d14 uart: pl011: Introduce register accessor
> > > 534e14e2293d uart: pl011: Rename regs with enumeration
> > >
> > > (7b753f318d14 being the one breaking everything, but it makes more sense
> > > to revert the whole series until it is properly fixed and reviewed).
> >
> > For the reverts (git revert 534e14e2293d~1..8cd90e50d140):
> >
> > Acked-by: Will Deacon <will.deacon@arm.com>
> > Tested-by: Will Deacon <will.deacon@arm.com>
> >
> > We can discuss what could've and should've happened 'til we're blue in
> > the face but, in the meantime, I'd like my serial console back.
> >
> > Greg -- any chance you could send these for -rc1, please?
>
> Ok, now reverted, I'll send the pull request later today.
Brilliant, thanks Greg.
Will
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: earlycon issues in -next with amba-pl011 updates
2015-09-03 16:08 ` Marc Zyngier
2015-09-03 17:49 ` Peter Hurley
2015-09-04 11:06 ` Will Deacon
@ 2015-09-05 14:42 ` Jun Nie
2015-09-09 19:54 ` Greg Kroah-Hartman
2 siblings, 1 reply; 24+ messages in thread
From: Jun Nie @ 2015-09-05 14:42 UTC (permalink / raw)
To: Marc Zyngier
Cc: Greg Kroah-Hartman, Tyler Baker, linux-arm-kernel, Leif Lindholm,
linux-serial
[-- Attachment #1: Type: text/plain, Size: 3543 bytes --]
2015-09-04 0:08 GMT+08:00 Marc Zyngier <marc.zyngier@arm.com>:
> On 03/09/15 16:52, Greg Kroah-Hartman wrote:
>> On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
>>> On 11/08/15 02:48, Jun Nie wrote:
>>>> 2015-08-11 7:23 GMT+08:00 Leif Lindholm <leif.lindholm@linaro.org>:
>>>>> Hi all,
>>>>>
>>>>> The kernelci.org bot picked up a complete boot failure (no output past
>>>>> UEFI stub) with next-20150806 and Tyler bisected it down to somewhere
>>>>> in
>>>>> 8cd90e5 uart: pl011: Add support to ZTE ZX296702 uart
>>>>> 09dcc7d uart: pl011: Improve LCRH register access decision
>>>>> 2c096a9 uart: pl011: Introduce register look up table
>>>>> 7b753f3 uart: pl011: Introduce register accessor
>>>>>
>>>>> The issue only appears with earlycon on command line, for pl011
>>>>> consoles.
>>>>>
>>>>> Some investigation shows that the cause lies with
>>>>> commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
>>>>> and
>>>>> commit 2c096a9eedc6 ("uart: pl011: Introduce register look up table")
>>>>>
>>>>> Specifically, the changes to pl011_putc() are incorrect:
>>>>> The new pl011_ accessors take a (struct uart_amba_port *) input, but
>>>>> pl011_putc() directly uses the incoming (struct uart_port *) for this.
>>>>>
>>>>> Apart from ending up with an unintended/incorrect UART base address,
>>>>> the introduction of the lookup table for register offsets also means
>>>>> the accessors try to dereference (struct uart_amba_port *)->reg_lut.
>>>>>
>>>>> The below is a hack that shows/resolves the issue, but some
>>>>> refactoring of the original patches might be in order.
>>>>>
>>>>> /
>>>>> Leif
>>>>
>>>> Leif,
>>>>
>>>> Sorry for the inconvenience. I do not have idea of early console till
>>>> now and I always have debug console for early panic debug. Learned
>>>> more from this issue.
>>>>
>>>> Suppose Peter's patch will resolve your issue.
>>>
>>> [+ Greg KH]
>>>
>>> So -next has now been broken for a while on a number of ARM platforms
>>> because of this (they simply cannot boot), and no progress has been made
>>> towards resolving this problem.
>>>
>>> Can we please drop this series (at least commits 7b753f3 and following)
>>> from -next until is has been reworked and reviewed?
>>
>> I don't have any patches in my -next tree, everything is in Linus's tree
>> now. So if I've missed something, or need to revert something, please
>> let me know specifcally what to do.
>
> Gahhh... Given that there is no obvious fix, that the discussion has
> stalled and that the author of the series is apparently away, the
> following patches should be reverted:
Marc,
There had a patch from Peter that revert early console part, which I
thought will be merged to mainline. It's my fault for not fix the bug
on time. Also sorry for late response to you as I took three days
leave.
Could you help test attached patch? Thank you in advance!
Greg,
Would you please hold the merging of revert patches for one or two
days so that the fix can be verified? Thank you!
Jun
>
> 8cd90e50d140 uart: pl011: Add support to ZTE ZX296702 uart
> 09dcc7dfc05b uart: pl011: Improve LCRH register access decision
> 2c096a9eedc6 uart: pl011: Introduce register look up table
> 7b753f318d14 uart: pl011: Introduce register accessor
> 534e14e2293d uart: pl011: Rename regs with enumeration
>
> (7b753f318d14 being the one breaking everything, but it makes more sense
> to revert the whole series until it is properly fixed and reviewed).
>
> Thanks,
>
> M.
> --
> Jazz is not dead. It just smells funny...
[-- Attachment #2: 0001-serial-pl011-Fix-earlycon-register-LUT-breakage.patch --]
[-- Type: text/x-patch, Size: 1981 bytes --]
From fdf1ed2346b12904bcd65a16e33ce12c7d84a2c7 Mon Sep 17 00:00:00 2001
From: Jun Nie <jun.nie@linaro.org>
Date: Sat, 5 Sep 2015 22:32:40 +0800
Subject: [PATCH] serial: pl011: Fix earlycon register LUT breakage
Commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
mistakenly used the register LUT i/o accessors for the pl011
earlycon. Since the port has not been probed at earlycon time,
the struct uart_amba_port (and register LUTs) are uninitialized.
Use direct register addressing for pl011 earlycon; other h/w supported
by the amba-pl011 driver should declare an alternate earlycon.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Jun Nie <jun.nie@linaro.org>
---
drivers/tty/serial/amba-pl011.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 2af09ab..22893d0 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -326,12 +326,6 @@ static void pl011_writew(struct uart_amba_port *uap, int val, int index)
writew_relaxed(val, uap->port.membase + uap->reg_lut[index]);
}
-static void pl011_writeb(struct uart_amba_port *uap, u8 val, int index)
-{
- WARN_ON(index > REG_NR);
- writeb_relaxed(val, uap->port.membase + uap->reg_lut[index]);
-}
-
/*
* Reads up to 256 characters from the FIFO or until it's empty and
* inserts them into the TTY layer. Returns the number of characters
@@ -2351,10 +2345,10 @@ static void pl011_putc(struct uart_port *port, int c)
struct uart_amba_port *uap =
container_of(port, struct uart_amba_port, port);
- while (pl011_readw(uap, REG_FR) & UART01x_FR_TXFF)
+ while (readw_relaxed(port->membase + UART01x_FR) & UART01x_FR_TXFF)
;
- pl011_writeb(uap, c, REG_DR);
- while (pl011_readw(uap, REG_FR) & uap->fr_busy)
+ writeb_relaxed(c, port->membase + UART01x_DR);
+ while (readw_relaxed(port->membase + UART01x_FR) & uap->fr_busy)
;
}
--
1.9.1
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: earlycon issues in -next with amba-pl011 updates
2015-09-05 14:42 ` Jun Nie
@ 2015-09-09 19:54 ` Greg Kroah-Hartman
[not found] ` <CAKU3ayWkXxmF1cp=fOAL6kNKY3wY1u=XhPROKiLqkx4oZ9xZ0g@mail.gmail.com>
0 siblings, 1 reply; 24+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-09 19:54 UTC (permalink / raw)
To: Jun Nie
Cc: Marc Zyngier, Tyler Baker, linux-arm-kernel, Leif Lindholm,
linux-serial
On Sat, Sep 05, 2015 at 10:42:03PM +0800, Jun Nie wrote:
> 2015-09-04 0:08 GMT+08:00 Marc Zyngier <marc.zyngier@arm.com>:
> > On 03/09/15 16:52, Greg Kroah-Hartman wrote:
> >> On Thu, Sep 03, 2015 at 11:23:15AM +0100, Marc Zyngier wrote:
> >>> On 11/08/15 02:48, Jun Nie wrote:
> >>>> 2015-08-11 7:23 GMT+08:00 Leif Lindholm <leif.lindholm@linaro.org>:
> >>>>> Hi all,
> >>>>>
> >>>>> The kernelci.org bot picked up a complete boot failure (no output past
> >>>>> UEFI stub) with next-20150806 and Tyler bisected it down to somewhere
> >>>>> in
> >>>>> 8cd90e5 uart: pl011: Add support to ZTE ZX296702 uart
> >>>>> 09dcc7d uart: pl011: Improve LCRH register access decision
> >>>>> 2c096a9 uart: pl011: Introduce register look up table
> >>>>> 7b753f3 uart: pl011: Introduce register accessor
> >>>>>
> >>>>> The issue only appears with earlycon on command line, for pl011
> >>>>> consoles.
> >>>>>
> >>>>> Some investigation shows that the cause lies with
> >>>>> commit 7b753f318d14 ("uart: pl011: Introduce register accessor")
> >>>>> and
> >>>>> commit 2c096a9eedc6 ("uart: pl011: Introduce register look up table")
> >>>>>
> >>>>> Specifically, the changes to pl011_putc() are incorrect:
> >>>>> The new pl011_ accessors take a (struct uart_amba_port *) input, but
> >>>>> pl011_putc() directly uses the incoming (struct uart_port *) for this.
> >>>>>
> >>>>> Apart from ending up with an unintended/incorrect UART base address,
> >>>>> the introduction of the lookup table for register offsets also means
> >>>>> the accessors try to dereference (struct uart_amba_port *)->reg_lut.
> >>>>>
> >>>>> The below is a hack that shows/resolves the issue, but some
> >>>>> refactoring of the original patches might be in order.
> >>>>>
> >>>>> /
> >>>>> Leif
> >>>>
> >>>> Leif,
> >>>>
> >>>> Sorry for the inconvenience. I do not have idea of early console till
> >>>> now and I always have debug console for early panic debug. Learned
> >>>> more from this issue.
> >>>>
> >>>> Suppose Peter's patch will resolve your issue.
> >>>
> >>> [+ Greg KH]
> >>>
> >>> So -next has now been broken for a while on a number of ARM platforms
> >>> because of this (they simply cannot boot), and no progress has been made
> >>> towards resolving this problem.
> >>>
> >>> Can we please drop this series (at least commits 7b753f3 and following)
> >>> from -next until is has been reworked and reviewed?
> >>
> >> I don't have any patches in my -next tree, everything is in Linus's tree
> >> now. So if I've missed something, or need to revert something, please
> >> let me know specifcally what to do.
> >
> > Gahhh... Given that there is no obvious fix, that the discussion has
> > stalled and that the author of the series is apparently away, the
> > following patches should be reverted:
>
> Marc,
>
> There had a patch from Peter that revert early console part, which I
> thought will be merged to mainline. It's my fault for not fix the bug
> on time. Also sorry for late response to you as I took three days
> leave.
>
> Could you help test attached patch? Thank you in advance!
>
>
> Greg,
>
> Would you please hold the merging of revert patches for one or two
> days so that the fix can be verified? Thank you!
Given that this took way more than a few days, Linus now has the reverts
in his tree. Please feel free to resend the series, in a form that does
not break people's machines, for inclusion in 4.4-rc1.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 24+ messages in thread