@@ -1221,6 +1221,11 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
12211221#define gic_smp_init () do { } while(0)
12221222#endif
12231223
1224+ static int gic_retrigger (struct irq_data * data )
1225+ {
1226+ return !gic_irq_set_irqchip_state (data , IRQCHIP_STATE_PENDING , true);
1227+ }
1228+
12241229#ifdef CONFIG_CPU_PM
12251230static int gic_cpu_pm_notifier (struct notifier_block * self ,
12261231 unsigned long cmd , void * v )
@@ -1256,6 +1261,7 @@ static struct irq_chip gic_chip = {
12561261 .irq_eoi = gic_eoi_irq ,
12571262 .irq_set_type = gic_set_type ,
12581263 .irq_set_affinity = gic_set_affinity ,
1264+ .irq_retrigger = gic_retrigger ,
12591265 .irq_get_irqchip_state = gic_irq_get_irqchip_state ,
12601266 .irq_set_irqchip_state = gic_irq_set_irqchip_state ,
12611267 .irq_nmi_setup = gic_irq_nmi_setup ,
@@ -1273,6 +1279,7 @@ static struct irq_chip gic_eoimode1_chip = {
12731279 .irq_eoi = gic_eoimode1_eoi_irq ,
12741280 .irq_set_type = gic_set_type ,
12751281 .irq_set_affinity = gic_set_affinity ,
1282+ .irq_retrigger = gic_retrigger ,
12761283 .irq_get_irqchip_state = gic_irq_get_irqchip_state ,
12771284 .irq_set_irqchip_state = gic_irq_set_irqchip_state ,
12781285 .irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity ,
@@ -1288,6 +1295,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
12881295 irq_hw_number_t hw )
12891296{
12901297 struct irq_chip * chip = & gic_chip ;
1298+ struct irq_data * irqd = irq_desc_get_irq_data (irq_to_desc (irq ));
12911299
12921300 if (static_branch_likely (& supports_deactivate_key ))
12931301 chip = & gic_eoimode1_chip ;
@@ -1312,7 +1320,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
13121320 irq_domain_set_info (d , irq , hw , chip , d -> host_data ,
13131321 handle_fasteoi_irq , NULL , NULL );
13141322 irq_set_probe (irq );
1315- irqd_set_single_target (irq_desc_get_irq_data ( irq_to_desc ( irq )) );
1323+ irqd_set_single_target (irqd );
13161324 break ;
13171325
13181326 case LPI_RANGE :
@@ -1326,6 +1334,8 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
13261334 return - EPERM ;
13271335 }
13281336
1337+ /* Prevents SW retriggers which mess up the ACK/EOI ordering */
1338+ irqd_set_handle_enforce_irqctx (irqd );
13291339 return 0 ;
13301340}
13311341
0 commit comments