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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 3CA99C43461 for ; Thu, 8 Apr 2021 15:44:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16AD0610C7 for ; Thu, 8 Apr 2021 15:44:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232179AbhDHPoa (ORCPT ); Thu, 8 Apr 2021 11:44:30 -0400 Received: from foss.arm.com ([217.140.110.172]:52204 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232116AbhDHPoU (ORCPT ); Thu, 8 Apr 2021 11:44:20 -0400 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 78DFF11B3; Thu, 8 Apr 2021 08:44:09 -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 770373F694; Thu, 8 Apr 2021 08:44:08 -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 08/10] irqchip/gic-v3-its: Use irq_chip_ack_parent() Date: Thu, 8 Apr 2021 16:43:24 +0100 Message-Id: <20210408154326.3988781-9-valentin.schneider@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210408154326.3988781-1-valentin.schneider@arm.com> References: <20210408154326.3988781-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 c3485b230d70..d6856750c084 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -1971,6 +1971,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 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=-16.8 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 42EB7C433B4 for ; Thu, 8 Apr 2021 15:46:13 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 BBFD061107 for ; Thu, 8 Apr 2021 15:46:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BBFD061107 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=desiato.20200630; 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=p9CkSoHeNIiY1374tAJl1tzH97yghWrUMMB5aIRt1mI=; b=YY1HUT2SFicwk0X35Wj+C4CAT dzLGXOZJMEibvAc8sSO++F0JAzW7ObSx9OGuEk0gaCWK8RhvY+pdV1865ZYR7B9m7n2Xv6E1/kghw PKmcCjMm0BZAN3KFyImxqbsOUwp3mN8LUjAxU5O0QkWqEEok71YNvt8SG2EFFKfaG52Uj+hELPDK+ /Bgd+To6qhxxcZb5YDla5noJPxdTNxVEWkWLvlOhKTwLz9RRMTjdsm2NQeZ/vunMZ3M47T9UC/tvK Htac47+Nc+7DlNhIqo8onbWjOB7OIs4C+CCqAV9H2E5ZAdKPECgRzGEii4bWaIUgMtykQUaSr4i3z +X7yn5zGQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUWpy-008SS4-4R; Thu, 08 Apr 2021 15:44:54 +0000 Received: from foss.arm.com ([217.140.110.172]) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUWpG-008SEB-Bh for linux-arm-kernel@lists.infradead.org; Thu, 08 Apr 2021 15:44:12 +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 78DFF11B3; Thu, 8 Apr 2021 08:44:09 -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 770373F694; Thu, 8 Apr 2021 08:44:08 -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 08/10] irqchip/gic-v3-its: Use irq_chip_ack_parent() Date: Thu, 8 Apr 2021 16:43:24 +0100 Message-Id: <20210408154326.3988781-9-valentin.schneider@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210408154326.3988781-1-valentin.schneider@arm.com> References: <20210408154326.3988781-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-20210408_164410_586935_C3065F76 X-CRM114-Status: GOOD ( 10.42 ) 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 c3485b230d70..d6856750c084 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -1971,6 +1971,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