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: 1545 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:52:53 -0000 Delivered-To: patches@linaro.org Received: by 10.224.54.134 with SMTP id q6cs126277qag; Thu, 19 May 2011 11:02:02 -0700 (PDT) Received: by 10.14.4.35 with SMTP id 35mr1260222eei.100.1305828120879; Thu, 19 May 2011 11:02:00 -0700 (PDT) Received: from eu1sys200aog119.obsmtp.com (eu1sys200aog119.obsmtp.com [207.126.144.147]) by mx.google.com with SMTP id v59si7129019eev.68.2011.05.19.11.01.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 May 2011 11:02:00 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.147 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.147; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.147 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com 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 , Cc: , Lee Jones , Linus Walleij , Linus Walleij 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 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 */