Re: [PATCH] arc: make sure __delay() never gets executed with 0 loops

2016-02-24 Thread Alexey Brodkin
Hi Vineet, On Wed, 2016-02-24 at 05:05 +, Vineet Gupta wrote: > On Monday 15 February 2016 10:07 PM, Alexey Brodkin wrote: > > Current implementation of __delay() function uses so-called > > zero-delay loops. And the only condition to exit that loop is > > LP_COUNT (loop count register) = 1 (b

Re: [PATCH] arc: make sure __delay() never gets executed with 0 loops

2016-02-23 Thread Vineet Gupta
On Monday 15 February 2016 10:07 PM, Alexey Brodkin wrote: > Current implementation of __delay() function uses so-called > zero-delay loops. And the only condition to exit that loop is > LP_COUNT (loop count register) = 1 (but not 0 as it might be easily > imagined). So u can fix this better by do

[PATCH] arc: make sure __delay() never gets executed with 0 loops

2016-02-15 Thread Alexey Brodkin
Current implementation of __delay() function uses so-called zero-delay loops. And the only condition to exit that loop is LP_COUNT (loop count register) = 1 (but not 0 as it might be easily imagined). So if our calculation of "loops" gives 0 (and that is pretty possible given result of multiplicat