From: Todd P. <tp...@mv...> - 2005-03-17 03:21:59
|
Amit Choudhary wrote: > If I have not missed something then the call to read_mputimer1() should be > modified to sched_clock(). > I am attaching a patch to change the definition of dpm_md_time() > [include/asm-arm/arch-omap/dpm.h] to take care of that. Hello Amit -- Sounds right; the copy of MPU timer1 reading code into DPM was a temporary mod while sched_clock was jiffie-based instead of a microsecond-level timer in the OMAP tree (if I remember correctly). Now that it's (normally) based on MPU timer 1 we should be able to kill most or all of the code for that in the DPM patch (the definitions of MPU timer register addresses and bits, etc.). It's slightly more complicated than I've been able to keep up with recently, for example, use of MPU timer 1 is dependent on CONFIG_OMAP_MPU_TIMER, and there's also CONFIG_OMAP_32K_TIMER available on most OMAPs, which seems not to provide a sched_clock() (I suppose we could make DPM timing dependent on CONFIG_OMAP_MPU_TIMER). Since all platforms supported so far by DPM on sourceforge now have microsecond-resolution sched_clock(), we can actually drop dpm_md_time() entirely and just use sched_clock(). A couple brief comments on your patch: +extern unsigned long long sched_clock(void); This should come from include/linux/sched.h. +#define dpm_md_time() ~sched_clock() I believe the bitwise negation (in order to convert the MPU timer value to an up counter) can be dropped, sched_clock is already doing "0 - omap_mpu_timer_read(0)" for the same purpose. Feel free to send an updated patch or one way or another I'll get to this soon, thanks, -- Todd |