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: [PATCH v1 09/10] intel_idle: Add module parameter to prevent ACPI _CST from being used
Date: Fri, 13 Dec 2019 10:24:58 +0100 [thread overview]
Message-ID: <4991900.sFTjH42vUX@kreacher> (raw)
In-Reply-To: <3950312.2WmFeOdZGY@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>
---
No changes from the RFC version.
---
drivers/idle/intel_idle.c | 9 +++++++++
1 file changed, 9 insertions(+)
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);
--
2.16.4
next prev parent reply other threads:[~2019-12-13 9:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 9:09 [PATCH v1 00/10] cpuidle: intel_idle: Use ACPI _CST to get idle states information Rafael J. Wysocki
2019-12-13 9:11 ` [PATCH v1 01/10] ACPI: processor: Export function to claim _CST control Rafael J. Wysocki
2019-12-13 9:12 ` [PATCH v1 02/10] ACPI: processor: Introduce acpi_processor_evaluate_cst() Rafael J. Wysocki
2019-12-13 9:14 ` [PATCH v1 03/10] ACPI: processor: Clean up acpi_processor_evaluate_cst() Rafael J. Wysocki
2019-12-13 9:15 ` [PATCH v1 04/10] ACPI: processor: Export acpi_processor_evaluate_cst() Rafael J. Wysocki
2019-12-13 9:16 ` [PATCH v1 05/10] intel_idle: Refactor intel_idle_cpuidle_driver_init() Rafael J. Wysocki
2019-12-13 9:20 ` [PATCH v1 06/10] intel_idle: Use ACPI _CST for processor models without C-state tables Rafael J. Wysocki
2019-12-13 9:22 ` [PATCH v1 07/10] cpuidle: Allow idle states to be disabled by default Rafael J. Wysocki
2019-12-13 9:24 ` [PATCH v1 08/10] intel_idle: Allow ACPI _CST to be used for selected known processors Rafael J. Wysocki
2019-12-13 9:24 ` Rafael J. Wysocki [this message]
2019-12-13 9:27 ` [PATCH v1 10/10] intel_idle: Use ACPI _CST on server systems Rafael J. Wysocki
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=4991900.sFTjH42vUX@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).