From patchwork Thu May 19 18:01:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 798272 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4JI2EOS022797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 May 2011 18:02:39 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1QN7Xv-0005rC-Di; Thu, 19 May 2011 18:02:03 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1QN7Xu-0005qv-0Q for spi-devel-general@lists.sourceforge.net; Thu, 19 May 2011 18:02:02 +0000 X-ACL-Warn: Received: from eu1sys200aog119.obsmtp.com ([207.126.144.147]) by sog-mx-1.v43.ch3.sourceforge.com with smtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1QN7Xs-0007T0-Su for spi-devel-general@lists.sourceforge.net; Thu, 19 May 2011 18:02:01 +0000 Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob119.postini.com ([207.126.147.11]) with SMTP ID DSNKTdVbDLURihmpa88FoILYsYOq+NfWGNZT@postini.com; Thu, 19 May 2011 18:02:00 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 000183C; Thu, 19 May 2011 18:01:32 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 6945D61; Thu, 19 May 2011 18:01:32 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id D44FBA8065; Thu, 19 May 2011 20:01:24 +0200 (CEST) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Thu, 19 May 2011 20:01:32 +0200 From: Linus Walleij To: Grant Likely , Subject: [PATCH] spi/pl022: use cpu_relax in the busy loop Date: Thu, 19 May 2011 20:01:25 +0200 Message-ID: <1305828085-25135-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.3.2 MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1QN7Xs-0007T0-Su Cc: Linus Walleij , Lee Jones , Linus Walleij , linux-arm-kernel@lists.infradead.org X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 19 May 2011 18:02:39 +0000 (UTC) This relaxes the cpu in the polling busy-wait loop. Reported-by: Vitaly Wool Signed-off-by: Linus Walleij --- drivers/spi/amba-pl022.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index 18667de..8a2b88a 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c @@ -1424,6 +1424,7 @@ static void do_polling_transfer(struct pl022 *pl022) message->state = STATE_ERROR; goto out; } + cpu_relax(); } /* Update total byte transferred */