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 X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31314C433B4 for ; Thu, 13 May 2021 01:36:43 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A701F613BD for ; Thu, 13 May 2021 01:36:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A701F613BD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:Cc:To:From:Date:References:In-Reply-To: Message-Id:Mime-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ctncjQPbvw6tQivvs8u0tbIbvOOrLQUjrvQo13vhuCA=; b=a5GHq6fgu3XBOJp27ky9VnqfR Q2+950GezS//e7dnYJ+mKPzOw6ckjerHs+EtUa5nNircp7ILNP7dqQ+vIgQGLx0hgCCI1pZ5awPD0 0pfoK3Qv1q6TTBWDJ4ryYNs3mldgxtI/P37ybGE9F9KK09GXDipz+zspHUA6keL4xTDv0L/qBNCtU zpsCkoKdFwcpVYLy9O7vSv6LXjTZ80vwN4aBj7TP70xLULzh/eQgh49DReGDxX5EevxJ/P+1jIqnE Ak+XJyTZ1UCYFZ6D/67EtrmD1f1FRRXqbOW7Io2PUiLuyQta44idfoKdaI5kmZCOnsekr0xLRL1yi JehiqCXoQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lh0FK-004OTC-Ru; Thu, 13 May 2021 01:34:39 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lh0FH-004OSx-BA for linux-arm-kernel@desiato.infradead.org; Thu, 13 May 2021 01:34:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Subject:Cc:To:From:Date: References:In-Reply-To:Message-Id:Mime-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SWVR8Emae5xp73d7j3kk9BUVMAV+TJPpcPLvVYttHEI=; b=ADNhQjyVBs07v0Zz8dhMHtF32Y FXt1yzKEI9yshxSNtS19GQVdMsvUvFOIgZA+0Np6NlSR7zxKyUXwi6Ho4IvkVnhf8UyRqN8vW3tnz CRFH3Nmk28JW3lvCrBaIi60MW0eqsdQkKoNnuVQu/bBSXjnbGbYTxcw9seRxU2CNAzMiTyFEx5uvq jy7LxJ7yVGzFZYnksVs8ZVjIIsz3EjDmPeCBpcpJ30Sizgbm2Ov3p4CuPWfJMylUuIbwzSkOmFfjl +lyZLekWBAbGnC7rA3Jf+Sj6WJvXkMJgB1q4uW6usRsz6qAn+Sy/VZ1iyr8rEzIvAaaPIoz2PQY3a pm/lwe7g==; Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lh0FE-00AxQg-JS for linux-arm-kernel@lists.infradead.org; Thu, 13 May 2021 01:34:34 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.west.internal (Postfix) with ESMTP id 7E1A01FDC; Wed, 12 May 2021 21:34:28 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute3.internal (MEProxy); Wed, 12 May 2021 21:34:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm2; bh=SWVR8Emae5xp73d7j3kk9BUVMAV+TJP pcPLvVYttHEI=; b=QYAPy4NFRvDeoipjFKZtMfKy7SsQAQAdE1qgEDJXLKBP1u6 4kWpDvtUQgvtcN4I9v1YpdLFW36cLnrUZij45Pf5J9CzXAZ2si7rGkDAbaBN4zAV 8zm/LJ6KJodfkRYB8qK9VRGjKmnYmSG7QrbEMaHF8RnQc8t13dxz0wHXHNnch+RF aHa6u7WLlq68BdFIehVaGSDXSHTzION+Ve+4rZ3DOJV3Ael5nbqHDfF6sayl7FZO rOkmKXt5nbRnZrog4uXLLI46L+WA/t+2enI0YBA0d43IY+OVpMg3V/XWHOOzw9/4 XLD3A7kgySSTlMHohjN6Gn16/WBQ4aENriPZ1ww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=SWVR8E mae5xp73d7j3kk9BUVMAV+TJPpcPLvVYttHEI=; b=r3b7d7XKm3AEANfyaa0MPq oTUBY1VA3eRDIwVUQFHjdizMuFd0fQc6xHCqzkA31DX/ufrEr5ZYb0sMYcbhfPPh 23u8qUe1lm4udWmxpkQBJeUw1OE++AG7uXHtjfLX8VkAD6gXvBxAF6yptIToSmSR lHsOtSsOC0iGaXvU3nuHbOQgqXGWUKV+pM+5L6Cu0PxPsGzfXIxotlvdjZnMtOzK aDGYo8gDNq2yoHCBEHq8FjH4MAf9zvZJXjBLjtowVlqyQoTWPQ/C/T0ZvKe2oO3I NLbwuykJWcgAO+Sxbh+ow1cZ7p0ZXH2mh76OdfqTZqiQ/p1eWVfA25k+kIQt6mRA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdehfedggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdetnhgu rhgvficulfgvfhhfvghrhidfuceorghnughrvgifsegrjhdrihgurdgruheqnecuggftrf grthhtvghrnhepudehtddtleektedvfeeitdeljeekveelkeegvdfhtdejhefgfedtfedv jeejledtnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id B0692A00079; Wed, 12 May 2021 21:34:26 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-448-gae190416c7-fm-20210505.004-gae190416 Mime-Version: 1.0 Message-Id: <6d4338e2-d9be-411a-aeb7-7d46121b73d4@www.fastmail.com> In-Reply-To: <20210510014231.647-3-zev@bewilderbeest.net> References: <20210510014231.647-1-zev@bewilderbeest.net> <20210510014231.647-3-zev@bewilderbeest.net> Date: Thu, 13 May 2021 11:04:06 +0930 From: "Andrew Jeffery" To: "Zev Weiss" , "Greg Kroah-Hartman" , "Jeremy Kerr" Cc: openbmc@lists.ozlabs.org, "Jiri Slaby" , "Joel Stanley" , "Johan Hovold" , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: =?UTF-8?Q?Re:_[PATCH_2/3]_serial:_8250=5Faspeed=5Fvuart:_initialize_vuar?= =?UTF-8?Q?t->port_in_aspeed=5Fvuart=5Fprobe()?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_183432_683084_AFE401B8 X-CRM114-Status: GOOD ( 16.52 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 10 May 2021, at 11:12, Zev Weiss wrote: > Previously this had only been initialized if we hit the throttling path > in aspeed_vuart_handle_irq(); moving it to the probe function is a > slight consistency improvement and avoids redundant reinitialization in > the interrupt handler. It also serves as preparation for converting the > driver's I/O accesses to use port->port.membase instead of its own > vuart->regs. > > Signed-off-by: Zev Weiss > --- > drivers/tty/serial/8250/8250_aspeed_vuart.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/tty/serial/8250/8250_aspeed_vuart.c > b/drivers/tty/serial/8250/8250_aspeed_vuart.c > index 9e8b2e8e32b6..249164dc397b 100644 > --- a/drivers/tty/serial/8250/8250_aspeed_vuart.c > +++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c > @@ -349,11 +349,9 @@ static int aspeed_vuart_handle_irq(struct > uart_port *port) > struct aspeed_vuart *vuart = port->private_data; > __aspeed_vuart_set_throttle(up, true); > > - if (!timer_pending(&vuart->unthrottle_timer)) { > - vuart->port = up; > + if (!timer_pending(&vuart->unthrottle_timer)) > mod_timer(&vuart->unthrottle_timer, > jiffies + unthrottle_timeout); > - } > > } else { > count = min(space, 256); > @@ -511,6 +509,7 @@ static int aspeed_vuart_probe(struct platform_device *pdev) > goto err_clk_disable; > > vuart->line = rc; > + vuart->port = serial8250_get_port(vuart->line); The documentation of serial8250_get_port() is somewhat concerning wrt the use: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/8250/8250_core.c?h=v5.13-rc1#n399 However, given the existing behaviour it shouldn't be problematic? Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel