Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F134033991
D14433.id39522.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
993 B
Referenced Files
None
Subscribers
None
D14433.id39522.diff
View Options
Index: head/sys/powerpc/powerpc/clock.c
===================================================================
--- head/sys/powerpc/powerpc/clock.c
+++ head/sys/powerpc/powerpc/clock.c
@@ -82,7 +82,7 @@
* Initially we assume a processor with a bus frequency of 12.5 MHz.
*/
static int initialized = 0;
-static u_long ns_per_tick = 80;
+static uint64_t ps_per_tick = 80000;
static u_long ticks_per_sec = 12500000;
static u_long *decr_counts[MAXCPU];
@@ -178,7 +178,7 @@
if (platform_smp_get_bsp(&cpu) != 0)
platform_smp_first_cpu(&cpu);
ticks_per_sec = platform_timebase_freq(&cpu);
- ns_per_tick = 1000000000 / ticks_per_sec;
+ ps_per_tick = 1000000000000 / ticks_per_sec;
set_cputicker(mftb, ticks_per_sec, 0);
snprintf(buf, sizeof(buf), "cpu%d:decrementer", curcpu);
@@ -307,7 +307,7 @@
TSENTER();
tb = mftb();
- ttb = tb + howmany(n * 1000, ns_per_tick);
+ ttb = tb + howmany((uint64_t)n * 1000000, ps_per_tick);
while (tb < ttb)
tb = mftb();
TSEXIT();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 31, 5:01 AM (20 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24504287
Default Alt Text
D14433.id39522.diff (993 B)
Attached To
Mode
D14433: PowerPC: Switch to more accurate unit to avoid division rounding
Attached
Detach File
Event Timeline
Log In to Comment