From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763187AbYAUP3S (ORCPT ); Mon, 21 Jan 2008 10:29:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760609AbYAUPYn (ORCPT ); Mon, 21 Jan 2008 10:24:43 -0500 Received: from ms-smtp-02.nyroc.rr.com ([24.24.2.56]:42894 "EHLO ms-smtp-02.nyroc.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755510AbYAUPYD (ORCPT ); Mon, 21 Jan 2008 10:24:03 -0500 Message-Id: <20080121152352.004055444@goodmis.org> References: <20080121152231.579118762@goodmis.org> User-Agent: quilt/0.46-1 Date: Mon, 21 Jan 2008 10:22:38 -0500 From: Steven Rostedt To: LKML Cc: Ingo Molnar , Linus Torvalds , Andrew Morton , Peter Zijlstra , Christoph Hellwig , Mathieu Desnoyers , Gregory Haskins , Arnaldo Carvalho de Melo , Thomas Gleixner , Tim Bird , Sam Ravnborg , "Frank Ch. Eigler" , Jan Kiszka , John Stultz , Steven Rostedt Subject: [RFC PATCH 07/23 -v4] ppc clock accumulate fix Content-Disposition: inline; filename=ppc-clock-accumulate-update.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following is a quick and dirty fix for powerpc so it includes cycle_accumulated in its calculation. It relies on the fact that the powerpc clocksource is a 64bit counter (don't have to worry about multiple overflows), so the subtraction should be safe. Signed-off-by: John Stultz Signed-off-by: Steven Rostedt --- arch/powerpc/kernel/time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-mcount.git/arch/powerpc/kernel/time.c =================================================================== --- linux-mcount.git.orig/arch/powerpc/kernel/time.c 2008-01-17 20:33:16.000000000 -0500 +++ linux-mcount.git/arch/powerpc/kernel/time.c 2008-01-17 20:33:38.000000000 -0500 @@ -773,7 +773,8 @@ void update_vsyscall(struct timespec *wa stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC; do_div(stamp_xsec, 1000000000); stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC; - update_gtod(clock->cycle_last, stamp_xsec, t2x); + update_gtod(clock->cycle_last-clock->cycle_accumulated, + stamp_xsec, t2x); } void update_vsyscall_tz(void) --