From owner-svn-src-stable-7@FreeBSD.ORG Mon Jul 25 18:59:44 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A657106566B; Mon, 25 Jul 2011 18:59:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29EA58FC16; Mon, 25 Jul 2011 18:59:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6PIxina072274; Mon, 25 Jul 2011 18:59:44 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6PIxiN6072272; Mon, 25 Jul 2011 18:59:44 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201107251859.p6PIxiN6072272@svn.freebsd.org> From: Marius Strobl Date: Mon, 25 Jul 2011 18:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224384 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2011 18:59:44 -0000 Author: marius Date: Mon Jul 25 18:59:43 2011 New Revision: 224384 URL: http://svn.freebsd.org/changeset/base/224384 Log: MFC: r223959 - Add a missing shift in schizo_get_timecount(). This happened to be non-fatal as STX_CTRL_PERF_CNT_CNT0_SHIFT actually is zero, if we were using the second counter in the upper 32 bits this would be required though as the MI timecounter code doesn't support 64-bit counters/counter registers. - Remove a redundant NULL assignment from the timecounter initialization. Modified: stable/7/sys/sparc64/pci/schizo.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Mon Jul 25 18:57:50 2011 (r224383) +++ stable/7/sys/sparc64/pci/schizo.c Mon Jul 25 18:59:43 2011 (r224384) @@ -482,7 +482,6 @@ schizo_attach(device_t dev) if (tc == NULL) panic("%s: could not malloc timecounter", __func__); tc->tc_get_timecount = schizo_get_timecount; - tc->tc_poll_pps = NULL; tc->tc_counter_mask = STX_CTRL_PERF_CNT_MASK; if (OF_getprop(OF_peer(0), "clock-frequency", &prop, sizeof(prop)) == -1) @@ -1521,6 +1520,7 @@ schizo_get_timecount(struct timecounter struct schizo_softc *sc; sc = tc->tc_priv; - return (SCHIZO_CTRL_READ_8(sc, STX_CTRL_PERF_CNT) & - (STX_CTRL_PERF_CNT_MASK << STX_CTRL_PERF_CNT_CNT0_SHIFT)); + return ((SCHIZO_CTRL_READ_8(sc, STX_CTRL_PERF_CNT) & + (STX_CTRL_PERF_CNT_MASK << STX_CTRL_PERF_CNT_CNT0_SHIFT)) >> + STX_CTRL_PERF_CNT_CNT0_SHIFT); }