From patchwork Wed Apr 19 06:06:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaewon Kim X-Patchwork-Id: 13216429 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 62D92C77B7A for ; Wed, 19 Apr 2023 06:29:11 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5ttPGqsqpmlO9yq5LIurI10BIKT3QSDpjzqbX86KLXc=; b=Ycl0oaEneWXQic wm7LjusqxX4Wg0J0kSlRk3XE/NSWmB5Yd6Oss8wpfMd36t3E8V2kqV64vdqkVUfthGT5bTNl+Z+r2 VQA2hDJWx/XQr6V3J/ubRvgCEHyBORixGCRZZeVz8z+nirNemGLeNJELKotaCn7kADycln48bcYrU ernjhP9t95nAggQnUc1EYTTcj5GlXPxKK07/evubnm8hhjxtupAXsNrXQB3WrRJj83HIGjVda2USl yR/jf1wESzJaiEPxPnGli/SNFPjVaVUMZaoj+rMI+7E4UwYhvcecNIoCD7y5eODbJGRUqx+35ZXRG VSIq3/eFQy1SPEBHw+Uw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pp1Ij-004EZw-2J; Wed, 19 Apr 2023 06:28:21 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pp1IS-004EKG-1f for linux-arm-kernel@lists.infradead.org; Wed, 19 Apr 2023 06:28:09 +0000 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230419062756epoutp030e19cb1e7081ef82d27ef8ef7750e4bd~XQhy1YNfo1184111841epoutp03e for ; Wed, 19 Apr 2023 06:27:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230419062756epoutp030e19cb1e7081ef82d27ef8ef7750e4bd~XQhy1YNfo1184111841epoutp03e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1681885676; bh=ObxsSdFs5WAZmJuj7FAlx5qDmt4YK3vF0QVFupjZfVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sc2jvlC7tADiI79yZ+c6ZmOWPdgqYRpnS2snzVpwArhlcHGgAhW9DWc2lL0+hS/wN gM4n4aBZrYSlTAM+4tFAh/KNxI6sYfQeu0xbZxuKq8qSleFC8fMOwPf0O+nrEdmd+h K6Jiljp+U6JGb5qazlaLkZBUUVsl2ItybK+vlWYo= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230419062756epcas2p370909a87da2f81f7461caa8c89808af4~XQhyXBwTY0412704127epcas2p3g; Wed, 19 Apr 2023 06:27:56 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.88]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4Q1W7J0YsQz4x9Q8; Wed, 19 Apr 2023 06:27:56 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 84.C2.09961.BE98F346; Wed, 19 Apr 2023 15:27:55 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20230419062755epcas2p43a646bbae5f01e3120331407ad873318~XQhxQbeOd2842728427epcas2p4Q; Wed, 19 Apr 2023 06:27:55 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230419062755epsmtrp177357b9586a7d9848c0d786aabf99ca1~XQhxPur2P2169721697epsmtrp1F; Wed, 19 Apr 2023 06:27:55 +0000 (GMT) X-AuditID: b6c32a45-e13fa700000026e9-54-643f89ebed4f Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 41.71.08609.BE98F346; Wed, 19 Apr 2023 15:27:55 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.55]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230419062755epsmtip2b08d471e899b00fb8fd358f6a2225488~XQhxDWS_G0394003940epsmtip2W; Wed, 19 Apr 2023 06:27:54 +0000 (GMT) From: Jaewon Kim To: Mark Brown , Krzysztof Kozlowski , Andi Shyti , Alim Akhtar Cc: linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chanho Park , Jaewon Kim Subject: [PATCH v2 2/4] spi: s3c64xx: add cpu_relax in polling loop Date: Wed, 19 Apr 2023 15:06:37 +0900 Message-Id: <20230419060639.38853-3-jaewon02.kim@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230419060639.38853-1-jaewon02.kim@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHKsWRmVeSWpSXmKPExsWy7bCmme7rTvsUgx/95hYP5m1js1j84zmT xdSHT9gsLu/XttjRcITVYu/rrewWmx5fY7W4vGsOm8WM8/uYLBo/3mR34PK4vuQTs8emVZ1s Hneu7WHz2L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OOhkAIsSS3FGoqEWc1FxIgBDKjD/AQQAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJLMWRmVeSWpSXmKPExsWy7bCSvO7rTvsUg+dtnBYP5m1js1j84zmT xdSHT9gsLu/XttjRcITVYu/rrewWmx5fY7W4vGsOm8WM8/uYLBo/3mR34PK4vuQTs8emVZ1s Hneu7WHz2Lyk3qNvyypGj8+b5ALYorhsUlJzMstSi/TtErgyWv58YirYxVrxaek5pgbGoyxd jJwcEgImEj+aWxi7GLk4hAR2MErcm3uSHSIhI7H8WR8bhC0scb/lCCtE0XtGiWPPv4MVsQlo S3xfv5gVxBYRWMoocbNbCqSIWeAeo8TLSd+Yuhg5OIQFnCXO3ACrYRFQlWjcvowRxOYVsJWY fewOK8QCeYnVGw4wg9icAnYSCz9dA1ssBFSze95b9gmMfAsYGVYxSqYWFOem5xYbFhjlpZbr FSfmFpfmpesl5+duYgSHppbWDsY9qz7oHWJk4mA8xCjBwawkwnvG1SpFiDclsbIqtSg/vqg0 J7X4EKM0B4uSOO+FrpPxQgLpiSWp2ampBalFMFkmDk6pBqZOjsLiGv0T90OLv2o5JnotP+lh xCnOnf9wT3+zb2+41NziGs4b8Sw+HBP4fM5+Tt13rT7D4Uzf9MVPXs4R+j5Z4BjnnftWHTab 5wUruPLOuP1l04S6H9dCWD+6LGVXExabLDJn0fH3t26ffLL24SZZn9SQa5fmS583Whcx5c4h Awam0oiEsnzjB0yhzMyLLjG3TH1o/JOFucJ+4jTW93Vqmzm4fA7LpTv99nx39uLh5TZznR4m WmWeu/CPW0T9X9ymn1U//69vyhIvC5i5+6lNjkRHW9rJbZ/9S2S3CZb/Wbvjxtz6HL6AvACZ 4w1LTJe/qf6/wUpo87r38+/WGVx92RRwOzXk04miRK/a0GYlluKMREMt5qLiRAA82Q5OvAIA AA== X-CMS-MailID: 20230419062755epcas2p43a646bbae5f01e3120331407ad873318 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230419062755epcas2p43a646bbae5f01e3120331407ad873318 References: <20230419060639.38853-1-jaewon02.kim@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230418_232805_225614_5D88B3C9 X-CRM114-Status: GOOD ( 14.11 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Adds cpu_relax() to prevent long busy-wait. There is busy-wait loop to check data transfer completion in polling mode. Signed-off-by: Jaewon Kim --- drivers/spi/spi-s3c64xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 273aa02322d9..886722fb40ea 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -568,6 +568,7 @@ static int s3c64xx_wait_for_pio(struct s3c64xx_spi_driver_data *sdd, val = msecs_to_loops(ms); do { + cpu_relax(); status = readl(regs + S3C64XX_SPI_STATUS); } while (RX_FIFO_LVL(status, sdd) < xfer->len && --val);