]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpuidle: haltpoll: Remove single state handling
authorAboorva Devarajan <aboorvad@linux.ibm.com>
Mon, 16 Feb 2026 18:50:03 +0000 (00:20 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 17 Feb 2026 14:49:24 +0000 (15:49 +0100)
cpuidle systems where the governor has no choice because there's only
a single idle state are now handled by cpuidle core and bypass the
governor, so remove the related handling.

Signed-off-by: Aboorva Devarajan <aboorvad@linux.ibm.com>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
[ rjw: Extended the change to drop a redundant local variable ]
Link: https://patch.msgid.link/20260216185005.1131593-3-aboorvad@linux.ibm.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/haltpoll.c

index 663b7f164d202c011a3c8ddf824aeea400af0c50..b367d10279c840e269e7f10662139f3ff3f9e9fa 100644 (file)
@@ -50,9 +50,7 @@ static int haltpoll_select(struct cpuidle_driver *drv,
                           struct cpuidle_device *dev,
                           bool *stop_tick)
 {
-       s64 latency_req = cpuidle_governor_latency_req(dev->cpu);
-
-       if (!drv->state_count || latency_req == 0) {
+       if (cpuidle_governor_latency_req(dev->cpu) == 0) {
                *stop_tick = false;
                return 0;
        }