diff options
| author | Pali Rohár <[email protected]> | 2021-09-27 11:37:04 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2021-10-05 15:02:58 +0200 |
| commit | 32262e2e429cdb31f9e957e997d53458762931b7 (patch) | |
| tree | 70a666e9895aba562b6910e876383e2feb29391d /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 027b57170bf8bb6999a28e4a5f3d78bf1db0f90c (diff) | |
serial: 8250: Fix reporting real baudrate value in c_ospeed field
In most cases it is not possible to set exact baudrate value to hardware.
So fix reporting real baudrate value which was set to hardware via c_ospeed
termios field. It can be retrieved by ioctl(TCGETS2) from userspace.
Real baudrate value is calculated from chosen hardware divisor and base
clock. It is implemented in a new function serial8250_compute_baud_rate()
which is inverse of serial8250_get_divisor() function.
With this change is fixed also UART timeout value (it is updated via
uart_update_timeout() function), which is calculated from the now fixed
baudrate value too.
Cc: [email protected]
Signed-off-by: Pali Rohár <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions