From nobody Wed Apr 1 20:39:40 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 1B95127E074; Wed, 1 Apr 2026 14:15:48 +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=1775052950; cv=none; b=Hkf1XwbrcGhPRHYmBxxgvYqsy+dJbHQ0zj9wnVGH1WP2Ci3OU1E8NCpiwiHT7ZZi+Joj35ox+6eHLVaFdLEqLLmaiEU4Ygpv0s2lpLE24Axle9c5PDfGk3Kada01zxtPX6mGUtRDgEiFE7YNwxeiVf9zgeTtd6u+wMS9MDuQHxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775052950; c=relaxed/simple; bh=H8WI2xef0pnOQtNS+O7Hp/+07PB4Ar8kXpmeaKtsQUY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=irXbmdSm+XGmjDxr2ZNB7ECTj0KxVjyH3akKk72AH4RQJyqM7O9UTdVgFHzu1tBeNbs17yjg8G5o5JEpzHFqGEq/R/Ai3IUUcAllkpWNNh/txL65TO61142Q02933Qu2pDE4U7mZow8S/7PYQDPOmj2R3F9+/PWKrZtMeOGmsBM= 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=oWnQw51a; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=e3FzlRYi; 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="oWnQw51a"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="e3FzlRYi" Date: Wed, 01 Apr 2026 14:15:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1775052947; 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=hNeJ5wQ89QnIZKGKP227WjOH4DhxW525Rmpa4RzwzyM=; b=oWnQw51azDDax3AKcROtVqBYTcKUqQmW9bKcBjLAga/XMW4T7v83Th7Dohm87GiOp9qMLj EAAGE0tfiQmJMCmiNwTHdqQ4egqjnRlZ0mbXvCUaggOgELxNRAi27lyL03gFieyil+N/JP hvvcV7+rcJOjpGTKIEL589yMxpg0LZdu4JahmtXV6gwKLlFuYfdNuye2SUMtmlR44DIsxz bojH8ue6NmOPsLSWkEohL2KSru78s/POPU78CTkCcelfdlQVPP1LxQ3/zOpTjmDAJck9iv SS0PyqBsunJzZyiEeLaPj7RCasxo4Zu06g8ARWcpZv6S8kh7GHdHBkPigIzySQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1775052947; 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=hNeJ5wQ89QnIZKGKP227WjOH4DhxW525Rmpa4RzwzyM=; b=e3FzlRYieBuOJ3zic8z/jlHlmTGXQA6MslIyrgOZ1Ml0dfZSc34PzWJMav3S+geRL1BQIJ 6528gzThyMrtNqBA== From: "tip-bot2 for Sebastian Andrzej Siewior" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] genirq/affinity: Remove cpus_read_lock() while reading cpu_possible_mask Cc: Sebastian Andrzej Siewior , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20260401121334.xeMOSC1v@linutronix.de> References: <20260401121334.xeMOSC1v@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177505294142.1647592.818377249902716095.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: 34d85ad42604fbb5a8903488c6a7e2862e2d0254 Gitweb: https://git.kernel.org/tip/34d85ad42604fbb5a8903488c6a7e2862= e2d0254 Author: Sebastian Andrzej Siewior AuthorDate: Wed, 01 Apr 2026 14:13:34 +02:00 Committer: Thomas Gleixner CommitterDate: Wed, 01 Apr 2026 16:09:05 +02:00 genirq/affinity: Remove cpus_read_lock() while reading cpu_possible_mask cpu_possible_mask is set early during boot based on information from the firmware. After that it remains read only and is never changed. Therefore there is no need to acquire the CPU-hotplug lock while reading it. Remove cpus_read_*() while accessing cpu_possible_mask. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260401121334.xeMOSC1v@linutronix.de --- kernel/irq/affinity.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index 85c45cf..78f2418 100644 --- a/kernel/irq/affinity.c +++ b/kernel/irq/affinity.c @@ -115,13 +115,10 @@ unsigned int irq_calc_affinity_vectors(unsigned int m= invec, unsigned int maxvec, if (resv > minvec) return 0; =20 - if (affd->calc_sets) { + if (affd->calc_sets) set_vecs =3D maxvec - resv; - } else { - cpus_read_lock(); + else set_vecs =3D cpumask_weight(cpu_possible_mask); - cpus_read_unlock(); - } =20 return resv + min(set_vecs, maxvec - resv); }