Re: [RFC] powerpc/xive: Remove irq from queue when it is shutdown

2018-03-15 Thread Benjamin Herrenschmidt
On Wed, 2018-03-14 at 17:58 +0100, Frederic Barrat wrote: > + if (irq == hw_irq) { > + cur &= 1 << 31; > + cur |= XIVE_BAD_IRQ; > + *(q->qpage + idx) = cpu_to_be32(cur); > +

Re: [RFC] powerpc/xive: Remove irq from queue when it is shutdown

2018-03-15 Thread Benjamin Herrenschmidt
On Wed, 2018-03-14 at 18:47 +0100, Cédric Le Goater wrote: > We could also loop on the ESB 'P' bit to wait for the irqs to be handled, > using : > > xive_esb_read(irq, XIVE_ESB_GET) > > which has no side effect. It looks simpler to me. Is that possible ? But you can race with something

Re: [RFC] powerpc/xive: Remove irq from queue when it is shutdown

2018-03-14 Thread Cédric Le Goater
On 03/14/2018 05:58 PM, Frederic Barrat wrote: > If a driver has called free_irq() but an irq is waiting in a queue, an > error is logged when a cpu processes it: > > irq 232, desc: 44e5941a, depth: 1, count: 9823, unhandled: 0 > ->handle_irq(): 23f2e352, > handle_bad_

[RFC] powerpc/xive: Remove irq from queue when it is shutdown

2018-03-14 Thread Frederic Barrat
If a driver has called free_irq() but an irq is waiting in a queue, an error is logged when a cpu processes it: irq 232, desc: 44e5941a, depth: 1, count: 9823, unhandled: 0 ->handle_irq(): 23f2e352, handle_bad_irq+0x0/0x2e0 ->irq_data.chip(): 7fd7bf50,