From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59958C2B9F8 for ; Tue, 25 May 2021 17:44:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E1B5611BE for ; Tue, 25 May 2021 17:44:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E1B5611BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KtNuauMj2e5LMI2fvOwdxCm+ByfT9wlDQwvzmvO19+w=; b=O58ASjcqy2wQkw iIJ8PpsYcRdVeKv7VTcUa0eFj2czwfQrybMfGVOJ04h08g2hUYBsfr6/3eU2Kg2322tIJEgTOuTPk nf6RbE40SIotPmi0BUmbfKxon4iYo4wk0ka7e3hwslNKuVbZ2bfae2PcwwGTiefEJUiJxFYofN0v7 +zjFiUjCzt13TJxPjHwxVQXTQhbc2q2FKDEb6CPIXdQb96rBxMnWDKHr5xH0rkk09HPFzPaIepTbu LhPNWRwoo2zQub9z/Q4OozdHCH87IO862QinDSJ3nHJApnnN/H5P6bUELmsr62/7CxiC1TFYOw0JF HXQ7WipWuovhWhHfx0JA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llb4M-006ybD-CL; Tue, 25 May 2021 17:42:19 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llavn-006uj2-7d for linux-arm-kernel@lists.infradead.org; Tue, 25 May 2021 17:33:28 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56BFB168F; Tue, 25 May 2021 10:33:25 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 467B43F792; Tue, 25 May 2021 10:33:24 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marc Zyngier , Thomas Gleixner , Lorenzo Pieralisi , Vincenzo Frascino Subject: [RFC PATCH v2 08/10] irqchip/gic-v3-its: Use irq_chip_ack_parent() Date: Tue, 25 May 2021 18:32:53 +0100 Message-Id: <20210525173255.620606-9-valentin.schneider@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210525173255.620606-1-valentin.schneider@arm.com> References: <20210525173255.620606-1-valentin.schneider@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210525_103327_370312_DC64FD0A X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel