Skip to content

Commit be4f654

Browse files
committed
Merge branch 'pm-cpuidle'
* pm-cpuidle: cpuidle: haltpoll: allow force loading on hosts without the REALTIME hint intel_idle: Update copyright notice, known limitations and version intel_idle: Define CPUIDLE_FLAG_TLB_FLUSHED as BIT(16) intel_idle: Clean up kerneldoc comments for multiple functions intel_idle: Reorder declarations of static variables intel_idle: Annotate init time data structures intel_idle: Add __initdata annotations to init time variables intel_idle: Relocate definitions of cpuidle callbacks intel_idle: Clean up definitions of cpuidle callbacks intel_idle: Simplify LAPIC timer reliability checks
2 parents 8f1073e + dd52551 commit be4f654

File tree

2 files changed

+167
-147
lines changed

2 files changed

+167
-147
lines changed

drivers/cpuidle/cpuidle-haltpoll.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#include <linux/kvm_para.h>
1919
#include <linux/cpuidle_haltpoll.h>
2020

21+
static bool force __read_mostly;
22+
module_param(force, bool, 0444);
23+
MODULE_PARM_DESC(force, "Load unconditionally");
24+
2125
static struct cpuidle_device __percpu *haltpoll_cpuidle_devices;
2226
static enum cpuhp_state haltpoll_hp_state;
2327

@@ -90,6 +94,11 @@ static void haltpoll_uninit(void)
9094
haltpoll_cpuidle_devices = NULL;
9195
}
9296

97+
static bool haltpool_want(void)
98+
{
99+
return kvm_para_has_hint(KVM_HINTS_REALTIME) || force;
100+
}
101+
93102
static int __init haltpoll_init(void)
94103
{
95104
int ret;
@@ -101,8 +110,7 @@ static int __init haltpoll_init(void)
101110

102111
cpuidle_poll_state_init(drv);
103112

104-
if (!kvm_para_available() ||
105-
!kvm_para_has_hint(KVM_HINTS_REALTIME))
113+
if (!kvm_para_available() || !haltpool_want())
106114
return -ENODEV;
107115

108116
ret = cpuidle_register_driver(drv);

0 commit comments

Comments
 (0)