From patchwork Wed Sep 5 21:34:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mandeep Singh Baines X-Patchwork-Id: 1411121 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 B0E2940220 for ; Wed, 5 Sep 2012 21:37:45 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9NFj-0001D9-DV; Wed, 05 Sep 2012 21:35:15 +0000 Received: from mail-we0-f201.google.com ([74.125.82.201]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T9NFf-0001Bn-81 for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2012 21:35:12 +0000 Received: by weyx56 with SMTP id x56so58872wey.0 for ; Wed, 05 Sep 2012 14:35:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=4Rz64O3G9XdBvu1ZNIPWz/KmVh6u/lofN/9LMe6iRaI=; b=bV3VcrSvpitCcd7IHbSn7fDYZHTF3PDRErHHCz/wTtKo/eSpGw86IiJGLy5lKA8hcf itXXDz5Ci8gIPWBs/ScijEFG4F9iuS72lDkQINxjTwqO5fuC0m/PxdJuQcAIGyHNKYOl cBEwHBh9ZBwu6F2cJu6svlNyJwdoH0dxUgWVoUpkydFYZ88RaX4cj3ISQCgrqFG8pyLR 1BGW5RBKdYHjzvL2vNFAaWm1G6iC/P4qLknR51+zYvfz0F+vFeCZpUIYucfGqdiaqlUC BWzJU1de2225UO/JCIFhGpNO48lCj48+SoxF1fPNr2gIF8eLQPjg0gsnrR5wBc8rw1ER 4TvA== Received: by 10.180.19.68 with SMTP id c4mr4094360wie.4.1346880907405; Wed, 05 Sep 2012 14:35:07 -0700 (PDT) Received: by 10.180.19.68 with SMTP id c4mr4094343wie.4.1346880907337; Wed, 05 Sep 2012 14:35:07 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id hm1si38653wib.3.2012.09.05.14.35.07 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 05 Sep 2012 14:35:07 -0700 (PDT) Received: from nitrous.mtv.corp.google.com (nitrous.mtv.corp.google.com [172.22.73.72]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id EAE655C0063; Wed, 5 Sep 2012 14:35:06 -0700 (PDT) Received: by nitrous.mtv.corp.google.com (Postfix, from userid 55285) id 4711F809C5; Wed, 5 Sep 2012 14:35:06 -0700 (PDT) From: Mandeep Singh Baines To: Kukjin Kim , linux-kernel@vger.kernel.org Subject: [PATCH] ARM: exynos: mct: cache mct upper count Date: Wed, 5 Sep 2012 14:34:54 -0700 Message-Id: <1346880894-31316-1-git-send-email-msb@chromium.org> X-Mailer: git-send-email 1.7.7.3 X-Gm-Message-State: ALoCoQkmXD6o9Cr6yVcFEUg6WQRAMQmRr1I+/TqLImSJZ5KqjW7ZzAn1YGyM/1OJihNaqKJ/pok+enofKejwLFeNhgyteSQGMvxxUSDLzKL8JfJYNQGb3Xm7MKlzY3+6wVNQIfItgp/3j1EunRYMVEQj3DClgy3CBWZXFOg3m5kszRyX+ksj9XdjRp6Z1OEEmOMidF+XlEpkK6j0fGZkPgTNEIxYD5REVg== X-Spam-Note: CRM114 invocation failed 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.82.201 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-samsung-soc@vger.kernel.org, Russell King , Mandeep Singh Baines , Olof Johansson , Sonny Rao , 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 Saves one register read. BUG=none TEST=See below. Before (perf report): 1.40% [k] exynos4_frc_read | |--87.20%-- ktime_get_ts | | | |--93.60%-- posix_ktime_get_ts After (perf report): 1.00% [k] exynos4_frc_read | |--88.61%-- ktime_get_ts | | | |--92.70%-- posix_ktime_get_ts Signed-off-by: Mandeep Singh Baines CC: Sonny Rao CC: Olof Johansson CC: Kukjin Kim CC: Russell King CC: linux-arm-kernel@lists.infradead.org CC: linux-samsung-soc@vger.kernel.org --- arch/arm/mach-exynos/mct.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c index b601fb8..2bbd533 100644 --- a/arch/arm/mach-exynos/mct.c +++ b/arch/arm/mach-exynos/mct.c @@ -128,8 +128,8 @@ static void exynos4_mct_frc_start(u32 hi, u32 lo) static cycle_t exynos4_frc_read(struct clocksource *cs) { - unsigned int lo, hi; - u32 hi2 = __raw_readl(EXYNOS4_MCT_G_CNT_U); + u32 lo, hi; + static u32 hi2; do { hi = hi2;