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 A39DCC004D4 for ; Wed, 18 Jan 2023 08:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:Message-ID:In-Reply-To:Subject:cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nZDYcbB6VpzbG3Loc4yw8gPKs1Q7OD62tQvPPB0lrjk=; b=uEuMG7gPO+Sa+6++MwJquKJo6E +P2J0IsJ0LGUZVwIaW+qslBg5KSgHV5j0yVj3P7YYd3Elr04ErLFbxMdkEFdm7h8z+mbeVaxkwEAg kxrNgt8t0Pw4hpdUGaS0Yo0BgTU89xQMMoFNv6x2ngFs0ZssJMMgoO7jk0HAw7ex3USJUzAtWcZbB BIr84uZeOOkhUIb/e86dkVYxTrsuL3aNr6jPe6IcgRu7mQg2aK90wdLc28oHZHVRTRsJZ7wN8JhtV fPGbLn34pJQfkWWtTSZzbzU4IBRH1kn9kGBAkWU1/7pkejB25+7re5T1cwOSZU/0h0wykHd7ANbQI zuk3T63g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI3kW-00HS5Z-AW; Wed, 18 Jan 2023 08:24:48 +0000 Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI3kT-00HS4S-2X for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 08:24:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674030285; x=1705566285; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=l1XGIRfaiSIlolBp2oAHC+BjoQuaTxgOpCiszr+mW5k=; b=jL21zUUT5nrq592A55fd7W+8VWDA83XHBojeVb2y11Oo17UcVpR0U0y6 L5I2H6F151qaAyTdG+BBnIjgudkfPb96b2ChmhtOCLgPrQTK+iSJcWViY SI401hd4M9lue0//y0nRxGl4+GtSMXLES/t9LWJQ93zZo5bk6g69kdyDX nLkWAfIKaV0zUnqE9jwqk9NqsdoaQWm5fwRdHnCY7XizzuRbLNsE5YXuS wSdDt0uxf3mtEheeBSpAj6W/EEswN7+rFCvv/E0J6d7ByUBWjkqTHTWCn OVzdw/4bL0Q907JwDB5k0+3M4HZbMrAUjv77k+elzQSheNvqCHzNVxtnB A==; X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="411169669" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="411169669" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 00:24:38 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="783581830" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="783581830" Received: from triebel-mobl.ger.corp.intel.com ([10.252.53.190]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 00:24:16 -0800 Date: Wed, 18 Jan 2023 10:24:13 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Sergey Organov cc: linux-serial , Fabio Estevam , Greg Kroah-Hartman , Jiri Slaby , Richard Genoud , Sascha Hauer , Shawn Guo , Tim Harvey , =?ISO-8859-2?Q?Tomasz_Mo=F1?= , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Pengutronix Kernel Team Subject: Re: [PATCH 7/8] serial: imx: use readl() to optimize FIFO reading loop In-Reply-To: <87lem12h0k.fsf@osv.gnss.ru> Message-ID: References: <87bko4e65y.fsf@osv.gnss.ru> <20230113184334.287130-1-sorganov@gmail.com> <20230113184334.287130-8-sorganov@gmail.com> <48ba84e3-7f52-9cfb-426a-a432587c1c9@linux.intel.com> <87lem12h0k.fsf@osv.gnss.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-2051941270-1674030261=:2364" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230118_002445_143680_9F02DF80 X-CRM114-Status: GOOD ( 21.13 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-2051941270-1674030261=:2364 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Tue, 17 Jan 2023, Sergey Organov wrote: > Ilpo Järvinen writes: > > > On Fri, 13 Jan 2023, Sergey Organov wrote: > > > >> Use readl() instead of heavier imx_uart_readl() in the Rx ISR, as we know > >> we read registers that must not be cached. > >> > >> Signed-off-by: Sergey Organov > >> --- > >> drivers/tty/serial/imx.c | 5 +++-- > >> 1 file changed, 3 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > >> index be00362b8b67..f4236e8995fa 100644 > >> --- a/drivers/tty/serial/imx.c > >> +++ b/drivers/tty/serial/imx.c > >> @@ -890,14 +890,15 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) > >> struct imx_port *sport = dev_id; > >> unsigned int rx, flg; > >> struct tty_port *port = &sport->port.state->port; > >> + typeof(sport->port.membase) membase = sport->port.membase; > >> u32 usr2; > >> > >> /* If we received something, check for 0xff flood */ > >> - usr2 = imx_uart_readl(sport, USR2); > >> + usr2 = readl(membase + USR2); > >> if (usr2 & USR2_RDR) > >> imx_uart_check_flood(sport, usr2); > >> > >> - while ((rx = imx_uart_readl(sport, URXD0)) & URXD_CHARRDY) { > >> + while ((rx = readl(membase + URXD0)) & URXD_CHARRDY) { > >> flg = TTY_NORMAL; > >> sport->port.icount.rx++; > > > > I'd just make a uport local variable and use uport->membase + xx. There > > are plenty of sport->port constructs to replace with uport in that > > function anyway. > > OK, thanks, will do it this way. Probably with global rename over this > function in a separate patch? Yes, it is better to have it in own patch. -- i. --8323329-2051941270-1674030261=:2364 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --8323329-2051941270-1674030261=:2364--