From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 147D8C76195 for ; Mon, 27 Mar 2023 15:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uOghsveb+y2cPf2rI55JsmNPeM18c7uK8jR1mTnuvFw=; b=JgCIxQufcySTxG JDzMRJQ6Cdf9D/Ggtrf0xoy2/BPVGVwFX5W07dhnfJHb4aM87C1qBsoYw6/FGp6jMhYYjzYabIqEO zOtNn5HCpPJA/duvgkYKfmsSsrpnn16g7yf7G5Mpo+tMHetnUFiJ5YzyngWQ1QYHJeLBtzFlhAcni wpdrTQnAKZaYkb0YeSYNpD8A6RvC/lyKpH4B+olDQsHQbyExxaO9Wl00idrYkDFUjzp00EU00aAX8 WyxRu4aV47Wc9hA76X5Ulnf3sI3Qj7yYK/r9dGarT5T3xQaz52n+KR8seA0OnECCe0w110eL51jVK kSWw02zBqOn3Jg+LazKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgooF-00BWsp-24; Mon, 27 Mar 2023 15:30:59 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgooC-00BWqZ-1G for linux-arm-kernel@lists.infradead.org; Mon, 27 Mar 2023 15:30:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7DkARw+ftkstubVefFishH1SCvWJh4z6LhiWzva17m0=; b=kfD67yfU5XGzBfYkoWPJRjxQfM wVG0/RGPkfAWY94c95EKHuSxvW0Q07klCmjq8JSQSihSyLz+KNUTrflcQiLdHe7tbqMkrfgEsBxGv v3fAz00XwMBqmQ3/s1FHLRPrOcZQioOObbRtb1Yll8IRpt0Yzuri9zPRjYZclewMZSVuDc1rL2wb6 tFcP/RtwzKvJcym3O0EAs1jrQNtEHfk4DP0T1gRB+QPSEgy1emq4l1GJ2IsfGHYcodWUX5hC/liYp hL8ivwDbImzdfxhOdMf2kyC5eqrCvz2BGxVlMnDhluCSekr05pG/asgR/JaKeSzBpg3P1Z4bADNBC 3xzuPRgg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:46212) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pgonw-00044t-Ht; Mon, 27 Mar 2023 16:30:40 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pgont-0005XF-Fo; Mon, 27 Mar 2023 16:30:37 +0100 Date: Mon, 27 Mar 2023 16:30:37 +0100 From: "Russell King (Oracle)" To: Sergey Organov Cc: Stefan Wahren , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Fabio Estevam , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Stefan Wahren , linux-serial@vger.kernel.org, Greg Kroah-Hartman , Sascha Hauer , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , Jiri Slaby , Tomasz =?utf-8?Q?Mo=C5=84?= , Linux ARM Subject: Re: Regression: serial: imx: overrun errors on debug UART Message-ID: References: <2c29454b-9369-4360-8eb4-c151f59460cb@i2se.com> <9e22f237-f3ee-0415-9e6b-89a137769b8f@i2se.com> <5d59dec6-9f6f-7b20-1221-f57c94b29cca@i2se.com> <20230325151100.mskydt3hwbnspqp4@pengutronix.de> <87mt3ynsa7.fsf@osv.gnss.ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87mt3ynsa7.fsf@osv.gnss.ru> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230327_083056_428658_44AF3830 X-CRM114-Status: GOOD ( 23.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 27, 2023 at 06:11:12PM +0300, Sergey Organov wrote: > Stefan Wahren writes: > = > > Hi, > > > > Am 25.03.23 um 16:11 schrieb Uwe Kleine-K=F6nig: > = > [...] > = > > today i had time to do some testing. At first i tested with different R= XTL_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, cons= t char *s, unsigned int count) > > struct imx_port_ucrs old_ucr; > > unsigned long flags; > > unsigned int ucr1; > > - int locked =3D 1; > > + int locked =3D 0; > > > > if (sport->port.sysrq) > > locked =3D 0; > > else if (oops_in_progress) > > locked =3D 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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel