Hi wu, 2010/8/15 wu zhangjin <wuzhangjin@xxxxxxxxx>: > > don't worry about it, the timekeeper solves it: > > kernel/time/timekeeping.c > > The r4k timer in most of the MIPS variants also only has a 32bits > counter register, no problem with it: > > arch/mips/kernel/csrc-r4k.c > arch/mips/kernel/cevt-r4k.c > > does xlr 732 also use such a timer (with MIPS count & compare > registers of coprocessor0)? > yes, xlr732 use these two registers to generate timer interrupt, with a frequency of 1GHZ > If you need to get the time with high resolution, please use: > getnstimeofday(), this function will return a linear time with the > help of timekeeper(timekeeping_get_ns). > 1) So hrtimer is based on xtime, If CONFIG_NO_HZ is set , would xtime be updated on time and correctly ? 2) some question about __get_nsec_offset : /* read clocksource: */ cycle_now = clocksource_read(clock); /* calculate the delta since the last update_wall_time: */ cycle_delta = (cycle_now - clock->cycle_last) & clock->mask; if cycle_now is smaller than clock->cycle_last , say , cycle_now = 3 , cycle->cycle_last = 2^32-1 , then cycle_delta = 3 - (2^32-1) = ? > Regards, > Wu Zhangjin >