From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E48B718E20 for ; Sat, 13 Jul 2024 19:32:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720899123; cv=none; b=eUFUcvW2o69SyFW6LMicNDfPZUirkrSteyPBCYN6t3LjTYWs1oHBpgWeHQ6I31LxqdeK2RdgakMPfkZPmCwBt91ccUAV5SVQZ+0CjJoC3png3Tk+RFIk8Cg25GJ3HS2cqwTBeyLjiTFrtTCBBMcHRUHqklxmyRsF/FmZco1AbL4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720899123; c=relaxed/simple; bh=RytnnRCtAKvR5Km7Qqa/hbTzyGibJIsp0j4xPcfBwBY=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=Lofor/HEYbxgE8iWPllhMfLQqNKm4wy1zLzJhWXQSXOY5PA6BLlc3A8bFIMyNy1CZ08XSakTqQ26ejw+GR/7LhOh9HwRfNJ322s8CzySWvgsRDYyi0uNpK9lxdROXGMkWZ63QGjRrt9/t/v5tE162wrpmnyaH0bLgw2sA7AcefE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tiTncbKg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tiTncbKg" 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> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87sewdshs6.ffs@tglx> 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