lkml.org 
[lkml]   [2021]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH v2 08/10] irqchip/gic-v3-its: Use irq_chip_ack_parent()
    Date
    Subsequent patches will make the GIC irqchips use a flow handler that
    issues an ->irq_ack(). irqchips of child domains need to handle this.

    Note: I'm very much not fond of this; this is treacherous and explodes if
    any parent chip doesn't have an ->ack() callback. It turns out okay with
    EOImode=0 because handle_fasteoi_irq() doesn't issue any ->ack(), but that
    is very fragile at best.

    An alternative would be to
    o make irq_chip_ack_parent() check the callback against NULL
    o make irq_chip_ack_parent() the default chip->irq_ack() via
    MSI_FLAG_USE_DEF_CHIP_OPS.

    XXX: what about pMSI and fMSI ?

    Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
    ---
    drivers/irqchip/irq-gic-v3-its-pci-msi.c | 1 +
    drivers/irqchip/irq-gic-v3-its.c | 1 +
    2 files changed, 2 insertions(+)

    diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
    index ad2810c017ed..5bc2787ee86a 100644
    --- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c
    +++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
    @@ -27,6 +27,7 @@ static struct irq_chip its_msi_irq_chip = {
    .name = "ITS-MSI",
    .irq_unmask = its_unmask_msi_irq,
    .irq_mask = its_mask_msi_irq,
    + .irq_ack = irq_chip_ack_parent,
    .irq_eoi = irq_chip_eoi_parent,
    .irq_write_msi_msg = pci_msi_domain_write_msg,
    };
    diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
    index 2e6923c2c8a8..ce39d52409e9 100644
    --- a/drivers/irqchip/irq-gic-v3-its.c
    +++ b/drivers/irqchip/irq-gic-v3-its.c
    @@ -1976,6 +1976,7 @@ static struct irq_chip its_irq_chip = {
    .name = "ITS",
    .irq_mask = its_mask_irq,
    .irq_unmask = its_unmask_irq,
    + .irq_ack = irq_chip_ack_parent,
    .irq_eoi = irq_chip_eoi_parent,
    .irq_set_affinity = its_set_affinity,
    .irq_compose_msi_msg = its_irq_compose_msi_msg,
    --
    2.25.1
    \
     
     \ /
      Last update: 2021-05-25 19:34    [W:5.372 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site