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=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 CC8E9C433B4 for ; Tue, 27 Apr 2021 12:35:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9533F613C2 for ; Tue, 27 Apr 2021 12:35:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235428AbhD0Mf4 (ORCPT ); Tue, 27 Apr 2021 08:35:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:52418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235410AbhD0Mf4 (ORCPT ); Tue, 27 Apr 2021 08:35:56 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16CF9613C1; Tue, 27 Apr 2021 12:35:13 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lbMvm-009g6L-VJ; Tue, 27 Apr 2021 13:35:11 +0100 Date: Tue, 27 Apr 2021 13:35:10 +0100 Message-ID: <87lf93oqgx.wl-maz@kernel.org> From: Marc Zyngier To: Anirudha Sarangi Cc: Thomas Gleixner , Michal Simek , Valentin Schneider , Douglas Anderson , Hans de Goede , Maulik Shah , Zhen Lei , , , Rob Herring , Frank Rowand , , Subject: Re: [PATCH 2/3] irqchip: Add support to remove irqchip driver modules. In-Reply-To: <20210427113136.12469-3-anirudha.sarangi@xilinx.com> References: <20210427113136.12469-1-anirudha.sarangi@xilinx.com> <20210427113136.12469-3-anirudha.sarangi@xilinx.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: anirudha.sarangi@xilinx.com, tglx@linutronix.de, michal.simek@xilinx.com, valentin.schneider@arm.com, dianders@chromium.org, hdegoede@redhat.com, mkshah@codeaurora.org, thunder.leizhen@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, frowand.list@gmail.com, devicetree@vger.kernel.org, git@xilinx.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, 27 Apr 2021 12:31:35 +0100, Anirudha Sarangi wrote: > > The existing irqchip implementation does not fully support use cases > where an irqchip driver has to be used as a module. In particular there > is no support to remove an irqchip driver module. > The use cases where an irqchip driver has to be loaded and then removed > as a module are really relevant in fpga world. A user can decide to > have a irqchip as part of a removable partial fpga region. In such cases > not only the corresponding irqchip driver has to be loaded as a module, > but must also be removed when the removable partial region is removed. > > The existing implementation updates the existing framework to achieve > the above said goal. > > Signed-off-by: Anirudha Sarangi There is absolutely no way we can entertain the removal of an interrupt controller based on *this*. What happen to the irqdesc structures? What happen when a client driver decides to do a disable_irq(), or any other interaction with the interrupt controller that now has dangling pointers everywhere (if your third patch is supposed to be an example of how to use this functionality)? So no, you can't do that until you figure out all the dependencies that need to be accounted for to safely remove an interrupt controller. M. -- Without deviation from the norm, progress is not possible.