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 7E48D3AB294 for ; Mon, 30 Mar 2026 08:17:13 +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=1774858633; cv=none; b=qjcl23sGw542/BF7xf+UtBd7f8BRmdKrqQ2NwCFwhFdYc7JJLhmxHqIQJ/ydW3KtJvP+oFO+0VGpO1akmPoBO5Yj2FiEzwDLieXHF0Jzixv6OLgvBvxBgTiJ9c7iueLdKPaLlH5zUnVvWbWAY2WasVNhT07F3VmAu9rSnYepbkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774858633; c=relaxed/simple; bh=BLEFidgjY451Cu+Ff+Mps/7qaBPiMF2PQd7FW/Radh0=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=b8O/Bh+jWh/6OtmSlJOBCBI4EgNCGIEUYELVj1XuhPp0UjDQiUpkwIwIAu2DDc4A7Ms/fUkP33VevAp/xry/cttmE6YnSsqbygfO+ySbjuIMEwRPiuwsV2cMxmlZDLl1yQnFN5PDBeCCPjnUawYN52+AkWaMoPJGJHQGixL0ku8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jBvB6Cer; 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="jBvB6Cer" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D044C4CEF7; Mon, 30 Mar 2026 08:17:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774858633; bh=BLEFidgjY451Cu+Ff+Mps/7qaBPiMF2PQd7FW/Radh0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jBvB6CeryHoW0pwPMxt3n0SavfndwXgdBz3VDWcSAAhEJoAdTuyUVyAcaj4GiKgeB c3SlkARh49ijc1pF8abIhiv11SthDyGUbtG7cJa6SoKmrYScDQw9HGAHg+HWmyikWb MF4iRuSRDxnDVJ4SkuK5a0iQjVFcjtDLwo5iGUSh95Wk4NrW9Ef8Fi0lPjDkk1ArEH bB8zLn5vbSVB/kVvb7Q1Mn+wkGHMXf/BauY8zgE0nHxaq51igSeCP0gEZEl+bRbWCx G9kNgCAxPZ2Ag8b8eLY/xjthqOTwfJt7gGQeMaaRzZJ080zZooAqHl7REBDB3Echg2 FwXEGf0kzlXCQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w77o6-00000006z9Z-3dHE; Mon, 30 Mar 2026 08:17:11 +0000 Date: Mon, 30 Mar 2026 09:17:10 +0100 Message-ID: <86cy0l4tq1.wl-maz@kernel.org> From: Marc Zyngier To: Manivannan Sadhasivam Cc: Qiang Yu , tglx@linutronix.de, linux-kernel@vger.kernel.org Subject: Re: MSIs not freed in GICv3 ITS driver In-Reply-To: References: <20240708153933.GC5745@thinkpad> <865xtf4woi.wl-maz@kernel.org> <20240709173708.GA44420@thinkpad> <877cdupdvu.wl-maz@kernel.org> <20240721085032.GL1908@thinkpad> <4pdu25dnnqegnd67zf4ftfvwc57bn67kp7mj2gk2cywc3hdcvr@eydar5gvuwtu> <86wm08ad2y.wl-maz@kernel.org> <865x7jaajs.wl-maz@kernel.org> 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/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: mani@kernel.org, qiang.yu@oss.qualcomm.com, tglx@linutronix.de, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 03 Mar 2026 09:26:32 +0000, Manivannan Sadhasivam wrote: > > The above issue should be applicable to other MSI controller drivers as well, > not just DWC. The core issue is not with the irqchips, but with the MSI subsystem. Multi-MSI devices should always result in a strict power-of-2 allocation, because that's all the HW supports. Yet, we let drivers request a stupid number of interrupts. I can see two outcomes: either we force the allocation to the next 2^ value, or we return an error to the caller. The first one costs memory (extra irq descriptors), the latter forces people to fix their crap. I'm tempted to propose the latter. M. -- Without deviation from the norm, progress is not possible.