From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=34.202.193.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796074197; b=tE4LKsgkNrGRufDww3PPWSYWHa4OVqhOhDSH10Nk21OKPytekeZn3FYtwaJqHVED6V49 kVJD+5D7oV/klnX0UdJUR4SnPUdE2diFmNaL8HMDqE1KQcXLwrk6e2N60IZbjS0OM/gdw DjNElUqC8YiP+E/Oe8a/yNHGhgL5iEK4J/HXbOTE0I7+1xtvqHbnon+GQrBvE0W1fWcVw XDCUQH31fAUEUF0T+94oyc9CUeKkZ0JTe+M3KfJKdiy1XtKsVt2gUZF4NuB0+xLRi3AFs qVpgr5ccyt96g4k24JxgsMk4NITXa4Vib2yv7elUb/u/L+e9TECFSEDTmvtZVCzJNYw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796074197; h=DMARC-Filter:DKIM-Signature:DKIM-Signature:Feedback-ID: X-Pm-Original-To:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding: X-MIME-Autoconverted:Content-Type; bh=ELdu0tIbceH2hQHUWA6MuuCcRL8va1xdMKP5y2i2fIY=; b=gwHKKnfrt4lOWQPa11Ev3mEyrwjbgQhhEtMhs3PVDC2C8cwPTc9fD7IgEjl7NpdZiL+m iF4AzjCIjWWzlGxDL1pS6abq684o2A/v4rAwtX90HWVjJJY7Kkdm3egBsaRcL+bSqZLek zOU8HZ6uTup98sxk6OL7jMxdEfd2MxCMGVldBfGePHHvqdCz3WIIN5ptL03TZmZxZcX4/ 7utxRMcLJc43hZmYs58FSwB9puSb07oKNDiQLVIx+rhU/I27N4RrAeD30HocZDR3THbjk pM7c44/U9mVTf+bAUo1nj9nO8RhjjUMm6cHQdBtVuIhE6cBvBbCwlKIqEcRhhCciTxw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=atomlin.com; spf=pass smtp.mailfrom=atomlin.com; dkim=pass header.d=atomlin.com header.i=@atomlin.com header.a=rsa-sha256 header.s=purelymail3 header.b=lZrLdczj; dkim=pass header.d=purelymail.com header.i=@purelymail.com header.a=rsa-sha256 header.s=purelymail3 header.b="0T9Crk/e"; arc=none smtp.remote-ip=34.202.193.197 Received: from sendmail.purelymail.com (sendmail.purelymail.com [34.202.193.197]) (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 CD92C606A33E for ; Mon, 30 Nov 2026 21:29:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CD92C606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=atomlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=atomlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=atomlin.com header.i=@atomlin.com header.a=rsa-sha256 header.s=purelymail3 header.b=lZrLdczj; dkim=pass (2048-bit key, unprotected) header.d=purelymail.com header.i=@purelymail.com header.a=rsa-sha256 header.s=purelymail3 header.b=0T9Crk/e DKIM-Signature: a=rsa-sha256; b=lZrLdczj2QoghE1rDozXLCeJ4ZF/VEd2bOD9rIhORjoOa9UZzikhzd8THj7ujC9XKT35aWnY2Abzq0epdHPg2eBR5EybT8UgNHXxwIJS87GWSu0QdHyoPH4r1ojDcFKIWXQUHYZtdzC6W/T75W5Jn0FlHpsYrMS2ekfzvP94R9KUjHbQumxhmJ01pkd9cetpBUjzV5lOQ3KJyjjAaRP79PT5m7paqPoXqE983wDX0XIHGwrd8ICLp+kXwW6kqini60X7MrFQ7OTVjKt3YqGbaY7IIVd/R3Mxu7tYmRnCnLQUVF2x7cmm57nqpv0816EuKvcU7pCbkKDwVEo8hlt6vg==; s=purelymail3; d=atomlin.com; v=1; bh=ELdu0tIbceH2hQHUWA6MuuCcRL8va1xdMKP5y2i2fIY=; h=Received:From:To:Subject:Date:Message-ID; DKIM-Signature: a=rsa-sha256; b=0T9Crk/e/eyt/Gc/BTSmMmoZJvrwvhYMlf7JbAsNlHFZ7HCJ4Ldaiu+1eNZaZAsHrolnwUiF6aNWfF1aWsYbqsS3nAGygONCWORfpiP0ajzPVAh9oht26ubeT/06FOEmEanWLNglq6rZZKRkUf8/lNsk1a+5bl0MswyKuaudfoP+572AYIbj5iY6EOhaGeioFllrh/Pt9vwEVsZGBbvvvbfThLH/aRpgnCBr9dG61RpTvZkmQOjRLfHkl+6lVV0/y4vfN0w0CD/qToB9NRqq2IaCzI88y6VoJc0F5N7rPse7Vf16TJawZY193+9/RdVzB0kcYjs4J5KQygJ0lk3hLQ==; s=purelymail3; d=purelymail.com; v=1; bh=ELdu0tIbceH2hQHUWA6MuuCcRL8va1xdMKP5y2i2fIY=; h=Feedback-ID:Received:From:To:Subject:Date:Message-ID; Feedback-ID: 1802931:67223:null:purelymail X-Pm-Original-To: linux-kernel@vger.kernel.org Authentication-Results: purelymail.com; auth=pass Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 908475924; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 30 Nov 2026 21:28:32 +0000 (UTC) From: Aaron Tomlin To: axboe@kernel.dk, tglx@kernel.org, aacraid@microsemi.com, James.Bottomley@HansenPartnership.com, mkp@kernel.org, frederic@kernel.org, bigeasy@linutronix.de, gmaglione@redhat.com, vgoyal@redhat.com, stefanha@redhat.com, miklos@szeredi.hu Cc: atomlin@atomlin.com, dwagner@suse.de, eperezma@redhat.com, tom.leiming@gmail.com, ionut.nechita@windriver.com, corbet@lwn.net, vincent.guittot@linaro.org, mingo@redhat.com, peterz@infradead.org, radu@rendec.net, akpm@linux-foundation.org, steve@abita.co, sean@ashe.io, chjohnst@gmail.com, neelx@suse.com, mproche@gmail.com, nick.lange@gmail.com, marco.crivellari@suse.com, rishil1999@outlook.com, linux-doc@vger.kernel.org, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, virtualization@lists.linux.dev, linux-fsdevel@vger.kernel.org, fuse-devel@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v18 2/9] lib/group_cpus: remove dead !SMP code Date: Mon, 30 Nov 2026 16:28:05 -0500 Message-ID: <20261130212830.373057-3-atomlin@atomlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261130212830.373057-1-atomlin@atomlin.com> References: <20261130212830.373057-1-atomlin@atomlin.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Content-Type: text/plain; charset=UTF-8 From: Daniel Wagner The core scheduler recently transitioned to compiling SMP data structures unconditionally to reduce code complexity - see commit cac5cefbade9 ("sched/smp: Make SMP unconditional"). In alignment with this philosophy of reducing dual-path maintenance, this patch removes the #ifdef CONFIG_SMP guards and the dedicated !SMP fallback logic here. While the !SMP path provided a slightly simpler execution flow for uniprocessor kernels (avoiding SMP-specific overhead), maintaining these separate code paths adds unnecessary complexity and testing burden. Removing these guards simplifies the codebase by standardizing entirely on the SMP logic, which safely resolves to single-CPU operations on UP configurations. Signed-off-by: Daniel Wagner Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Acked-by: Frederic Weisbecker Acked-by: Marco Crivellari Signed-off-by: Aaron Tomlin --- lib/group_cpus.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/group_cpus.c b/lib/group_cpus.c index e6e18d7a49bb..b8d54398f88a 100644 --- a/lib/group_cpus.c +++ b/lib/group_cpus.c @@ -9,8 +9,6 @@ #include #include =20 -#ifdef CONFIG_SMP - static void grp_spread_init_one(struct cpumask *irqmsk, struct cpumask *nm= sk, =09=09=09=09unsigned int cpus_per_grp) { @@ -564,22 +562,4 @@ struct cpumask *group_cpus_evenly(unsigned int numgrps= , unsigned int *nummasks) =09*nummasks =3D min(nr_present + nr_others, numgrps); =09return masks; } -#else /* CONFIG_SMP */ -struct cpumask *group_cpus_evenly(unsigned int numgrps, unsigned int *numm= asks) -{ -=09struct cpumask *masks; - -=09if (numgrps =3D=3D 0) -=09=09return NULL; - -=09masks =3D kzalloc_objs(*masks, numgrps); -=09if (!masks) -=09=09return NULL; - -=09/* assign all CPUs(cpu 0) to the 1st group only */ -=09cpumask_copy(&masks[0], cpu_possible_mask); -=09*nummasks =3D 1; -=09return masks; -} -#endif /* CONFIG_SMP */ EXPORT_SYMBOL_GPL(group_cpus_evenly); --=20 2.55.0