Author: marius
Date: Mon Jul 25 18:59:45 2011
New Revision: 224385
URL: http://svn.freebsd.org/changeset/base/224385

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/8/sys/sparc64/pci/schizo.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/geom/label/   (props changed)

Modified: stable/8/sys/sparc64/pci/schizo.c
==============================================================================
--- stable/8/sys/sparc64/pci/schizo.c   Mon Jul 25 18:59:43 2011        
(r224384)
+++ stable/8/sys/sparc64/pci/schizo.c   Mon Jul 25 18:59:45 2011        
(r224385)
@@ -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);
 }
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to