Skip to content

Commit 78930f0

Browse files
Qais YousefKAGA-KOKO
Qais Yousef
authored andcommitted
irqchip/mips-gic: Clear percpu_masks correctly when mapping
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 <[email protected]> Acked-by: Ralf Baechle <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: Qais Yousef <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 2a07870 commit 78930f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/irqchip/irq-mips-gic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,13 +773,16 @@ static int gic_shared_irq_domain_map(struct irq_domain *d, unsigned int virq,
773773
{
774774
int intr = GIC_HWIRQ_TO_SHARED(hw);
775775
unsigned long flags;
776+
int i;
776777

777778
irq_set_chip_and_handler(virq, &gic_level_irq_controller,
778779
handle_level_irq);
779780

780781
spin_lock_irqsave(&gic_lock, flags);
781782
gic_map_to_pin(intr, gic_cpu_pin);
782783
gic_map_to_vpe(intr, vpe);
784+
for (i = 0; i < gic_vpes; i++)
785+
clear_bit(intr, pcpu_masks[i].pcpu_mask);
783786
set_bit(intr, pcpu_masks[vpe].pcpu_mask);
784787
spin_unlock_irqrestore(&gic_lock, flags);
785788

0 commit comments

Comments
 (0)