Skip to content

Commit

Permalink
irqchip/mips-gic: Clear percpu_masks correctly when mapping
Browse files Browse the repository at this point in the history
When setting the mapping for a hwirq, make sure we clear percpu_masks for
all other cpus in case it was set previously.

Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: <jason@lakedaemon.net>
Cc: <marc.zyngier@arm.com>
Cc: <jiang.liu@linux.intel.com>
Cc: <linux-mips@linux-mips.org>
Cc: <lisa.parratt@imgtec.com>
Cc: Qais Yousef <qsyousef@gmail.com>
Link: http://lkml.kernel.org/r/1449580830-23652-16-git-send-email-qais.yousef@imgtec.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Qais Yousef authored and Thomas Gleixner committed Feb 25, 2016
1 parent 2a07870 commit 78930f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/irqchip/irq-mips-gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,13 +773,16 @@ static int gic_shared_irq_domain_map(struct irq_domain *d, unsigned int virq,
{
int intr = GIC_HWIRQ_TO_SHARED(hw);
unsigned long flags;
int i;

irq_set_chip_and_handler(virq, &gic_level_irq_controller,
handle_level_irq);

spin_lock_irqsave(&gic_lock, flags);
gic_map_to_pin(intr, gic_cpu_pin);
gic_map_to_vpe(intr, vpe);
for (i = 0; i < gic_vpes; i++)
clear_bit(intr, pcpu_masks[i].pcpu_mask);
set_bit(intr, pcpu_masks[vpe].pcpu_mask);
spin_unlock_irqrestore(&gic_lock, flags);

Expand Down

0 comments on commit 78930f0

Please sign in to comment.