[U-Boot] [PATCH] [Timer]Remove calls to [get, reset]_timer outside arch/

Graeme Russ graeme.russ at gmail.com
Mon May 23 14:32:00 CEST 2011


On 23/05/11 22:19, Scott McNutt wrote:
> Hi Graeme,
> 
> Graeme Russ wrote:
>> There is no need to use get_timer() and reset_timer() and there are build
> 
> I must have missed something WRT reset_timer() -- my apologies
> if I'm covering old ground.
> 
> When the timestamp is incremented using an interrupt that occurs with
> a period greater than 1 ms, we can get early timeouts. reset_timer()
> solved the problem. What's the recommended approach for dealing with
> this without reset_timer() ?
> 

There is an active thread on the timer API right now. Short answer - The
API is broken - Calling reset_timer() is not the right solution because:
 a) It breaks recursive or nested timing loops
 b) For some arches, udelay() has a side-effect as well

All this needs fixing

Regards,

Graeme


More information about the U-Boot mailing list