From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
Len Brown <len.brown@intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Len Brown <lenb@kernel.org>
Subject: [RFC v2][PATCH 9/9] intel_idle: Add module parameter to prevent ACPI _CST from being used
Date: Tue, 10 Dec 2019 13:13:14 +0100 [thread overview]
Message-ID: <2442105.UMyhRX9LH8@kreacher> (raw)
In-Reply-To: <35821518.IbFVMVmUy3@kreacher>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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>
---
drivers/idle/intel_idle.c | 9 +++++++++
1 file changed, 9 insertions(+)
Index: linux-pm/drivers/idle/intel_idle.c
===================================================================
--- linux-pm.orig/drivers/idle/intel_idle.c
+++ linux-pm/drivers/idle/intel_idle.c
@@ -1138,6 +1138,10 @@ static bool intel_idle_max_cstate_reache
#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(
{
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);
prev parent reply other threads:[~2019-12-10 12:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 11:54 [RFC v2][PATCH 0/9] cpuidle: intel_idle: Use ACPI _CTS to get idle states information Rafael J. Wysocki
2019-12-10 12:01 ` [RFC v2][PATCH 1/9] ACPI: processor: Export function to claim _CST control Rafael J. Wysocki
2019-12-10 12:02 ` [RFC v2][PATCH 2/9] ACPI: processor: Introduce acpi_processor_evaluate_cst() Rafael J. Wysocki
2019-12-10 12:02 ` [RFC v2][PATCH 3/9] ACPI: processor: Clean up acpi_processor_evaluate_cst() Rafael J. Wysocki
2019-12-10 12:02 ` [RFC v2][PATCH 4/9] ACPI: processor: Export acpi_processor_evaluate_cst() Rafael J. Wysocki
2019-12-10 12:03 ` [RFC v2][PATCH 5/9] intel_idle: Refactor intel_idle_cpuidle_driver_init() Rafael J. Wysocki
2019-12-10 12:06 ` [RFC v2][PATCH 6/9] intel_idle: Use ACPI _CST for processor models without C-state tables Rafael J. Wysocki
2019-12-10 12:07 ` [RFC v2][PATCH 7/9] cpuidle: Allow idle states to be disabled by default Rafael J. Wysocki
2019-12-10 12:13 ` [RFC v2][PATCH 8/9] intel_idle: Use ACPI _CST for selected known processors Rafael J. Wysocki
2019-12-10 12:13 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2442105.UMyhRX9LH8@kreacher \
--to=rjw@rjwysocki.net \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).