Commit be4f6540 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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
parents 8f1073ed dd52551f
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
#include <linux/kvm_para.h> #include <linux/kvm_para.h>
#include <linux/cpuidle_haltpoll.h> #include <linux/cpuidle_haltpoll.h>
static bool force __read_mostly;
module_param(force, bool, 0444);
MODULE_PARM_DESC(force, "Load unconditionally");
static struct cpuidle_device __percpu *haltpoll_cpuidle_devices; static struct cpuidle_device __percpu *haltpoll_cpuidle_devices;
static enum cpuhp_state haltpoll_hp_state; static enum cpuhp_state haltpoll_hp_state;
...@@ -90,6 +94,11 @@ static void haltpoll_uninit(void) ...@@ -90,6 +94,11 @@ static void haltpoll_uninit(void)
haltpoll_cpuidle_devices = NULL; haltpoll_cpuidle_devices = NULL;
} }
static bool haltpool_want(void)
{
return kvm_para_has_hint(KVM_HINTS_REALTIME) || force;
}
static int __init haltpoll_init(void) static int __init haltpoll_init(void)
{ {
int ret; int ret;
...@@ -101,8 +110,7 @@ static int __init haltpoll_init(void) ...@@ -101,8 +110,7 @@ static int __init haltpoll_init(void)
cpuidle_poll_state_init(drv); cpuidle_poll_state_init(drv);
if (!kvm_para_available() || if (!kvm_para_available() || !haltpool_want())
!kvm_para_has_hint(KVM_HINTS_REALTIME))
return -ENODEV; return -ENODEV;
ret = cpuidle_register_driver(drv); ret = cpuidle_register_driver(drv);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment