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 62332C3DA42 for ; Sat, 13 Jul 2024 19:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version: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:References:List-Owner; bh=7/flHEOfDWOIf+dqS/xtKsLFBXNSaK7phCtl6CYwjEI=; b=k8qTsdLeBEw6YStvl9xlyWc6WK KVYMduF8rBJ3oedc9mp0r9Y7xVBLLt3Fici3qkjWEL1juGBbGDitys6ECZoGkOMRMeU6RkkDxn1il T2Xl6elaIQ7VtJmi1c4N3AWRCJIjn3pP3cxdzjI6v2UpYaSaFjUQNb0LxLa78yOK46H9UBXphNFFV 7vAVD33ITzn24nWljdzi07WxlOlhKwMEstsjEWNN8flwSaeZqDCIbsEFgtiVZFEUi/5b5l6aP2dtk cDAVz4lib3tcGWbYI0aghgz1KAzqliaYoqd5QaE4GbeMKILAjsfqWtsVfEcwDWaoWHMs5n/LqnsHo ly8A4dWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSiTp-000000034aX-13oG; Sat, 13 Jul 2024 19:32:25 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSiTV-000000034WC-2uW9 for linux-arm-kernel@lists.infradead.org; Sat, 13 Jul 2024 19:32:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id EB27ACE010F; Sat, 13 Jul 2024 19:32:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BAAAC32781; Sat, 13 Jul 2024 19:32:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720899122; bh=RytnnRCtAKvR5Km7Qqa/hbTzyGibJIsp0j4xPcfBwBY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=tiTncbKgCxI87hyZsX91jqLP5rzVVQJRIINWw01D4Wj3EzfJfLvZAer0bp7TxOviq UR69vTy11/Q2XieJ9xpjmXPwKsJzjxnHljnssTi/nxflNWGvatydqUtuVG94n7WmSi X/QCr2Z6kUZ3GxALgxdEyQfXRlPEbn6QItfZoxPnyccnLw/DfdSM9bsuQo3diQAj29 w3A37asvcHDs7DvxjxalIkMDUXKmU4kau0uBWfFodAVhIj8WqNSgqi+fiqi31eJMAM dc+oScFGnm5G4S/Ce8K6osgRneVPmAw0WOY+pA254l7/gBCkbjOGUSlcImyxnkq2a/ Z+AasA+u+gQ0w== Date: Sat, 13 Jul 2024 14:32:00 -0500 From: Bjorn Helgaas To: Thomas Gleixner Cc: Marek =?utf-8?B?QmVow7pu?= , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Andrew Lunn , Gregory Clement , Thomas Petazzoni , Rob Herring , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Manivannan Sadhasivam , Pali =?utf-8?B?Um9ow6Fy?= , Marc Zyngier Subject: Re: [PATCH v2] PCI: mvebu: Dispose INTx IRQs before to removing INTx domain Message-ID: <20240713193200.GA374767@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87sewdshs6.ffs@tglx> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240713_123205_933397_D55F9FF9 X-CRM114-Status: GOOD ( 19.48 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Jul 13, 2024 at 12:33:29PM +0200, Thomas Gleixner wrote: > On Fri, Jul 12 2024 at 15:41, Bjorn Helgaas wrote: > > On Thu, Jul 11, 2024 at 03:25:44PM +0200, Marek BehĂșn wrote: > >> /* Remove IRQ domains. */ > >> - if (port->intx_irq_domain) > >> + if (port->intx_irq_domain) { > >> + for (int j = 0; j < PCI_NUM_INTX; j++) { > >> + int virq = irq_find_mapping(port->intx_irq_domain, j); > >> + > >> + if (virq > 0) > >> + irq_dispose_mapping(virq); > > > > I am not an IRQ expert, so all I can really do is compare this to > > usage in other drivers. > > > > There are 20+ drivers in drivers/pci/controller, and I don't see > > irq_dispose_mapping() usage similar to this elsewhere. Does that mean > > most or all of the other drivers have a similar defect? > > Right. > > But the real question is why is such a mapping not torn down by the > entity (device, bridge, whatever) which set it up in the first place? Marek/Pali, the commit log mentions a crash when unloading. Do you have a pointer to any details? Maybe there's a driver there that we can fix? Bjorn