summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-07-12 17:55:34 +0000
committermarius <marius@FreeBSD.org>2011-07-12 17:55:34 +0000
commit447e9ac31d02f588bc427349cc1fe56bfd23b077 (patch)
tree3f30ff4c55b003073cd0e3e4fe0595620611c71e /sys/sparc64
parent47e9f283f0bfa10951501677aa8a22b306009f3a (diff)
downloadFreeBSD-src-447e9ac31d02f588bc427349cc1fe56bfd23b077.zip
FreeBSD-src-447e9ac31d02f588bc427349cc1fe56bfd23b077.tar.gz
- 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.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/pci/schizo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sparc64/pci/schizo.c b/sys/sparc64/pci/schizo.c
index 7d55516..4d1a5a7 100644
--- a/sys/sparc64/pci/schizo.c
+++ b/sys/sparc64/pci/schizo.c
@@ -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 *tc)
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);
}
OpenPOWER on IntegriCloud