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: 14170 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AA8AC23E33 for ; Mon, 21 Jan 2013 12:09:56 +0000 (UTC) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id B1499A18536 for ; Mon, 21 Jan 2013 12:09:55 +0000 (UTC) Received: by mail-vc0-f180.google.com with SMTP id fo13so817505vcb.39 for ; Mon, 21 Jan 2013 04:09:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=86cnQqTsr6m+OELYZ1JEQisIde4DVlBInLBBLBpyJSM=; b=pDyLoA+hDiGWoA/NK41sLkAuuDdEa3UQ09eF57YM1gFG7Sxm9YVHE1Mfa1SB3T3oAv zum9pcJ1LgdGfVUzgt6qmCa1iBr06cJ91blTw7HIIB23dAPize4oIbHXB5gPCvvFpCOQ Vl1fXzdkHIFYCmcWyTGaVp75MdxlviCOPHJ116SGNQgbz0LQg0H8BTbS/UZDDK4SE8L/ cnXj6flq0ZX1q1N2Av6vPZjrsSu/uleI4CUcPtKgI6AUfWwFgXIG6EtelRyq+CaJRTKx HBavedswjucgFkoZbpkVEoFv7pzS/IDLe1676Y3krVz6Q1Ms8YepsDbVYbZVd1aYceYZ cO4g== X-Received: by 10.52.34.108 with SMTP id y12mr12660054vdi.8.1358770195056; Mon, 21 Jan 2013 04:09:55 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp197957veb; Mon, 21 Jan 2013 04:09:54 -0800 (PST) X-Received: by 10.194.90.116 with SMTP id bv20mr25835392wjb.33.1358770193754; Mon, 21 Jan 2013 04:09:53 -0800 (PST) Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by mx.google.com with ESMTPS id l4si4847116eeo.20.2013.01.21.04.09.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 04:09:53 -0800 (PST) Received-SPF: neutral (google.com: 74.125.83.48 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=74.125.83.48; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.48 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) smtp.mail=fabio.baltieri@linaro.org Received: by mail-ee0-f48.google.com with SMTP id t10so2772369eei.7 for ; Mon, 21 Jan 2013 04:09:53 -0800 (PST) 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rabin Vincent , Fabio Baltieri 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: ALoCoQmE/kq/10R+Vf4kk1ilK58H7J6pt0EF5WTtk7EdpOsaBG2OY1tkpNrwpRJC8+Zm48NiN3iL 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 */