From patchwork Thu Feb 28 10:01:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 2196481 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 9093FDF2A2 for ; Thu, 28 Feb 2013 10:04:34 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UB0J1-0007yG-IY; Thu, 28 Feb 2013 10:01:39 +0000 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UB0Iy-0007xx-2t for linux-arm-kernel@lists.infradead.org; Thu, 28 Feb 2013 10:01:37 +0000 Received: by mail-we0-f177.google.com with SMTP id d7so1319974wer.36 for ; Thu, 28 Feb 2013 02:01:32 -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=HeWVormueoamXJvNQ3KjMQ2NabeR6LPEx2u/woS4MjbRLhXTYaw6wYIzrg51P+fN34 JqN7M5xTjk8+GhsUvBRIfc9MthHIdfosiFixZ5hsAyqmxuc7XuHxBly338AK2hGUwJ8C a71i2z1v8U3N4LRSpjCW1qqBVABWnMFKhkD/VN1U2LE1kE1j9ZHB9puIo44Gu3+BzwNv IkCRCFCJLwAcXo0Cl6Z+QGElH9pp2m7CX1ybbmOpBe2pR8xfKPvkBv8OI4/LmeXcjbrr tl3SN7nkVRacFcfQzLUrtcAUwiVlCoWV5gt/IRr38USHnLqpg0ZUEQjRj6+8zsSZsJjE 5hsQ== X-Received: by 10.194.21.233 with SMTP id y9mr2681008wje.47.1362045692004; Thu, 28 Feb 2013 02:01:32 -0800 (PST) Received: from localhost ([2a01:2003:1:1e91:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id ed6sm14237566wib.9.2013.02.28.02.01.26 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 28 Feb 2013 02:01:31 -0800 (PST) From: Fabio Baltieri To: John Stultz Subject: [PATCH RESEND 1/2] clocksource: dbx500-prcmu: use relaxed readl variant Date: Thu, 28 Feb 2013 11:01:06 +0100 Message-Id: <1362045667-23891-1-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.8.1.3 X-Gm-Message-State: ALoCoQmi1c/6cL9MIDGr/6P8N4Ttk+eKhFUIjVmIZipMLaNep69B5hNARTW6Rth3niQzEkKgdykT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130228_050136_234137_D9166898 X-CRM114-Status: GOOD ( 10.14 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Rabin Vincent , Fabio Baltieri , Linus Walleij , linux-kernel@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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+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 */