Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-03 Thread Cédric Le Goater
On 08/03/2017 01:52 PM, Benjamin Herrenschmidt wrote: > On Thu, 2017-08-03 at 19:52 +1000, Michael Ellerman wrote: >> What if num is 0? >> >> Which it would be in the fallback case, if the affinity mask is empty, >> AFAICS. > > How can the mask be empty though ? But yes, as I noted there is a > pr

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-03 Thread Benjamin Herrenschmidt
On Thu, 2017-08-03 at 19:52 +1000, Michael Ellerman wrote: > What if num is 0? > > Which it would be in the fallback case, if the affinity mask is empty, > AFAICS. How can the mask be empty though ? But yes, as I noted there is a problem if the value is 0. Not sure what to do if we are given an e

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-03 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On Thu, 2017-08-03 at 09:45 +0200, Cédric Le Goater wrote: >> On 08/02/2017 11:57 PM, Benjamin Herrenschmidt wrote: >> > On Wed, 2017-08-02 at 18:43 +0200, Cédric Le Goater wrote: >> > > If xive_find_target_in_mask() fails to find a cpu, the fuzz value used >> > >

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-03 Thread Cédric Le Goater
On 08/02/2017 11:57 PM, Benjamin Herrenschmidt wrote: > On Wed, 2017-08-02 at 18:43 +0200, Cédric Le Goater wrote: >> If xive_find_target_in_mask() fails to find a cpu, the fuzz value used >> in xive_pick_irq_target() is decremented and reused in the last >> returning call to xive_find_target_in_ma

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-03 Thread Benjamin Herrenschmidt
On Thu, 2017-08-03 at 09:45 +0200, Cédric Le Goater wrote: > On 08/02/2017 11:57 PM, Benjamin Herrenschmidt wrote: > > On Wed, 2017-08-02 at 18:43 +0200, Cédric Le Goater wrote: > > > If xive_find_target_in_mask() fails to find a cpu, the fuzz value used > > > in xive_pick_irq_target() is decrement

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-02 Thread Benjamin Herrenschmidt
On Thu, 2017-08-03 at 10:01 +1000, Michael Ellerman wrote: > Benjamin Herrenschmidt writes: > > > On Wed, 2017-08-02 at 18:43 +0200, Cédric Le Goater wrote: > > > If xive_find_target_in_mask() fails to find a cpu, the fuzz value used > > > in xive_pick_irq_target() is decremented and reused in th

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-02 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On Wed, 2017-08-02 at 18:43 +0200, Cédric Le Goater wrote: >> If xive_find_target_in_mask() fails to find a cpu, the fuzz value used >> in xive_pick_irq_target() is decremented and reused in the last >> returning call to xive_find_target_in_mask(). This can result

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-02 Thread Benjamin Herrenschmidt
On Wed, 2017-08-02 at 18:43 +0200, Cédric Le Goater wrote: > If xive_find_target_in_mask() fails to find a cpu, the fuzz value used > in xive_pick_irq_target() is decremented and reused in the last > returning call to xive_find_target_in_mask(). This can result in such > WARNINGs if the initial fuz

[PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-02 Thread Cédric Le Goater
If xive_find_target_in_mask() fails to find a cpu, the fuzz value used in xive_pick_irq_target() is decremented and reused in the last returning call to xive_find_target_in_mask(). This can result in such WARNINGs if the initial fuzz value is zero : [0.094480] WARNING: CPU: 10 PID: 1 at ..