summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbencollins <tailor@grayson>2001-08-10 03:50:27 -0400
committerBen Collins <bcollins@ubuntu.com>2006-06-01 13:18:08 -0400
commit1b233f02b31b194227619933b122616c4a580c1d (patch)
treea5dfbc4ed4f50d4d548b9557a25d5cbce213e286
parente81b7c6e5dde2523cc7bd539272a865a41ea2d59 (diff)
downloadsilo-1b233f02b31b194227619933b122616c4a580c1d.tar.gz
[silo @ 43]
Fix teck counting for javastation, from Pete Zaitcev <zaitcev@redhat.com>#
-rw-r--r--ChangeLog5
-rw-r--r--second/timer.c12
2 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a83864..4eaf6c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 9 23:49:39 EDT 2001 Ben Collins <bcollins@debian.org>
+
+ * second/timer.c: Fix tick counting for javastation, but
+ Pete Zaitcev <zaitcev@redhat.com>
+
Mon Jun 18 12:14:58 EDT 2001 Ben Collins <bcollins@debian.org>
* silo/silo.c: Fix suggested options to genromfs, patch from Pieter
diff --git a/second/timer.c b/second/timer.c
index 053c4fd..839c71c 100644
--- a/second/timer.c
+++ b/second/timer.c
@@ -269,9 +269,15 @@ int get_ticks (void)
switch (architecture) {
case sun4c: i = sun4c_timer->count10; break;
case sun4m: i = sun4m_timer->count; break;
- case sun4p: i = sun4p_lda(PCIC_PHYSADDR+PCIC_SYS_COUNT);
- i >>= 2; /* PROLL does this and its timing is sure right */
- break;
+ case sun4p:
+ i = sun4p_lda(PCIC_PHYSADDR+PCIC_SYS_COUNT) & 0x7FFFFFFF;
+ if (i >= lasti)
+ ticks += i - lasti;
+ else
+ ticks += (0x7FFFFFFF - lasti) + i;
+ lasti = i;
+ /* 1 increment every 4 CPU clocks (@ 100MHz) */
+ return (int) (ticks / 250000);
case sun4d: /* I cannot get the normal sun4d timer working
during bootstrapping, so unfortunately I can give
just a 1000ms precision. */