Re: [PATCH 1/2] hrtimer: reprogram event for expires=KTIME_MAX in hrtimer_force_reprogram()

2014-05-12 Thread Preeti U Murthy
On 05/12/2014 11:23 AM, Viresh Kumar wrote: > On 10 May 2014 21:47, Preeti U Murthy wrote: >> On 05/09/2014 04:27 PM, Viresh Kumar wrote: >>> On 9 May 2014 16:04, Preeti U Murthy wrote: > >>> Ideally, the device should have stopped events as we programmed it in >>> ONESHOT mode. And should have

Re: [PATCH 1/2] hrtimer: reprogram event for expires=KTIME_MAX in hrtimer_force_reprogram()

2014-05-11 Thread Viresh Kumar
On 10 May 2014 21:47, Preeti U Murthy wrote: > On 05/09/2014 04:27 PM, Viresh Kumar wrote: >> On 9 May 2014 16:04, Preeti U Murthy wrote: >> Ideally, the device should have stopped events as we programmed it in >> ONESHOT mode. And should have waited for kernel to set it again.. >> >> But probab

Re: [PATCH 1/2] hrtimer: reprogram event for expires=KTIME_MAX in hrtimer_force_reprogram()

2014-05-10 Thread Preeti U Murthy
On 05/09/2014 04:27 PM, Viresh Kumar wrote: > On 9 May 2014 16:04, Preeti U Murthy wrote: >> On 05/09/2014 02:10 PM, Viresh Kumar wrote: > >> I looked through the code in arm_arch_timer.c and I think the more >> fundamental problem lies in the timer handler there. Ideally even before >> calling t

Re: [PATCH 1/2] hrtimer: reprogram event for expires=KTIME_MAX in hrtimer_force_reprogram()

2014-05-09 Thread Viresh Kumar
On 9 May 2014 16:04, Preeti U Murthy wrote: > On 05/09/2014 02:10 PM, Viresh Kumar wrote: > I looked through the code in arm_arch_timer.c and I think the more > fundamental problem lies in the timer handler there. Ideally even before > calling the tick event handler the timer handler must be prog

Re: [PATCH 1/2] hrtimer: reprogram event for expires=KTIME_MAX in hrtimer_force_reprogram()

2014-05-09 Thread Preeti U Murthy
Hi Viresh, On 05/09/2014 02:10 PM, Viresh Kumar wrote: > In hrtimer_force_reprogram(), we are reprogramming event device only if the > next > timer event is before KTIME_MAX. But what if it is equal to KTIME_MAX? As we > aren't reprogramming it again, it will be set to the last value it was, > p

[PATCH 1/2] hrtimer: reprogram event for expires=KTIME_MAX in hrtimer_force_reprogram()

2014-05-09 Thread Viresh Kumar
In hrtimer_force_reprogram(), we are reprogramming event device only if the next timer event is before KTIME_MAX. But what if it is equal to KTIME_MAX? As we aren't reprogramming it again, it will be set to the last value it was, probably tick interval, i.e. few milliseconds. And we will get a int