From owner-svn-src-user@FreeBSD.ORG Thu Mar 11 08:30:05 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FEBF106566B; Thu, 11 Mar 2010 08:30:05 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FDF78FC08; Thu, 11 Mar 2010 08:30:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2B8U5vI014316; Thu, 11 Mar 2010 08:30:05 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2B8U5Vu014314; Thu, 11 Mar 2010 08:30:05 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003110830.o2B8U5Vu014314@svn.freebsd.org> From: Juli Mallett Date: Thu, 11 Mar 2010 08:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205004 - user/jmallett/octeon/sys/mips/cavium X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2010 08:30:05 -0000 Author: jmallett Date: Thu Mar 11 08:30:05 2010 New Revision: 205004 URL: http://svn.freebsd.org/changeset/base/205004 Log: I would've expected the Octeon to have a double-counting timer as the code suggests, but at least on my CAM-0100 this seems to not be the case. Pass 0 to mips_timer_init_params for double_count instead of 1 -- now timings on my system match wall clock. The tick code really should be updated for 64-bit counter reads on the CPUs that support them -- I wonder if the t_delta wrongness is due to inaccuracy from the hand-rolled counter wrapping. Modified: user/jmallett/octeon/sys/mips/cavium/octeon_machdep.c Modified: user/jmallett/octeon/sys/mips/cavium/octeon_machdep.c ============================================================================== --- user/jmallett/octeon/sys/mips/cavium/octeon_machdep.c Thu Mar 11 08:03:56 2010 (r205003) +++ user/jmallett/octeon/sys/mips/cavium/octeon_machdep.c Thu Mar 11 08:30:05 2010 (r205004) @@ -760,7 +760,7 @@ platform_start(__register_t a0, __regist kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif platform_counter_freq = octeon_get_clock_rate(); - mips_timer_init_params(platform_counter_freq, 1); + mips_timer_init_params(platform_counter_freq, 0); } /* impSTART: This stuff should move back into the Cavium SDK */