Re: [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-29 Thread Yang Yingliang
On 2015/10/29 15:36, Yang Yingliang wrote: On 2015/10/27 22:03, Mark Rutland wrote: On Tue, Oct 27, 2015 at 09:21:13PM +0800, Yang Yingliang wrote: In multi-core system, if the clock is not sync perfectly, it will make cycle_last that recorded by CPU-A is a little more than cycle_now that

Re: [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-29 Thread Yang Yingliang
On 2015/10/27 22:03, Mark Rutland wrote: On Tue, Oct 27, 2015 at 09:21:13PM +0800, Yang Yingliang wrote: In multi-core system, if the clock is not sync perfectly, it will make cycle_last that recorded by CPU-A is a little more than cycle_now that read by CPU-B. If that is happening, that

Re: [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-29 Thread Yang Yingliang
On 2015/10/27 22:03, Mark Rutland wrote: On Tue, Oct 27, 2015 at 09:21:13PM +0800, Yang Yingliang wrote: In multi-core system, if the clock is not sync perfectly, it will make cycle_last that recorded by CPU-A is a little more than cycle_now that read by CPU-B. If that is happening, that

Re: [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-29 Thread Yang Yingliang
On 2015/10/29 15:36, Yang Yingliang wrote: On 2015/10/27 22:03, Mark Rutland wrote: On Tue, Oct 27, 2015 at 09:21:13PM +0800, Yang Yingliang wrote: In multi-core system, if the clock is not sync perfectly, it will make cycle_last that recorded by CPU-A is a little more than cycle_now that

Re: [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-27 Thread Ding Tianhong
On 2015/10/27 22:03, Mark Rutland wrote: > On Tue, Oct 27, 2015 at 09:21:13PM +0800, Yang Yingliang wrote: >> In multi-core system, if the clock is not sync perfectly, it >> will make cycle_last that recorded by CPU-A is a little more >> than cycle_now that read by CPU-B. > > If that is

Re: [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-27 Thread Mark Rutland
On Tue, Oct 27, 2015 at 09:21:13PM +0800, Yang Yingliang wrote: > In multi-core system, if the clock is not sync perfectly, it > will make cycle_last that recorded by CPU-A is a little more > than cycle_now that read by CPU-B. If that is happening, that sounds like a hardware and/or firmware bug.

[PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-27 Thread Yang Yingliang
In multi-core system, if the clock is not sync perfectly, it will make cycle_last that recorded by CPU-A is a little more than cycle_now that read by CPU-B. With the negative result, hrtimer_update_base() return a huge and wrong time. It leads to the cpu can not finish the while loop in

[PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-27 Thread Yang Yingliang
In multi-core system, if the clock is not sync perfectly, it will make cycle_last that recorded by CPU-A is a little more than cycle_now that read by CPU-B. With the negative result, hrtimer_update_base() return a huge and wrong time. It leads to the cpu can not finish the while loop in

Re: [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-27 Thread Ding Tianhong
On 2015/10/27 22:03, Mark Rutland wrote: > On Tue, Oct 27, 2015 at 09:21:13PM +0800, Yang Yingliang wrote: >> In multi-core system, if the clock is not sync perfectly, it >> will make cycle_last that recorded by CPU-A is a little more >> than cycle_now that read by CPU-B. > > If that is

Re: [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last

2015-10-27 Thread Mark Rutland
On Tue, Oct 27, 2015 at 09:21:13PM +0800, Yang Yingliang wrote: > In multi-core system, if the clock is not sync perfectly, it > will make cycle_last that recorded by CPU-A is a little more > than cycle_now that read by CPU-B. If that is happening, that sounds like a hardware and/or firmware bug.