Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-13 Thread Paul E. McKenney
On Wed, Oct 12, 2016 at 06:19:27PM -0400, Rich Felker wrote: > On Wed, Oct 12, 2016 at 01:34:17PM -0700, Paul E. McKenney wrote: > > On Wed, Oct 12, 2016 at 12:35:43PM -0400, Rich Felker wrote: > > > On Wed, Oct 12, 2016 at 10:18:02AM +0200, Thomas Gleixner wrote: > > > > On Tue, 11 Oct 2016, Rich

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-13 Thread Paul E. McKenney
On Wed, Oct 12, 2016 at 06:19:27PM -0400, Rich Felker wrote: > On Wed, Oct 12, 2016 at 01:34:17PM -0700, Paul E. McKenney wrote: > > On Wed, Oct 12, 2016 at 12:35:43PM -0400, Rich Felker wrote: > > > On Wed, Oct 12, 2016 at 10:18:02AM +0200, Thomas Gleixner wrote: > > > > On Tue, 11 Oct 2016, Rich

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-12 Thread Rich Felker
On Wed, Oct 12, 2016 at 01:34:17PM -0700, Paul E. McKenney wrote: > On Wed, Oct 12, 2016 at 12:35:43PM -0400, Rich Felker wrote: > > On Wed, Oct 12, 2016 at 10:18:02AM +0200, Thomas Gleixner wrote: > > > On Tue, 11 Oct 2016, Rich Felker wrote: > > > > On Sun, Oct 09, 2016 at 09:23:58PM +0200,

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-12 Thread Rich Felker
On Wed, Oct 12, 2016 at 01:34:17PM -0700, Paul E. McKenney wrote: > On Wed, Oct 12, 2016 at 12:35:43PM -0400, Rich Felker wrote: > > On Wed, Oct 12, 2016 at 10:18:02AM +0200, Thomas Gleixner wrote: > > > On Tue, 11 Oct 2016, Rich Felker wrote: > > > > On Sun, Oct 09, 2016 at 09:23:58PM +0200,

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-12 Thread Paul E. McKenney
On Wed, Oct 12, 2016 at 12:35:43PM -0400, Rich Felker wrote: > On Wed, Oct 12, 2016 at 10:18:02AM +0200, Thomas Gleixner wrote: > > On Tue, 11 Oct 2016, Rich Felker wrote: > > > On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > > > > On Sun, 9 Oct 2016, Rich Felker wrote: > > > >

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-12 Thread Paul E. McKenney
On Wed, Oct 12, 2016 at 12:35:43PM -0400, Rich Felker wrote: > On Wed, Oct 12, 2016 at 10:18:02AM +0200, Thomas Gleixner wrote: > > On Tue, 11 Oct 2016, Rich Felker wrote: > > > On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > > > > On Sun, 9 Oct 2016, Rich Felker wrote: > > > >

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-12 Thread Rich Felker
On Wed, Oct 12, 2016 at 10:18:02AM +0200, Thomas Gleixner wrote: > On Tue, 11 Oct 2016, Rich Felker wrote: > > On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > > > On Sun, 9 Oct 2016, Rich Felker wrote: > > > > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > >

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-12 Thread Rich Felker
On Wed, Oct 12, 2016 at 10:18:02AM +0200, Thomas Gleixner wrote: > On Tue, 11 Oct 2016, Rich Felker wrote: > > On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > > > On Sun, 9 Oct 2016, Rich Felker wrote: > > > > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > >

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-12 Thread Thomas Gleixner
On Tue, 11 Oct 2016, Rich Felker wrote: > On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > > On Sun, 9 Oct 2016, Rich Felker wrote: > > > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > > > My preference would just be to keep the branch, but with your improved

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-12 Thread Thomas Gleixner
On Tue, 11 Oct 2016, Rich Felker wrote: > On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > > On Sun, 9 Oct 2016, Rich Felker wrote: > > > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > > > My preference would just be to keep the branch, but with your improved

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-11 Thread Rich Felker
On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > On Sun, 9 Oct 2016, Rich Felker wrote: > > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > > My preference would just be to keep the branch, but with your improved > > version that doesn't need a function call: >

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-11 Thread Rich Felker
On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > On Sun, 9 Oct 2016, Rich Felker wrote: > > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > > My preference would just be to keep the branch, but with your improved > > version that doesn't need a function call: >

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Thomas Gleixner
On Sun, 9 Oct 2016, Rich Felker wrote: > On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > > Well, you can use handle_percpu_irq() for your device interrupts if you > > guarantee at the hardware level that there is no reentrancy. > > Reentrancy is possible of course if the kernel

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Thomas Gleixner
On Sun, 9 Oct 2016, Rich Felker wrote: > On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > > Well, you can use handle_percpu_irq() for your device interrupts if you > > guarantee at the hardware level that there is no reentrancy. > > Reentrancy is possible of course if the kernel

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Rich Felker
On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > On Sun, 9 Oct 2016, Rich Felker wrote: > > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > > My preference would just be to keep the branch, but with your improved > > version that doesn't need a function call: >

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Rich Felker
On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote: > On Sun, 9 Oct 2016, Rich Felker wrote: > > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > > My preference would just be to keep the branch, but with your improved > > version that doesn't need a function call: >

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Thomas Gleixner
On Sun, 9 Oct 2016, Rich Felker wrote: > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > My preference would just be to keep the branch, but with your improved > version that doesn't need a function call: > > irqd_is_per_cpu(irq_desc_get_irq_data(desc)) > > While there is

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Thomas Gleixner
On Sun, 9 Oct 2016, Rich Felker wrote: > On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > My preference would just be to keep the branch, but with your improved > version that doesn't need a function call: > > irqd_is_per_cpu(irq_desc_get_irq_data(desc)) > > While there is

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Rich Felker
On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > On Sun, 9 Oct 2016, Rich Felker wrote: > > Ideas for improvement are welcome -- for example the > > irq_is_percpu(irq_desc_get_irq(desc)) thing looks rather silly but I > > See the other mail. > > > didn't see a better way

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Rich Felker
On Sun, Oct 09, 2016 at 01:03:10PM +0200, Thomas Gleixner wrote: > On Sun, 9 Oct 2016, Rich Felker wrote: > > Ideas for improvement are welcome -- for example the > > irq_is_percpu(irq_desc_get_irq(desc)) thing looks rather silly but I > > See the other mail. > > > didn't see a better way

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Thomas Gleixner
On Sun, 9 Oct 2016, Rich Felker wrote: > Ideas for improvement are welcome -- for example the > irq_is_percpu(irq_desc_get_irq(desc)) thing looks rather silly but I See the other mail. > didn't see a better way without poking through abstractions -- but > overall I think this both solves the

Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Thomas Gleixner
On Sun, 9 Oct 2016, Rich Felker wrote: > Ideas for improvement are welcome -- for example the > irq_is_percpu(irq_desc_get_irq(desc)) thing looks rather silly but I See the other mail. > didn't see a better way without poking through abstractions -- but > overall I think this both solves the

[PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Rich Felker
The J-Core AIC does not have separate interrupt numbers reserved for cpu-local vs global interrupts. Instead, the driver requesting the irq is expected to know whether its device uses per-cpu interrupts or not. Previously it was assumed that handle_simple_irq could work for both cases, but it

[PATCH] irqchip/jcore: fix lost per-cpu interrupts

2016-10-09 Thread Rich Felker
The J-Core AIC does not have separate interrupt numbers reserved for cpu-local vs global interrupts. Instead, the driver requesting the irq is expected to know whether its device uses per-cpu interrupts or not. Previously it was assumed that handle_simple_irq could work for both cases, but it