public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ionut Nechita (Wind River)" <ionut.nechita@windriver.com>
To: stable@vger.kernel.org
Cc: frederic@kernel.org, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, rdunlap@infradead.org,
	ptesarik@suse.com, Ionut Nechita <ionut.nechita@windriver.com>
Subject: [PATCH v2 6.12.y 3/7] timers/migration: Simplify top level detection on group setup
Date: Sat, 21 Mar 2026 12:24:36 +0200	[thread overview]
Message-ID: <20260321102440.27782-4-ionut.nechita@windriver.com> (raw)
In-Reply-To: <20260321102440.27782-1-ionut.nechita@windriver.com>

From: Ionut Nechita <ionut.nechita@windriver.com>

From: Frederic Weisbecker <frederic@kernel.org>

commit dcf6230555dcd0b05e8d2dd5b128dcc4b6fc04ef upstream.

Having a single group on a given level is enough to know this is the
top level, because a root has to have at least two children, unless that
root is the only group and the children are actual CPUs.

Simplify the test in tmigr_setup_groups() accordingly.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250114231507.21672-5-frederic@kernel.org
---
 kernel/time/timer_migration.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/time/timer_migration.c b/kernel/time/timer_migration.c
index 0707f1ef05f7e..2f6330831f084 100644
--- a/kernel/time/timer_migration.c
+++ b/kernel/time/timer_migration.c
@@ -1670,9 +1670,7 @@ static int tmigr_setup_groups(unsigned int cpu, unsigned int node)
 		 * be different from tmigr_hierarchy_levels, contains only a
 		 * single group.
 		 */
-		if (group->parent || i == tmigr_hierarchy_levels ||
-		    (list_empty(&tmigr_level_list[i]) &&
-		     list_is_singular(&tmigr_level_list[i - 1])))
+		if (group->parent || list_is_singular(&tmigr_level_list[i - 1]))
 			break;
 
 	} while (i < tmigr_hierarchy_levels);
-- 
2.53.0


  parent reply	other threads:[~2026-03-21 10:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21 10:24 [PATCH v2 6.12.y 0/7] timers/migration: Backport fixes and cleanups from mainline Ionut Nechita (Wind River)
2026-03-21 10:24 ` [PATCH v2 6.12.y 1/7] timer/migration: Fix kernel-doc warnings for union tmigr_state Ionut Nechita (Wind River)
2026-03-21 10:24 ` [PATCH v2 6.12.y 2/7] timers/migration: Annotate accesses to ignore flag Ionut Nechita (Wind River)
2026-03-21 11:03   ` Greg KH
2026-03-24  7:40     ` Ionut Nechita (Sunlight Linux)
2026-03-21 10:24 ` Ionut Nechita (Wind River) [this message]
2026-03-21 10:24 ` [PATCH v2 6.12.y 4/7] timers/migration: Clean up the loop in tmigr_quick_check() Ionut Nechita (Wind River)
2026-03-21 10:24 ` [PATCH v2 6.12.y 5/7] timers/migration: Convert "while" loops to use "for" Ionut Nechita (Wind River)
2026-03-21 10:24 ` [PATCH v2 6.12.y 6/7] timers/migration: Remove locking on group connection Ionut Nechita (Wind River)
2026-03-21 10:24 ` [PATCH v2 6.12.y 7/7] timers/migration: Fix imbalanced NUMA trees Ionut Nechita (Wind River)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260321102440.27782-4-ionut.nechita@windriver.com \
    --to=ionut.nechita@windriver.com \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ptesarik@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox