From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2638606A335 for ; Mon, 30 Nov 2026 09:50:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LkqOpB7Z; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=uwB2xHAd; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=qnBINZPv 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:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=ho1uN8vp3lM8jNBMEgmqd6hM9P7jPXM2CyTGKriEmuU=; b=LkqOpB7ZNWFN9bYRI8I5Po9s12 gGHfWlmJ5oFjyjR15nSVOLM1bbfHrIVBHEsteGQ0OUllyDqNNwPrL8TeRvxfJrS9w+koX8Ez3CSS7 X4Cu6zOCuhRCs5YgzLO89Q+xcctgt9v+QvHTcqI5b38Wg4MBnTFEtTQtlyXzWqtqd7gNCv3w3mzBw Ztm+EBH8VHr49WjeMOnw2MnNk3DkMcXwdTckKNKUfXJC3wv7FQZwOhUA+3GP7BWYOC6s5Nt2kNPd0 WQk29xoVx7JbTsM5fK4VjLKswSGbTaBvlzFuZ64sYArqlAegpG8MZQMdsUvcrVYLTHBOTZEShfrPL mzUc32Fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXy11-00000003yz4-1pMZ; Mon, 30 Nov 2026 09:49:43 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXy0w-00000003yvO-1mvZ for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2026 09:49:40 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796032174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ho1uN8vp3lM8jNBMEgmqd6hM9P7jPXM2CyTGKriEmuU=; b=uwB2xHAduA7h6S9HQ+mKnhYce1Kav4CkY1rE2Xde9HhWq62QsgXa71tzvAyg7/3SOU6/JZ zEkY1ohUx+5L/y9ul8V07OOWXZtmylgJ/ohQHQD4lYhu1odRK/R3hddEDmP0CTzr+iBSJ5 OkFLtUJ6abrEmbR3WaapEFCjI+QqTzCCLMzgObCNnbnZoj+iiQB+UUUzGNB76vUWjLwA+b GaF6czCpUXyPnTncE7obzTvXXDo4q0dnZuQL2UAqOwQYINVaFf8fy6WzX6HBgpkNuTo2II MspIaL4fNejdgfULDULxc3sWGqcYymjZu0ITIpGbObKq1Rbloh9SJ737pkHTfw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796032174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ho1uN8vp3lM8jNBMEgmqd6hM9P7jPXM2CyTGKriEmuU=; b=qnBINZPvo0sKaaeTU3c4P6oAkvy+WaRmWf044eeOKbDM71NzU7dajrtOZ1lzPkqG6tPc3m uMItmUcoMySb0jAQ== To: Chaoyong Zhou , maz@kernel.org, linux-arm-kernel@lists.infradead.org Cc: stable@vger.kernel.org Subject: Re: [PATCH RESEND v2] irqdomain: Restore block-wise Multi-MSI free semantics In-Reply-To: References: <8cb676da416dc4dd3cdf4c6ee1a87db887e70886.adc02e38.fb00.4c86.a424.c9153ba82907@feishu.cn> Date: Mon, 30 Nov 2026 10:49:33 +0100 Message-ID: <87mrqqr6mq.ffs@fw13> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_014938_639754_8FCAC95B X-CRM114-Status: GOOD ( 21.31 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Fri, Nov 27 2026 at 15:59, Chaoyong Zhou wrote: > From: Chaoyong Zhou > > Please note: this is a resend from my personal mailbox > (zhoucyfx@foxmail.com). The initial copy on 2026-11-25 was sent from my > work address (zhouchaoyong@ruijie.com.cn) and reached you both, but our > corporate mail gateway mangles outgoing mail into multipart/alternative > (HTML), which the infradead list rejects with "550 Mailing lists do not > accept HTML mail", so the list copies bounced twice. Sending via git > send-email over this mailbox keeps the mail text/plain only. How is that relevant for the change log? Put such information under the "---" cutoff if at all. Nobody cares how about your email problems. > Restore the pre-existing block-wise free semantics: when the whole > range is consistently mapped, hand it down to the domains as a single > block, exactly mirroring the allocation. Keep the per-interrupt > fallback for inconsistent ranges, preserving the protection introduced > by commit 4615fbc3788d ("genirq/irqdomain: Don't try to free an interrupt > that has no mapping") for unwinding partially allocated ranges. > > Fixes: 4615fbc3788d ("genirq/irqdomain: Don't try to free an interrupt that has no mapping") > The interrupts of a Multi-MSI descriptor are allocated from the MSI > controllers as a single aligned block: the ITS (GICv3 and GICv5) and > the Armada 370/XP drivers, amongst others, round the vector count up > to a power of two and carve the region out of their per-device event > bitmap with bitmap_find_free_region(). > > Commit 4615fbc3788d ("genirq/irqdomain: Don't try to free an > interrupt that has no mapping") changed irq_domain_free_irqs_hierarchy() > to free the interrupts of a range one at a time, to protect against > error paths trying to free interrupts that were never allocated. > > That changed the contract with the underlying domains: a Multi-MSI > block is now released one interrupt at a time with nr_irqs == 1, > which cannot unwind the aligned region the allocation created. The > unused tail of the block is never released, leaving stale bits in the > event bitmap. As a result the MSI device is never fully reclaimed > (its_irq_domain_free() only mops up the device once its bitmap is > empty), and re-probing the device fails to allocate the same number > of vectors, silently degrading to a single MSI. > > This has been reported for GICv3 ITS: > > https://lore.kernel.org/all/20240708153933.GC5745@thinkpad/ > Can you try: https://lore.kernel.org/87fqxbwla2.ffs@fw13 That should solve your problem along with some others which have been reported. Thanks, tglx