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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7B1A7C4332F for ; Wed, 4 Jan 2023 16:07:32 +0000 (UTC) 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EtGevbk4hrdJG2dICIOClMkmvkYMKlkWOkErnf/dP2Q=; b=UZpHauOEjfPqTB ifnC4ueQXP04N5JHI1JBpRuPkPQx0DnWUtmpmZkNxFpJwgq8qcRNwrkHqJCCOapDIPRLeQtGpuRhp TcoNY5QJWFGpab2HsBL8PVEnUpD7v4uJjz40GbEWotKKmKcKAOXow6k7LH4ZdXZ9PCkiVMuKId6xt nshJo4t4dfph3Talh72z2apy9HYE/QLr6HdMdsJ8iF8+6Iw1Lcgj5K6WrbuES/ri8ReAkEDKDB2xY 9WoFTh2WkRNavXW2L094RkP9W/kHq9ccVSLmBvVOHlLGM9EySq4qyP41o8w6QNoKevOFqvKmWmsMM bOZUvJFhqDjPopQuupUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pD6Hm-00AIK2-5U; Wed, 04 Jan 2023 16:06:38 +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 1pD6FZ-00AHwM-R5 for linux-arm-kernel@lists.infradead.org; Wed, 04 Jan 2023 16:04:23 +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 EEC65165C; Wed, 4 Jan 2023 08:04:59 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.37.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 831753F71A; Wed, 4 Jan 2023 08:04:17 -0800 (PST) Date: Wed, 4 Jan 2023 16:04:14 +0000 From: Mark Rutland To: Joakim Tjernlund Cc: "linux-arm-kernel@lists.infradead.org" , Marc Zyngier Subject: Re: [PATCH] GICv3: Add restart handler to detach CPU from GICv3 Message-ID: References: <20221216162128.10808-1-joakim.tjernlund@infinera.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230104_080422_118750_143EEB84 X-CRM114-Status: GOOD ( 26.12 ) 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 On Tue, Jan 03, 2023 at 04:27:07PM +0000, Joakim Tjernlund wrote: > On Fri, 2022-12-16 at 17:21 +0100, Joakim Tjernlund wrote: > > Ping? To whom? You don't appeared to have Cc'd any relevant maintainer, and people are still on holiday, so it's extremely likely this will be missed. For the maintainer, please use scripts/get_maintainer.pl, e.g. | [mark@lakrids:~/src/linux]% ./scripts/get_maintainer.pl -f drivers/irqchip/irq-gic-v3.c | Thomas Gleixner (maintainer:IRQCHIP DRIVERS) | Marc Zyngier (maintainer:IRQCHIP DRIVERS) | linux-kernel@vger.kernel.org (open list:IRQCHIP DRIVERS) Note: I've Cc'd Marc, who wrote the GICv3 driver. > > Needed for reboot without resetting the whole GIC This doesn't really explain what you're trying to do nor why. Why do you need to "reboot without resetting the whole GIC" ? Do you encounter a problem if we try to reset the whole GIC? Is this for kexec? Is this for some use-case enabled by out-of-tree code? Thanks, Mark. > > > > Signed-off-by: Joakim Tjernlund > > --- > > drivers/irqchip/irq-gic-v3.c | 18 ++++++++++++++++++ > > 1 file changed, 18 insertions(+) > > > > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > > index dd7e7f061e8f..1989ea3d2db4 100644 > > --- a/drivers/irqchip/irq-gic-v3.c > > +++ b/drivers/irqchip/irq-gic-v3.c > > @@ -23,6 +23,7 @@ > > #include > > #include > > #include > > +#include > > > > #include > > #include > > @@ -1359,6 +1360,22 @@ static void gic_cpu_pm_init(void) > > static inline void gic_cpu_pm_init(void) { } > > #endif /* CONFIG_CPU_PM */ > > > > +static int gicv3_restart_notify(struct notifier_block *nb, > > + unsigned long mode, void *cmd) > > +{ > > + if (gic_dist_security_disabled()) { > > + gic_write_grpen1(0); > > + gic_enable_redist(false); > > + } > > + > > + return NOTIFY_DONE; > > +} > > + > > +static struct notifier_block gicv3_restart_nb = { > > + .notifier_call = gicv3_restart_notify, > > + .priority = 255, /* Call last */ > > +}; > > + > > static struct irq_chip gic_chip = { > > .name = "GICv3", > > .irq_mask = gic_mask_irq, > > @@ -1849,6 +1866,7 @@ static int __init gic_init_bases(void __iomem *dist_base, > > gic_cpu_init(); > > gic_smp_init(); > > gic_cpu_pm_init(); > > + register_restart_handler(&gicv3_restart_nb); > > > > if (gic_dist_supports_lpis()) { > > its_init(handle, &gic_data.rdists, gic_data.domain); > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel