> Unfortunately, nobody has come up with an APM-compatible
> do_fast_gettimeoffset(). Yet. I am working on it.
*cough*. What about the suggestion i made a few days ago, to put the
following workaround into apm.c:APM_BIOS_CALL():
[...]
apm_off() {
...
cli();
old_tsc = rdtsc();
old_counter = read_counter();
[call BIOS]
new_tsc = rdtsc();
delta = old_counter-read_counter(); /* naive */
delta_tsc = delta*ticks_per_usec;
init_timer_cc += new_tsc-old_tsc-delta_tsc;
last_timer_cc += new_tsc-old_tsc-delta_tsc;
...
}
This code assumes nothing about the counter. It might even go backwards
during APM-off. In the fast_ code, only 'deltas' get used, so the absolute
value of init_timer_cc and last_timer_cc is irrelevant. (thus we can fix
them up)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu