Re: [PATCH v5] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler

2014-08-21 Thread Stephen Boyd
On 08/21/14 02:47, Russell King - ARM Linux wrote: > What would make more sense is if this were a read-write lock, then > gic_raise_softirq() could run concurrently on several CPUs without > interfering with each other, yet still be safe with gic_migrate_target(). > > I'd then argue that we

Re: [PATCH v5] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler

2014-08-21 Thread Russell King - ARM Linux
On Wed, Aug 20, 2014 at 12:22:41PM -0700, Stephen Boyd wrote: > @@ -605,7 +615,7 @@ static void gic_raise_softirq(const struct cpumask *mask, > unsigned int irq) > int cpu; > unsigned long flags, map = 0; > > - raw_spin_lock_irqsave(_controller_lock, flags); > +

Re: [PATCH v5] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler

2014-08-21 Thread Russell King - ARM Linux
On Wed, Aug 20, 2014 at 12:22:41PM -0700, Stephen Boyd wrote: @@ -605,7 +615,7 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) int cpu; unsigned long flags, map = 0; - raw_spin_lock_irqsave(irq_controller_lock, flags); +

Re: [PATCH v5] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler

2014-08-21 Thread Stephen Boyd
On 08/21/14 02:47, Russell King - ARM Linux wrote: What would make more sense is if this were a read-write lock, then gic_raise_softirq() could run concurrently on several CPUs without interfering with each other, yet still be safe with gic_migrate_target(). I'd then argue that we wouldn't

Re: [PATCH v5] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler

2014-08-20 Thread Nicolas Pitre
On Wed, 20 Aug 2014, Stephen Boyd wrote: > Commit 1a6b69b6548c (ARM: gic: add CPU migration support, > 2012-04-12) introduced an acquisition of the irq_controller_lock > in gic_raise_softirq() which can lead to a spinlock recursion if > the gic_arch_extn hooks call into the scheduler (via

[PATCH v5] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler

2014-08-20 Thread Stephen Boyd
Commit 1a6b69b6548c (ARM: gic: add CPU migration support, 2012-04-12) introduced an acquisition of the irq_controller_lock in gic_raise_softirq() which can lead to a spinlock recursion if the gic_arch_extn hooks call into the scheduler (via complete() or wake_up(), etc.). This happens because

[PATCH v5] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler

2014-08-20 Thread Stephen Boyd
Commit 1a6b69b6548c (ARM: gic: add CPU migration support, 2012-04-12) introduced an acquisition of the irq_controller_lock in gic_raise_softirq() which can lead to a spinlock recursion if the gic_arch_extn hooks call into the scheduler (via complete() or wake_up(), etc.). This happens because

Re: [PATCH v5] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler

2014-08-20 Thread Nicolas Pitre
On Wed, 20 Aug 2014, Stephen Boyd wrote: Commit 1a6b69b6548c (ARM: gic: add CPU migration support, 2012-04-12) introduced an acquisition of the irq_controller_lock in gic_raise_softirq() which can lead to a spinlock recursion if the gic_arch_extn hooks call into the scheduler (via complete()