Re: Regression: serial: imx: overrun errors on debug UART

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 27, 2023 at 06:11:12PM +0300, Sergey Organov wrote:
> Stefan Wahren <stefan.wahren@xxxxxxxx> writes:
> 
> > Hi,
> >
> > Am 25.03.23 um 16:11 schrieb Uwe Kleine-König:
> 
> [...]
> 
> > today i had time to do some testing. At first i tested with different RXTL_DEFAULT values.
> >
> > 1 No overrun
> > 2 No overrun
> > 4 No overrun
> > 8 Overruns
> >
> > After that i look at the # echo 0 > /proc/sys/kernel/printk approach,
> > but this didn't change anything. The kernel is usually silent about
> > log message after boot and the console works still with echo.
> > Enforcing some driver to call printk periodically would make the
> > console unusuable.
> 
> As you figured that printk() is not the cause, it must be something else
> that causes overruns, so there is no need to check printk case further.
> 
> >
> > Finally i tried to disabled the spin_lock in imx_uart_console_write:
> >
> > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> > index f07c4f9ff13c..c342559ff1a2 100644
> > --- a/drivers/tty/serial/imx.c
> > +++ b/drivers/tty/serial/imx.c
> > @@ -2007,14 +2007,12 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count)
> >  	struct imx_port_ucrs old_ucr;
> >  	unsigned long flags;
> >  	unsigned int ucr1;
> > -	int locked = 1;
> > +	int locked = 0;
> >
> >  	if (sport->port.sysrq)
> >  		locked = 0;
> >  	else if (oops_in_progress)
> >  		locked = spin_trylock_irqsave(&sport->port.lock, flags);
> > -	else
> > -		spin_lock_irqsave(&sport->port.lock, flags);
> >
> >  	/*
> >  	 *	First, save UCR1/2/3 and then disable interrupts
> >
> > But the overruns still occured. Is this because the serial core
> > already helds a lock?
> 
> This probably isn't even called when there is no printk() output, as
> user-space writes to /dev/console are rather performed through regular
> generic code, AFAIK.

Correct on both points.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux