[prev in list] [next in list] [prev in thread] [next in thread]
List: qemu-devel
Subject: Re: [Qemu-devel] [PATCH] PC Chipset: Improve serial divisor calculation
From: Guenter Roeck <linux () roeck-us ! net>
Date: 2018-08-31 23:37:36
Message-ID: 20180831233736.GA10164 () roeck-us ! net
[Download RAW message or body]
Hi,
On Fri, May 11, 2018 at 06:05:44PM -0600, Calvin Lee wrote:
> This fixes several problems I found in the UART serial implementation.
> Now all divisor values are allowed, while before divisor values of zero
> and below the base baud rate were rejected. All changes are in reference
> to http://www.sci.muni.cz/docs/pc/serport.txt
>
This patch is causing tracebacks in all Linux kernels running the PXA serial
driver. Here is an example:
[ 1.907584] ------------[ cut here ]------------
[ 1.907805] WARNING: CPU: 0 PID: 1 at drivers/tty/serial/pxa.c:544 serial_pxa_set_termios+0x254/0x268
[ 1.907865] Modules linked in:
[ 1.908130] CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.125-rc1-00067-g7236e21 #1
[ 1.908155] Hardware name: Zipit Z2
[ 1.908783] [<c0011f54>] (unwind_backtrace) from [<c000e9ac>] (show_stack+0x20/0x24)
[ 1.908846] [<c000e9ac>] (show_stack) from [<c029aa80>] (dump_stack+0x20/0x28)
[ 1.908877] [<c029aa80>] (dump_stack) from [<c002befc>] (__warn+0xec/0x114)
[ 1.908905] [<c002befc>] (__warn) from [<c002bff4>] (warn_slowpath_null+0x30/0x38)
[ 1.908931] [<c002bff4>] (warn_slowpath_null) from [<c033eeb4>] (serial_pxa_set_termios+0x254/0x268)
[ 1.908958] [<c033eeb4>] (serial_pxa_set_termios) from [<c0339b00>] (uart_set_options+0xc8/0xf0)
[ 1.908987] [<c0339b00>] (uart_set_options) from [<c0712200>] (serial_pxa_console_setup+0xb4/0xc4)
...
The patch results in an unexpected DLL register value. Here is the
surrounding code from drivers/tty/serial/pxa.c:
serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */
/*
* work around Errata #75 according to Intel(R) PXA27x
* Processor Family Specification Update (Nov 2005)
*/
dll = serial_in(up, UART_DLL);
WARN_ON(dll != (quot & 0xff)); // <-- warning
Reverting the patch fixes the problem.
Guenter
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic