From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: rjw@rjwysocki.net
Cc: khlebnikov@yandex-team.ru, linux-pm@vger.kernel.org,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH v4 3/3] cpufreq: intel_pstate: Enable PPC enforcement for servers
Date: Wed, 27 Apr 2016 15:48:08 -0700 [thread overview]
Message-ID: <1461797288-31573-4-git-send-email-srinivas.pandruvada@linux.intel.com> (raw)
In-Reply-To: <1461797288-31573-1-git-send-email-srinivas.pandruvada@linux.intel.com>
For platforms which are controlled via remove node manager, enable _PPC by
default. These platforms are mostly categorized as enterprise server or
performance servers. These platforms needs to go through some
certifications tests, which tests control via _PPC.
The relative risk of enabling by default is low as this is is less likely
that these systems have broken _PSS table.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
Documentation/kernel-parameters.txt | 5 ++++-
drivers/cpufreq/intel_pstate.c | 12 +++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 4199a1b..52292b2 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1662,7 +1662,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Only load intel_pstate on systems which support
hardware P state control (HWP) if available.
support_acpi_ppc
- Enforce ACPI _PPC performance limits.
+ Enforce ACPI _PPC performance limits. If the Fixed ACPI
+ Description Table, specifies preferred power management
+ profile as "Enterprise Server" or "Performance Server",
+ then this feature is turned on by default.
intremap= [X86-64, Intel-IOMMU]
on enable Interrupt Remapping (default)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index c4894ff..7da7672 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -345,6 +345,16 @@ static struct perf_limits *limits = &powersave_limits;
#endif
#ifdef CONFIG_ACPI
+
+static bool intel_pstate_get_ppc_enable_status(void)
+{
+ if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
+ acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER)
+ return true;
+
+ return acpi_ppc;
+}
+
/*
* The max target pstate ratio is a 8 bit value in both PLATFORM_INFO MSR and
* in TURBO_RATIO_LIMIT MSR, which pstate driver stores in max_pstate and
@@ -368,7 +378,7 @@ static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy)
int ret;
int i;
- if (!acpi_ppc)
+ if (!intel_pstate_get_ppc_enable_status())
return;
cpu = all_cpu_data[policy->cpu];
--
2.5.5
prev parent reply other threads:[~2016-04-27 22:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 22:48 [PATCH v4 0/3] Enforce _PPC limits Srinivas Pandruvada
2016-04-27 22:48 ` [PATCH v4 1/3] cpufreq: intel_pstate: " Srinivas Pandruvada
2016-04-27 22:48 ` [PATCH v4 2/3] cpufreq: intel_pstate: Adjust policy->max Srinivas Pandruvada
2016-04-27 22:48 ` Srinivas Pandruvada [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=1461797288-31573-4-git-send-email-srinivas.pandruvada@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).