summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-12-13 09:56:29 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-12-27 11:02:09 +0100
commit4ec32d9e8e5b6d6eb491eeee3938665d8a2388fa (patch)
tree3e427f5bc7ad8a0e6038189ececf71c0fde1a623 /drivers
parentbff8e60a86f4960133f90ad9add9adeb082b8154 (diff)
downloadlinux-4ec32d9e8e5b6d6eb491eeee3938665d8a2388fa.tar.bz2
intel_idle: Add module parameter to prevent ACPI _CST from being used
Add a new module parameter called "no_acpi" to the intel_idle driver to allow the driver to be prevented from using ACPI _CST via kernel command line. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/idle/intel_idle.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index a072b84d9595..26fe383bb921 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1138,6 +1138,10 @@ static bool intel_idle_max_cstate_reached(int cstate)
#ifdef CONFIG_ACPI_PROCESSOR_CSTATE
#include <acpi/processor.h>
+static bool no_acpi __read_mostly;
+module_param(no_acpi, bool, 0444);
+MODULE_PARM_DESC(no_acpi, "Do not use ACPI _CST for building the idle states list");
+
static struct acpi_processor_power acpi_state_table;
/**
@@ -1167,6 +1171,11 @@ static bool intel_idle_acpi_cst_extract(void)
{
unsigned int cpu;
+ if (no_acpi) {
+ pr_debug("Not allowed to use ACPI _CST\n");
+ return false;
+ }
+
for_each_possible_cpu(cpu) {
struct acpi_processor *pr = per_cpu(processors, cpu);