Subject: Re: kern_microtime.c and Xen
To: None <bouyer@antioche.eu.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 01/23/2006 07:45:48
> cc_microset() isn't really suitable for Xen anyway because of the
> way the clock instability, and I'll use a private implementation to
> compensate this. However, cc_microtime() is almost OK, and I'd like to avoid
> code duplicate if possible.
> 
> The problem here is that cc_microtime() uses cpu_counter32() - ci->ci_cc.cc_cc.
> This is fine as long as ci_cc_cc is alaso initialised with cpu_counter32,
> but because of the overflow issue I want to use a 64bit value for
> ci_cc.cc_cc (and I don't want to keep a private variable for this).
> This can easily be solved by masking the ci_cc.cc_cc value, as in the
> patch below. Is it OK to commit and pullup to netbsd-3 ?

do you really need to have a custom version of cc_microset()?
what you need is some #ifdef for 64 bit counter, isn't it?

YAMAMOTO Takashi