diff options
author | bencollins <tailor@grayson> | 2001-08-10 03:50:27 -0400 |
---|---|---|
committer | Ben Collins <bcollins@ubuntu.com> | 2006-06-01 13:18:08 -0400 |
commit | 1b233f02b31b194227619933b122616c4a580c1d (patch) | |
tree | a5dfbc4ed4f50d4d548b9557a25d5cbce213e286 | |
parent | e81b7c6e5dde2523cc7bd539272a865a41ea2d59 (diff) | |
download | silo-1b233f02b31b194227619933b122616c4a580c1d.tar.gz |
[silo @ 43]
Fix teck counting for javastation, from Pete Zaitcev <zaitcev@redhat.com>#
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | second/timer.c | 12 |
2 files changed, 14 insertions, 3 deletions
@@ -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. */ |