diff options
author | peter <peter@FreeBSD.org> | 2003-01-06 01:53:55 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-01-06 01:53:55 +0000 |
commit | 1d946ebfc22e88b955a94e26b8130f1c6a15589c (patch) | |
tree | a3550913489fc45171d3259aa66bdea62d4b3175 /sys/ia64 | |
parent | 584a6a5f1c1ff4637eb78d77a15cc45dd3538bde (diff) | |
download | FreeBSD-src-1d946ebfc22e88b955a94e26b8130f1c6a15589c.zip FreeBSD-src-1d946ebfc22e88b955a94e26b8130f1c6a15589c.tar.gz |
Move the itm reload to a single place rather than having two identical
copies of the reload. Note that we use the precomputed itm_reload value
so that we can avoid a division in the kernel. The ia64 cpu does not
have integer divide, so this would have been done by a floating point
operation.
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/interrupt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c index 7452bca..6b82a7c 100644 --- a/sys/ia64/ia64/interrupt.c +++ b/sys/ia64/ia64/interrupt.c @@ -123,19 +123,19 @@ interrupt(u_int64_t vector, struct trapframe *framep) intrcnt[INTRCNT_CLOCK]++; #endif critical_enter(); + /* Rearm so we get the next clock interrupt */ + ia64_set_itm(ia64_get_itc() + itm_reload); #ifdef SMP clks[PCPU_GET(cpuid)]++; /* Only the BSP runs the real clock */ if (PCPU_GET(cpuid) == 0) { #endif - ia64_set_itm(ia64_get_itc() + itm_reload); hardclock((struct clockframe *)framep); /* divide hz (1024) by 8 to get stathz (128) */ if ((++schedclk2 & 0x7) == 0) statclock((struct clockframe *)framep); #ifdef SMP } else { - ia64_set_itm(ia64_get_itc() + itm_reload); mtx_lock_spin(&sched_lock); hardclock_process(curthread, TRAPF_USERMODE(framep)); if ((schedclk2 & 0x7) == 0) |