]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
Merge remote-tracking branch 'origin/irq/gic-retrigger' into irq/irqchip-next
authorMarc Zyngier <maz@kernel.org>
Thu, 17 Sep 2020 15:50:02 +0000 (16:50 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 17 Sep 2020 15:50:02 +0000 (16:50 +0100)
Signed-off-by: Marc Zyngier <maz@kernel.org>
1  2 
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-gic.c

Simple merge
Simple merge
index 30edcca627d60194a88c31a926cb312bfd56df0d,b59bcef69bf3143300352129e0e12e27a76e036e..6053245a4754c092b39932fdc61040e1ac7fc760
@@@ -326,6 -325,33 +326,11 @@@ static int gic_irq_set_vcpu_affinity(st
        return 0;
  }
  
 -#ifdef CONFIG_SMP
 -static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
 -                          bool force)
 -{
 -      void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + gic_irq(d);
 -      unsigned int cpu;
 -
 -      if (!force)
 -              cpu = cpumask_any_and(mask_val, cpu_online_mask);
 -      else
 -              cpu = cpumask_first(mask_val);
 -
 -      if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
 -              return -EINVAL;
 -
 -      writeb_relaxed(gic_cpu_map[cpu], reg);
 -      irq_data_update_effective_affinity(d, cpumask_of(cpu));
 -
 -      return IRQ_SET_MASK_OK_DONE;
 -}
 -#endif
 -
+ static int gic_retrigger(struct irq_data *data)
+ {
+       return !gic_irq_set_irqchip_state(data, IRQCHIP_STATE_PENDING, true);
+ }
  static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
  {
        u32 irqstat, irqnr;
@@@ -996,15 -975,9 +1002,16 @@@ static int gic_irq_domain_map(struct ir
                                irq_hw_number_t hw)
  {
        struct gic_chip_data *gic = d->host_data;
+       struct irq_data *irqd = irq_desc_get_irq_data(irq_to_desc(irq));
  
 -      if (hw < 32) {
 +      switch (hw) {
 +      case 0 ... 15:
 +              irq_set_percpu_devid(irq);
 +              irq_domain_set_info(d, irq, hw, &gic->chip, d->host_data,
 +                                  handle_percpu_devid_fasteoi_ipi,
 +                                  NULL, NULL);
 +              break;
 +      case 16 ... 31:
                irq_set_percpu_devid(irq);
                irq_domain_set_info(d, irq, hw, &gic->chip, d->host_data,
                                    handle_percpu_devid_irq, NULL, NULL);
                irq_domain_set_info(d, irq, hw, &gic->chip, d->host_data,
                                    handle_fasteoi_irq, NULL, NULL);
                irq_set_probe(irq);
-               irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
+               irqd_set_single_target(irqd);
 +              break;
        }
+       /* Prevents SW retriggers which mess up the ACK/EOI ordering */
+       irqd_set_handle_enforce_irqctx(irqd);
        return 0;
  }