From nobody Sat Jun 13 02:07:30 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 A78B43A1A2F; Mon, 11 May 2026 13:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778504412; cv=none; b=ZsF54iNOvq9AQ7kZf/zDKm5qadDkxPhHAwohxWMEd2TXyI/j98mdJqJXPdq8pYsGt4MX14jvYV5k6kE/Q40A/QcZ3CF4QOpKMtp68A58wegmx74PjhI5+1VyRRKc4vmGN/5sTBV07pQzgm+rCP+QammZRex90+3fenE9/QgXcSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778504412; c=relaxed/simple; bh=E22K32CGAnPu8NZQ2xj1llMmlRlbr5u3bB/hXdHzz2M=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=MALDW7qdenJSIAh+GpHE7mR4n5I10iu4ZrRqTncc780ot4zi+tDF0K18VyEAAphA2OaXNcdKVFaqZJcXLfAovaNpqa/PayM9PgdLmeXmTSouJMQPKrCHf2Z5c4OAeec31NFbYcnq/T/xAuWs/2uDcDCSGiVxMBh6WOx7D82PbwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Yy6X5iiA; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VIr9Q2HK; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Yy6X5iiA"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VIr9Q2HK" Date: Mon, 11 May 2026 13:00:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1778504409; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/CChJ4dxFg1orCIOhafG1TVwMlcSDWgqOL32pkORQyU=; b=Yy6X5iiAbDGhWI1S1XfkHTtEZgCfQqWeXW6f7QkA2nQc/g9c15Nkk+m7vhspMov532ne7P 7cbiG63MR53DtRyJ3iH0NeAnAJdIwliqXs5vi52hRFzYYBi5l4gJx5X2iPrgi4tFLUpG1D cvdGPCJavRt9GcwOsOj2fWaCCO8nmbWKit7AC/gCKTGxfD6L3Ey82KYEJrGbgtP8jRcVEW 3faSxUgNGWUNjDvDbb8QXKTV0NXnZsFn2J2tz0YKmlCxlJrMo55QNnKBbROL78ajDXy1HI 56iD3kAFaAlczErylyCVYIoAMKw+A5j8YRlzxSmuqR8H1UHuMSYWy6zi0NhKUg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1778504409; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/CChJ4dxFg1orCIOhafG1TVwMlcSDWgqOL32pkORQyU=; b=VIr9Q2HKk5dS0NwjcXbvaelFxx32skfpcP8nb0JlfXoBdwVWtTDjWivxRZgg1S1omfZ8M3 +oB07k7QjrbwcOAw== From: "tip-bot2 for Sascha Bischoff" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/urgent] irqchip/gic-v5: Allocate ITS parent LPIs as a range Cc: Sascha Bischoff , Thomas Gleixner , Marc Zyngier , Lorenzo Pieralisi , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260506093634.382062-4-sascha.bischoff@arm.com> References: <20260506093634.382062-4-sascha.bischoff@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177850440785.188840.12841305612405622836.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/urgent branch of tip: Commit-ID: a7c7e42654b6a8676610ee09d22901432c4851af Gitweb: https://git.kernel.org/tip/a7c7e42654b6a8676610ee09d22901432= c4851af Author: Sascha Bischoff AuthorDate: Wed, 06 May 2026 09:37:43=20 Committer: Thomas Gleixner CommitterDate: Mon, 11 May 2026 14:56:04 +02:00 irqchip/gic-v5: Allocate ITS parent LPIs as a range The ITS MSI domain no longer manages LPI allocation directly. LPIs are allocated and freed by the parent LPI domain, which can now handle a full range of interrupts and unwind partial allocations internally. Make the ITS domain request and release the parent IRQs as a single range instead of iterating over each interrupt. The ITS allocation path then only needs to reserve EventIDs, allocate the parent range, and fill in the ITS irq_data for each MSI. Since no operation in the per-MSI loop can fail, the partial parent-free unwind becomes unnecessary. On teardown, reset the ITS irq_data for the range and then release the parent range in one call, leaving LPI teardown to the LPI domain. Fixes: 0f0101325876 ("irqchip/gic-v5: Add GICv5 LPI/IPI support") Signed-off-by: Sascha Bischoff Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Reviewed-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260506093634.382062-4-sascha.bischoff@arm.= com --- drivers/irqchip/irq-gic-v5-its.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/irqchip/irq-gic-v5-its.c b/drivers/irqchip/irq-gic-v5-= its.c index 36d03f8..28e39b0 100644 --- a/drivers/irqchip/irq-gic-v5-its.c +++ b/drivers/irqchip/irq-gic-v5-its.c @@ -937,6 +937,7 @@ static int gicv5_its_irq_domain_alloc(struct irq_domain= *domain, unsigned int vi int ret, i; =20 its_dev =3D info->scratchpad[0].ptr; + device_id =3D its_dev->device_id; =20 ret =3D gicv5_its_alloc_eventid(its_dev, info, nr_irqs, &event_id_base); if (ret) @@ -946,14 +947,11 @@ static int gicv5_its_irq_domain_alloc(struct irq_doma= in *domain, unsigned int vi if (ret) goto out_eventid; =20 - device_id =3D its_dev->device_id; + ret =3D irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, NULL); + if (ret) + goto out_eventid; =20 for (i =3D 0; i < nr_irqs; i++) { - ret =3D irq_domain_alloc_irqs_parent(domain, virq + i, 1, NULL); - if (ret) { - goto out_free_irqs; - } - /* * Store eventid and deviceid into the hwirq for later use. * @@ -972,12 +970,6 @@ static int gicv5_its_irq_domain_alloc(struct irq_domai= n *domain, unsigned int vi =20 return 0; =20 -out_free_irqs: - while (--i >=3D 0) { - irqd =3D irq_domain_get_irq_data(domain, virq + i); - irq_domain_reset_irq_data(irqd); - irq_domain_free_irqs_parent(domain, virq + i, 1); - } out_eventid: gicv5_its_free_eventid(its_dev, event_id_base, nr_irqs); return ret; @@ -1000,14 +992,14 @@ static void gicv5_its_irq_domain_free(struct irq_dom= ain *domain, unsigned int vi bitmap_release_region(its_dev->event_map, event_id_base, get_count_order(nr_irqs)); =20 - /* Hierarchically free irq data */ for (i =3D 0; i < nr_irqs; i++) { d =3D irq_domain_get_irq_data(domain, virq + i); - irq_domain_reset_irq_data(d); - irq_domain_free_irqs_parent(domain, virq + i, 1); } =20 + /* Hierarchically free irq data */ + irq_domain_free_irqs_parent(domain, virq, nr_irqs); + gicv5_its_syncr(its, its_dev); gicv5_irs_syncr(); }