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: 15145 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 061DC23E48 for ; Thu, 28 Feb 2013 10:01:35 +0000 (UTC) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by fiordland.canonical.com (Postfix) with ESMTP id 92966A18E0D for ; Thu, 28 Feb 2013 10:01:34 +0000 (UTC) Received: by mail-ve0-f180.google.com with SMTP id jx10so1586456veb.39 for ; Thu, 28 Feb 2013 02:01:34 -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=N3UfMUybqZ8qzbk+Vs7P7BAT2beoatqJ5MnH2TnxF9xRou9iKaVePjNKjN4uegiBMk zgya3MyXSu/OIQ34whKQ7CPOiuEKpqVIIYUohv0fyjMZzl7FSptdHZRwMzt9DC0TABan uiBhVURbuBliWEH1T5e6BeycaVvI1afV2dK6NWvL4adZINJjYN4YdrYi0qpxKtZ09u3g bKGpiGePrVM0GQRaKm0+UdeQz4BIltvEI9+skoA7IUg+qbkzvKAkmW6Ad/tUA6zWAlF/ TwEDwUpinu3Jm9mxEmPWM66dW2CAjefpWeLWS7repXvnRDvr8ua1/SL7NK1f030TB2Qh h+ig== X-Received: by 10.221.11.135 with SMTP id pe7mr2273746vcb.41.1362045694090; Thu, 28 Feb 2013 02:01:34 -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 st5csp216711veb; Thu, 28 Feb 2013 02:01:33 -0800 (PST) X-Received: by 10.180.73.212 with SMTP id n20mr9319885wiv.11.1362045692564; Thu, 28 Feb 2013 02:01:32 -0800 (PST) Received: from mail-we0-x22a.google.com ([2a00:1450:400c:c03::22a]) by mx.google.com with ESMTPS id p15si8162380wie.112.2013.02.28.02.01.32 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Feb 2013 02:01:32 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22a is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=2a00:1450:400c:c03::22a; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::22a 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-we0-f170.google.com with SMTP id z53so1323785wey.15 for ; Thu, 28 Feb 2013 02:01:32 -0800 (PST) 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Thomas Gleixner , Rabin Vincent , Fabio Baltieri 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: ALoCoQm9Ei4J3gBlWosSSsOk/Pyo47uiqQMzdA1GAxghqwC9ON4wkPevWUxPi4fvB3hqhoL7DRLC 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 */