[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1691581193-8416-5-git-send-email-mihai.carabas@oracle.com>
Date: Wed, 9 Aug 2023 14:39:38 +0300
From: Mihai Carabas <mihai.carabas@...cle.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Joao Martins <joao.m.martins@...cle.com>,
Mihai Carabas <mihai.carabas@...cle.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Peter Zijlstra <peterz@...radead.org>,
Petr Mladek <pmladek@...e.com>,
Ard Biesheuvel <ardb@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
Nicholas Piggin <npiggin@...il.com>,
Juerg Haefliger <juerg.haefliger@...onical.com>,
Mickaël Salaün <mic@...ikod.net>,
Arnd Bergmann <arnd@...db.de>,
Ankur Arora <ankur.a.arora@...cle.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
kvm@...r.kernel.org, linux-pm@...r.kernel.org
Subject: [PATCH 4/7] governors/haltpoll: Drop kvm_para_available() check
From: Joao Martins <joao.m.martins@...cle.com>
This is duplicated already in the haltpoll idle driver,
and there's no need to re-check KVM guest availability in
the governor.
Either guests uses the module which explicitly selects this
governor, and given that it has the lowest rating of all governors
(menu=20,teo=19,ladder=10/25,haltpoll=9) means that unless it's
the only one compiled in, it won't be selected.
Dropping such check also allows to test haltpoll in baremetal.
Signed-off-by: Joao Martins <joao.m.martins@...cle.com>
Signed-off-by: Mihai Carabas <mihai.carabas@...cle.com>
---
drivers/cpuidle/governors/haltpoll.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/cpuidle/governors/haltpoll.c b/drivers/cpuidle/governors/haltpoll.c
index 1dff3a52917d..c9b69651d377 100644
--- a/drivers/cpuidle/governors/haltpoll.c
+++ b/drivers/cpuidle/governors/haltpoll.c
@@ -143,10 +143,7 @@ static int haltpoll_enable_device(struct cpuidle_driver *drv,
static int __init init_haltpoll(void)
{
- if (kvm_para_available())
- return cpuidle_register_governor(&haltpoll_governor);
-
- return 0;
+ return cpuidle_register_governor(&haltpoll_governor);
}
postcore_initcall(init_haltpoll);
--
1.8.3.1
Powered by blists - more mailing lists