From patchwork Mon Nov 19 18:30:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 1768481 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 C9936DF264 for ; Mon, 19 Nov 2012 19:28:23 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TaWuz-0006eG-QZ; Mon, 19 Nov 2012 19:22:07 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TaWMV-0003lL-Ky for linux-arm-kernel@merlin.infradead.org; Mon, 19 Nov 2012 18:46:28 +0000 Received: from avon.wwwdotorg.org ([2001:470:1f0f:bd7::2]) by casper.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TaW7y-0008Re-0s for linux-arm-kernel@lists.infradead.org; Mon, 19 Nov 2012 18:31:29 +0000 Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id 19F249E9B4; Mon, 19 Nov 2012 11:32:49 -0700 (MST) Received: from swarren-lx1.nvidia.com (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 3787EE479E; Mon, 19 Nov 2012 11:31:18 -0700 (MST) From: Stephen Warren To: Russell King Subject: [PATCH V3 01/11] cris: move usec/nsec conversion to do_slow_gettimeoffset Date: Mon, 19 Nov 2012 11:30:57 -0700 Message-Id: <1353349867-28494-2-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1353349867-28494-1-git-send-email-swarren@wwwdotorg.org> References: <1353349867-28494-1-git-send-email-swarren@wwwdotorg.org> X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.96.5 at avon.wwwdotorg.org X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121119_183126_571538_9DE57D0A X-CRM114-Status: GOOD ( 15.30 ) X-Spam-Score: 0.5 (/) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (0.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_PASS SPF: sender matches SPF record -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arch@vger.kernel.org, Stephen Warren , linux-cris-kernel@axis.com, Arnd Bergmann , John Stultz , linux-kernel@vger.kernel.org, Mikael Starvik , Olof Johansson , Thomas Gleixner , 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: Stephen Warren Move usec to nsec conversion from arch_gettimeoffset() to do_slow_gettimeoffset(); in a future patch, do_slow_gettimeoffset() will be used directly as the implementation of arch_gettimeoffset(), so needs to perform all required calculations. Cc: Mikael Starvik Cc: linux-cris-kernel@axis.com Acked-by: Jesper Nilsson Signed-off-by: Stephen Warren --- arch/cris/arch-v10/kernel/time.c | 4 ++-- arch/cris/kernel/time.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index bcffcb6..162892f 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c @@ -65,8 +65,8 @@ unsigned long do_slow_gettimeoffset(void) */ count = *R_TIMER0_DATA; - /* Convert timer value to usec */ - return (TIMER0_DIV - count) * ((NSEC_PER_SEC/1000)/HZ)/TIMER0_DIV; + /* Convert timer value to nsec */ + return (TIMER0_DIV - count) * (NSEC_PER_SEC/HZ)/TIMER0_DIV; } /* Excerpt from the Etrax100 HSDD about the built-in watchdog: diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c index 277ffc4..b063c92 100644 --- a/arch/cris/kernel/time.c +++ b/arch/cris/kernel/time.c @@ -46,7 +46,7 @@ static unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset; u32 arch_gettimeoffset(void) { - return do_gettimeoffset() * 1000; + return do_gettimeoffset(); } #endif