RE: [PATCH] clocksource: vf_pit_timer: use complement for sched_clock reading

2014-03-05 Thread Jingchang Lu
ger.kernel.org; Lu > Jingchang-B35083 > Subject: Re: [PATCH] clocksource: vf_pit_timer: use complement for > sched_clock reading > > On Wed, Mar 05, 2014 at 11:11:08PM +0100, Stefan Agner wrote: > > Vybrids PIT register is monitonic decreasing. However, sched_clock > > reading need

Re: [PATCH] clocksource: vf_pit_timer: use complement for sched_clock reading

2014-03-05 Thread Shawn Guo
On Wed, Mar 05, 2014 at 11:11:08PM +0100, Stefan Agner wrote: > Vybrids PIT register is monitonic decreasing. However, sched_clock > reading needs to be monitonic increasing. Use bitwise not to get > the complement of the clock register. This fixes the clock going > backward. Also, the clock now st

[PATCH] clocksource: vf_pit_timer: use complement for sched_clock reading

2014-03-05 Thread Stefan Agner
Vybrids PIT register is monitonic decreasing. However, sched_clock reading needs to be monitonic increasing. Use bitwise not to get the complement of the clock register. This fixes the clock going backward. Also, the clock now starts at 0 since we load the register with the maximum value at start.