Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Mon, 24 Nov 2014, Daniel Thompson wrote: > On 24/11/14 20:38, Thomas Gleixner wrote: > > So while I cannot come up with a brilliant replacement, it would be > > really helpful documentation wise if you could do the following: > > > > 1) Create a patch which introduces irq_migration_lock as a

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Daniel Thompson
On 24/11/14 20:41, Thomas Gleixner wrote: > On Mon, 24 Nov 2014, Daniel Thompson wrote: >> I did want to remove the lock too. However when I reviewed this code I >> concluded the lock was still required. Without it I think it is possible >> for gic_raise_softirq() to raise an IPI on the old core

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Daniel Thompson
On 24/11/14 20:38, Thomas Gleixner wrote: > On Mon, 24 Nov 2014, Thomas Gleixner wrote: >> On Mon, 24 Nov 2014, Thomas Gleixner wrote: >>> On Fri, 14 Nov 2014, Daniel Thompson wrote: diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 38493ff28fa5..0db62a6f1ee3

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Mon, 24 Nov 2014, Daniel Thompson wrote: > I did want to remove the lock too. However when I reviewed this code I > concluded the lock was still required. Without it I think it is possible > for gic_raise_softirq() to raise an IPI on the old core *after* the code > to migrate pending IPIs has

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Mon, 24 Nov 2014, Thomas Gleixner wrote: > On Mon, 24 Nov 2014, Thomas Gleixner wrote: > > On Fri, 14 Nov 2014, Daniel Thompson wrote: > > > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > > > index 38493ff28fa5..0db62a6f1ee3 100644 > > > --- a/drivers/irqchip/irq-gic.c > >

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Daniel Thompson
On 24/11/14 18:48, Thomas Gleixner wrote: > On Mon, 24 Nov 2014, Thomas Gleixner wrote: >> On Fri, 14 Nov 2014, Daniel Thompson wrote: >>> diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c >>> index 38493ff28fa5..0db62a6f1ee3 100644 >>> --- a/drivers/irqchip/irq-gic.c >>> +++

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Mon, 24 Nov 2014, Thomas Gleixner wrote: > On Fri, 14 Nov 2014, Daniel Thompson wrote: > > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > > index 38493ff28fa5..0db62a6f1ee3 100644 > > --- a/drivers/irqchip/irq-gic.c > > +++ b/drivers/irqchip/irq-gic.c > > @@ -73,6 +73,13

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Daniel Thompson
On 24/11/14 18:20, Thomas Gleixner wrote: > On Fri, 14 Nov 2014, Daniel Thompson wrote: >> diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c >> index 38493ff28fa5..0db62a6f1ee3 100644 >> --- a/drivers/irqchip/irq-gic.c >> +++ b/drivers/irqchip/irq-gic.c >> @@ -73,6 +73,13 @@

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Fri, 14 Nov 2014, Daniel Thompson wrote: > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > index 38493ff28fa5..0db62a6f1ee3 100644 > --- a/drivers/irqchip/irq-gic.c > +++ b/drivers/irqchip/irq-gic.c > @@ -73,6 +73,13 @@ struct gic_chip_data { > static

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Fri, 14 Nov 2014, Daniel Thompson wrote: diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 38493ff28fa5..0db62a6f1ee3 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -73,6 +73,13 @@ struct gic_chip_data { static

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Daniel Thompson
On 24/11/14 18:20, Thomas Gleixner wrote: On Fri, 14 Nov 2014, Daniel Thompson wrote: diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 38493ff28fa5..0db62a6f1ee3 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -73,6 +73,13 @@ struct

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Mon, 24 Nov 2014, Thomas Gleixner wrote: On Fri, 14 Nov 2014, Daniel Thompson wrote: diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 38493ff28fa5..0db62a6f1ee3 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -73,6 +73,13 @@ struct

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Daniel Thompson
On 24/11/14 18:48, Thomas Gleixner wrote: On Mon, 24 Nov 2014, Thomas Gleixner wrote: On Fri, 14 Nov 2014, Daniel Thompson wrote: diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 38493ff28fa5..0db62a6f1ee3 100644 --- a/drivers/irqchip/irq-gic.c +++

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Mon, 24 Nov 2014, Thomas Gleixner wrote: On Mon, 24 Nov 2014, Thomas Gleixner wrote: On Fri, 14 Nov 2014, Daniel Thompson wrote: diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 38493ff28fa5..0db62a6f1ee3 100644 --- a/drivers/irqchip/irq-gic.c +++

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Mon, 24 Nov 2014, Daniel Thompson wrote: I did want to remove the lock too. However when I reviewed this code I concluded the lock was still required. Without it I think it is possible for gic_raise_softirq() to raise an IPI on the old core *after* the code to migrate pending IPIs has been

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Daniel Thompson
On 24/11/14 20:38, Thomas Gleixner wrote: On Mon, 24 Nov 2014, Thomas Gleixner wrote: On Mon, 24 Nov 2014, Thomas Gleixner wrote: On Fri, 14 Nov 2014, Daniel Thompson wrote: diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 38493ff28fa5..0db62a6f1ee3 100644 ---

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Daniel Thompson
On 24/11/14 20:41, Thomas Gleixner wrote: On Mon, 24 Nov 2014, Daniel Thompson wrote: I did want to remove the lock too. However when I reviewed this code I concluded the lock was still required. Without it I think it is possible for gic_raise_softirq() to raise an IPI on the old core *after*

Re: [PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-24 Thread Thomas Gleixner
On Mon, 24 Nov 2014, Daniel Thompson wrote: On 24/11/14 20:38, Thomas Gleixner wrote: So while I cannot come up with a brilliant replacement, it would be really helpful documentation wise if you could do the following: 1) Create a patch which introduces irq_migration_lock as a raw

[PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-14 Thread Daniel Thompson
Currently calling printk() from a FIQ can result in deadlock on irq_controller_lock within gic_raise_softirq(). This occurs because printk(), which is otherwise structured to survive calls from FIQ/NMI, calls this function to raise an IPI when it needs to wake_up_klogd(). This patch fixes the

[PATCH 3.18-rc3 v8 1/4] irqchip: gic: Make gic_raise_softirq() FIQ-safe

2014-11-14 Thread Daniel Thompson
Currently calling printk() from a FIQ can result in deadlock on irq_controller_lock within gic_raise_softirq(). This occurs because printk(), which is otherwise structured to survive calls from FIQ/NMI, calls this function to raise an IPI when it needs to wake_up_klogd(). This patch fixes the