From patchwork Mon Jan 21 12:09:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 2011951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 7A0F93FD1A for ; Mon, 21 Jan 2013 12:17:43 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TxGGt-0003yP-Rm; Mon, 21 Jan 2013 12:14:39 +0000 Received: from mail-ee0-f42.google.com ([74.125.83.42]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TxGCQ-0000SR-Qf for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2013 12:10:04 +0000 Received: by mail-ee0-f42.google.com with SMTP id b47so2902039eek.29 for ; Mon, 21 Jan 2013 04:09:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=86cnQqTsr6m+OELYZ1JEQisIde4DVlBInLBBLBpyJSM=; b=MJDfynO23BKBllLHensQImm/9oXvkvVRRJnhFNpGLSZ261LpgiOhmCnahwpTrAxXqo hMDJOw5HZ2h4WQaZkZmBXdPdr+oJPh/XjkMfH10cYJk45Dyhsdukb5aRQWCYfH8EN3A3 IqcQIqAb3tdNv3aLARznwkd0PhUBFeqrWEDmb3D3U7PBKixM4lGwwsqEepAhqdfD6uC7 Y3hPf21gUpnW93eC7RYW2TUDMQ9PyvcpsupU7K+ve64y9YvIGdAbwYurpyBBgxW5LfPy V1A5ipJQ2g3pO2oT50/tqAD/TP7XUjVHJRquAz1p5ogZhde1T72+sLUICmo9tD6abCKV 4Pag== X-Received: by 10.14.224.8 with SMTP id w8mr54080205eep.18.1358770193145; Mon, 21 Jan 2013 04:09:53 -0800 (PST) Received: from localhost ([2a01:2029:1:1653:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id e2sm22028365eeo.8.2013.01.21.04.09.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 21 Jan 2013 04:09:52 -0800 (PST) From: Fabio Baltieri To: Linus Walleij , John Stultz , Thomas Gleixner Subject: [PATCH 1/2] clocksource: dbx500-prcmu: use relaxed readl variant Date: Mon, 21 Jan 2013 13:09:31 +0100 Message-Id: <1358770172-30125-1-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.7.12.1 X-Gm-Message-State: ALoCoQkEI/CEjouGtbQ98FEUAJH3vnIfVQWMFZeXPV0MCL0iA0bmClvVpTJx/nqIzh/kjBzPboBo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130121_071003_107001_9BA19372 X-CRM114-Status: UNSURE ( 9.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.42 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Fabio Baltieri , Rabin Vincent , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Rabin Vincent Modify clksrc_dbx500_prcmu_read to replace readl() with readl_relaxed(). This speeds up calls to the function by about 40%. Signed-off-by: Rabin Vincent Acked-by: Linus Walleij Signed-off-by: Fabio Baltieri --- drivers/clocksource/clksrc-dbx500-prcmu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c index c26c369..159f54a 100644 --- a/drivers/clocksource/clksrc-dbx500-prcmu.c +++ b/drivers/clocksource/clksrc-dbx500-prcmu.c @@ -33,15 +33,14 @@ static void __iomem *clksrc_dbx500_timer_base; -static cycle_t clksrc_dbx500_prcmu_read(struct clocksource *cs) +static cycle_t notrace clksrc_dbx500_prcmu_read(struct clocksource *cs) { + void __iomem *base = clksrc_dbx500_timer_base; u32 count, count2; do { - count = readl(clksrc_dbx500_timer_base + - PRCMU_TIMER_DOWNCOUNT); - count2 = readl(clksrc_dbx500_timer_base + - PRCMU_TIMER_DOWNCOUNT); + count = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT); + count2 = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT); } while (count2 != count); /* Negate because the timer is a decrementing counter */