Implement 'poll_put_char' and 'poll_get_char' callbacks in struct
'owl_uart_ops' that enables OWL UART to be used for kernel debugging
over serial line.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
Changes in v2:
- Reverted unnecessary changes per Andreas feedback
- Optimized implementation for 'owl_uart_poll_get_char()'
and 'owl_uart_poll_put_char()' callbacks
drivers/tty/serial/owl-uart.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
On Tue, Jan 05, 2021 at 07:02:02PM +0200, Cristian Ciocaltea wrote:
quoted hunk
Implement 'poll_put_char' and 'poll_get_char' callbacks in struct
'owl_uart_ops' that enables OWL UART to be used for kernel debugging
over serial line.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
Changes in v2:
- Reverted unnecessary changes per Andreas feedback
- Optimized implementation for 'owl_uart_poll_get_char()'
and 'owl_uart_poll_put_char()' callbacks
drivers/tty/serial/owl-uart.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
Unbounded loops? What could possibly go wrong?
:(
Please don't do that in the kernel, put a max bound on this.
And are you _SURE_ that cpu_relax() is what you want to call here?
thanks,
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Greg,
Thank you for the review!
On Thu, Jan 07, 2021 at 04:20:55PM +0100, Greg Kroah-Hartman wrote:
On Tue, Jan 05, 2021 at 07:02:02PM +0200, Cristian Ciocaltea wrote:
quoted
Implement 'poll_put_char' and 'poll_get_char' callbacks in struct
'owl_uart_ops' that enables OWL UART to be used for kernel debugging
over serial line.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Hi Greg,
Thank you for the review!
On Thu, Jan 07, 2021 at 04:20:55PM +0100, Greg Kroah-Hartman wrote:
quoted
On Tue, Jan 05, 2021 at 07:02:02PM +0200, Cristian Ciocaltea wrote:
quoted
Implement 'poll_put_char' and 'poll_get_char' callbacks in struct
'owl_uart_ops' that enables OWL UART to be used for kernel debugging
over serial line.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Unbounded loops? What could possibly go wrong?
:(
Please don't do that in the kernel, put a max bound on this.
I didn't realize the issue since I had encountered this pattern in many
other serial drivers, as well: altera_uart, arc_uart, atmel_serial, etc.
quoted
And are you _SURE_ that cpu_relax() is what you want to call here?
I'm thinking of replacing the loop with 'readl_poll_timeout_atomic()',
if that would be a better approach.
It might be better, yes. Either way, if you add a bound to the loop, you
definitely need a more precise timing, so ndelay/udelay instead of
cpu_relax.
thanks,
--
js
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Fri, Jan 08, 2021 at 08:58:38AM +0100, Jiri Slaby wrote:
On 07. 01. 21, 19:16, Cristian Ciocaltea wrote:
quoted
Hi Greg,
Thank you for the review!
On Thu, Jan 07, 2021 at 04:20:55PM +0100, Greg Kroah-Hartman wrote:
quoted
On Tue, Jan 05, 2021 at 07:02:02PM +0200, Cristian Ciocaltea wrote:
quoted
Implement 'poll_put_char' and 'poll_get_char' callbacks in struct
'owl_uart_ops' that enables OWL UART to be used for kernel debugging
over serial line.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>