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=1796074188; b=RfuuXp3fv9gnN01pcn1MSk56xt5YqByycHY8uCIZBeCvyYNXWUJm6ibCZNAp61VIO2h2 KiaxDC64ozOwYWXnwuggYwvbJWJY5W9yZZ85fyz0M2/u9+dltegypd+ZofybUAHMegjeZ v7hdpw9K2N/BNyi/2fA9r00WGgLvHWLRj0xmWbsPIK7E6eFduirkI+jrYCKWQz/Pa6AJt WKUf0cQgwbVmcG3QaJQad9zWVzuOw+99qjcWQPSq+soIQbYj+ugkzbBjNDgdP08BAW9xJ kicMuSeJSDto7clyh33RaysANx8z5jwOR/nLLLX6qt+9c+G6yKAaiNMee+IyaF4RG9g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796074188; 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=d6dMzk1olu8BAEuSJ/PG0Uq0LW8UTRo7A8EP30vQ6712zfb58l8yxqPQpDdvEKCHKmdO kJidpkLA7/QoVoSOEGcAs+mtNbb6uCNwrfDh7f27TJqlx8LyEGQENhz7jl0KD0PzvxVMV iXrDUohp7e+WEOBmykFXkT6a6uBuRhYUJC38lEwRMIgfORXh2RRS1e212ctbnLBPk34pE WtnqHkjfuLrcJO+txbaXNoeUri2OwLEYOzJWNg78GNxH9iECbDaxk8tBq4JFKwtdH1GJ1 lr+Fah4jGe7RZgm6R37BmNRHYeN/d9FStOZsh913+/gv7JJLhyTJjRMY8VP0HaHC65A== 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 55C69606A32A for ; Mon, 30 Nov 2026 21:29:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 55C69606A32A 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-doc@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-doc@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