Skip to content

Commit b4e8d64

Browse files
author
Marc Zyngier
committed
irqchip/gic-v4.1: Plumb mask/unmask SGI callbacks
Implement mask/unmask for virtual SGIs by calling into the configuration helper. Signed-off-by: Marc Zyngier <[email protected]> Reviewed-by: Zenghui Yu <[email protected]> Reviewed-by: Eric Auger <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e252cf8 commit b4e8d64

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3944,6 +3944,22 @@ static void its_configure_sgi(struct irq_data *d, bool clear)
39443944
its_send_single_vcommand(find_4_1_its(), its_build_vsgi_cmd, &desc);
39453945
}
39463946

3947+
static void its_sgi_mask_irq(struct irq_data *d)
3948+
{
3949+
struct its_vpe *vpe = irq_data_get_irq_chip_data(d);
3950+
3951+
vpe->sgi_config[d->hwirq].enabled = false;
3952+
its_configure_sgi(d, false);
3953+
}
3954+
3955+
static void its_sgi_unmask_irq(struct irq_data *d)
3956+
{
3957+
struct its_vpe *vpe = irq_data_get_irq_chip_data(d);
3958+
3959+
vpe->sgi_config[d->hwirq].enabled = true;
3960+
its_configure_sgi(d, false);
3961+
}
3962+
39473963
static int its_sgi_set_affinity(struct irq_data *d,
39483964
const struct cpumask *mask_val,
39493965
bool force)
@@ -3958,6 +3974,8 @@ static int its_sgi_set_affinity(struct irq_data *d,
39583974

39593975
static struct irq_chip its_sgi_irq_chip = {
39603976
.name = "GICv4.1-sgi",
3977+
.irq_mask = its_sgi_mask_irq,
3978+
.irq_unmask = its_sgi_unmask_irq,
39613979
.irq_set_affinity = its_sgi_set_affinity,
39623980
};
39633981

0 commit comments

Comments
 (0)