From nobody Thu Dec 18 19:06:30 2025 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 692D1143896; Mon, 29 Jul 2024 09:49:46 +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=1722246588; cv=none; b=J11MKzgOpyIJkWNE4Ovj8DN3eTR/GaqCW+x/LR3biw0z/h9tOLZWDUGjCrIXOZO+LP5+v6rKs2G2sqBvZgSJeh+ZkqiZPQkQf+QfxdUNQeO9QYBJeqAVXqKF8mJ2GYYk42qSJCtyycuiBdWPCy8+UGk1t1xjJhR5UpQ2YJeMNaA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722246588; c=relaxed/simple; bh=ZcKuZB6RfnjXRfcusuv4RflsZWmt/AfLZs4ROtIh4+E=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=op8kQiIDWr8tiQe6rPx8yQ66JCSxyhtxgI0s/HixNF8yUal/MhpcX/7giADSjK0/ois7PzoIrwiUD1oMVkTJlNQCvqpdwg4v6dnpyc8gUL5WyO6MXkJP3LxoxALgqbtCCqUNCYqgbfDK7w0IUXVhzXq6xsi4Zh4Ng/6RygQtmbc= 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=UUMC5J2P; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=o0Ir58Xz; 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="UUMC5J2P"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="o0Ir58Xz" Date: Mon, 29 Jul 2024 09:49:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1722246584; 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=WTxzqQQwDRWoyZU+kYV3T6w5Kq2gLFH2WDJaxYIItlE=; b=UUMC5J2PS4xh0kASr8KPbLXJA6WmJYUBmWOz9LGqxuQZbtssq+NK/8TDvuJi5/5AmhqKhz Kcl6yosBhBHNw0UCsy3aT0AglD8TA1OsFPf7XyYmQCn0paenhfrauy3dIpvEX+Y8SDiin6 leLwa7kNTYyzSGnSGTUDdLoLPfA/RFOKvdUISY/JkyiqCKvKIFfxHn3bg7XxpGrw9aR9UU AOoMSq5Egw9zxoyZxkLTYHKX1LrNmzKGHTuEzDMRB03CSrTOpw7eTpxyOBEiwS6Sj465rI BYxiQh/BMHXxdpYhYb6AHqRxKyoRHSJr49XUeHthvEiGyEEOyLsBdRnJ0JOXJQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1722246584; 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=WTxzqQQwDRWoyZU+kYV3T6w5Kq2gLFH2WDJaxYIItlE=; b=o0Ir58XzUlIOorFpQdWCDP21i1Aux5Lpc1zDm7STijZS44KmvTiaFRGEC5oYnLmPzy6HfP NjvTduopWG/Cf3BA== From: tip-bot2 for Marek =?utf-8?q?Beh=C3=BAn?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/armada-370-xp: Don't read number of supported interrupts multiple times Cc: kabel@kernel.org, Thomas Gleixner , Andrew Lunn , ilpo.jarvinen@linux.intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20240711115748.30268-8-kabel@kernel.org> References: <20240711115748.30268-8-kabel@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <172224658377.2215.1602943317643248909.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/core branch of tip: Commit-ID: ec47b16b24fa25f9ddc3ac9652f1746107312156 Gitweb: https://git.kernel.org/tip/ec47b16b24fa25f9ddc3ac9652f174610= 7312156 Author: Marek Beh=C3=BAn AuthorDate: Thu, 11 Jul 2024 13:57:45 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 29 Jul 2024 10:57:23 +02:00 irqchip/armada-370-xp: Don't read number of supported interrupts multiple t= imes Use mpic_domain::hwirq_max at runtime instead of reading the same value over and over from the MPIC_INT_CONTROL register. Signed-off-by: Marek Beh=C3=BAn Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn Reviewed-by: Ilpo J=C3=A4rvinen Link: https://lore.kernel.org/all/20240711115748.30268-8-kabel@kernel.org --- drivers/irqchip/irq-armada-370-xp.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-arma= da-370-xp.c index 2758834..e43eb26 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -494,13 +494,7 @@ static int mpic_set_affinity(struct irq_data *d, const= struct cpumask *mask_val, =20 static void mpic_smp_cpu_init(void) { - u32 control; - int nr_irqs; - - control =3D readl(main_int_base + MPIC_INT_CONTROL); - nr_irqs =3D (control >> 2) & 0x3ff; - - for (int i =3D 0; i < nr_irqs; i++) + for (int i =3D 0; i < mpic_domain->hwirq_max; i++) writel(i, per_cpu_int_base + MPIC_INT_SET_MASK); =20 if (!mpic_is_ipi_available()) @@ -706,10 +700,9 @@ static int mpic_suspend(void) static void mpic_resume(void) { bool src0, src1; - int nirqs; + /* Re-enable interrupts */ - nirqs =3D (readl(main_int_base + MPIC_INT_CONTROL) >> 2) & 0x3ff; - for (irq_hw_number_t irq =3D 0; irq < nirqs; irq++) { + for (irq_hw_number_t irq =3D 0; irq < mpic_domain->hwirq_max; irq++) { struct irq_data *data; unsigned int virq; =20