From: Pierre Gondois <pierre.gondois@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Ionela.Voinescu@arm.com, Dietmar.Eggemann@arm.com,
Pierre Gondois <pierre.gondois@arm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Robert Moore <robert.moore@intel.com>,
linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org,
devel@acpica.org
Subject: [PATCH v1 2/5] ACPI: bus: Set CPPC _OSC bits for all and when CPPC_LIB is supported
Date: Wed, 11 May 2022 15:45:56 +0200 [thread overview]
Message-ID: <20220511134559.1466925-2-pierre.gondois@arm.com> (raw)
In-Reply-To: <20220511134559.1466925-1-pierre.gondois@arm.com>
The _OSC method allows the OS and firmware to communicate about
supported features/capabitlities. It also allows the OS to take
control of some features.
In ACPI 6.4, s6.2.11.2 Platform-Wide OSPM Capabilities, the CPPC
(resp. v2) bit should be set by the OS if it 'supports controlling
processor performance via the interfaces described in the _CPC
object'.
The OS supports CPPC and parses the _CPC object only if
CONFIG_ACPI_CPPC_LIB is set. Replace the x86 specific
boot_cpu_has(X86_FEATURE_HWP) dynamic check with an arch
generic CONFIG_ACPI_CPPC_LIB build-time check.
Note:
CONFIG_X86_INTEL_PSTATE selects CONFIG_ACPI_CPPC_LIB.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
drivers/acpi/bus.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index a5d08de5d1e9..4fd0ea779441 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -329,10 +329,11 @@ static void acpi_bus_osc_negotiate_platform_control(void)
#endif
#ifdef CONFIG_X86
capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT;
- if (boot_cpu_has(X86_FEATURE_HWP)) {
- capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_SUPPORT;
- capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPCV2_SUPPORT;
- }
+#endif
+
+#ifdef CONFIG_ACPI_CPPC_LIB
+ capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_SUPPORT;
+ capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPCV2_SUPPORT;
#endif
capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_FLEXIBLE_ADR_SP;
@@ -357,10 +358,9 @@ static void acpi_bus_osc_negotiate_platform_control(void)
return;
}
-#ifdef CONFIG_X86
- if (boot_cpu_has(X86_FEATURE_HWP))
- osc_sb_cppc_not_supported = !(capbuf_ret[OSC_SUPPORT_DWORD] &
- (OSC_SB_CPC_SUPPORT | OSC_SB_CPCV2_SUPPORT));
+#ifdef CONFIG_ACPI_CPPC_LIB
+ osc_sb_cppc_not_supported = !(capbuf_ret[OSC_SUPPORT_DWORD] &
+ (OSC_SB_CPC_SUPPORT | OSC_SB_CPCV2_SUPPORT));
#endif
/*
--
2.25.1
next prev parent reply other threads:[~2022-05-11 13:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 13:45 [PATCH v1 1/5] ACPI: CPPC: Check _OSC for flexible address space Pierre Gondois
2022-05-11 13:45 ` Pierre Gondois [this message]
2022-05-11 14:22 ` [PATCH v1 2/5] ACPI: bus: Set CPPC _OSC bits for all and when CPPC_LIB is supported Sudeep Holla
2022-05-11 13:45 ` [PATCH v1 3/5] ACPI: CPPC: Assume no transition latency if no PCCT Pierre Gondois
2022-05-11 14:30 ` Sudeep Holla
2022-05-12 15:04 ` Rafael J. Wysocki
2022-05-11 13:45 ` [PATCH v1 4/5] cpufreq: CPPC: Enable fast_switch Pierre Gondois
2022-05-11 14:41 ` Sudeep Holla
2022-05-12 7:46 ` Viresh Kumar
2022-05-11 13:45 ` [PATCH v1 5/5] cpufreq: CPPC: Enable dvfs_possible_from_any_cpu Pierre Gondois
2022-05-11 14:50 ` Sudeep Holla
2022-05-12 7:47 ` Viresh Kumar
2022-05-11 14:17 ` [PATCH v1 1/5] ACPI: CPPC: Check _OSC for flexible address space Sudeep Holla
2022-05-12 15:03 ` 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=20220511134559.1466925-2-pierre.gondois@arm.com \
--to=pierre.gondois@arm.com \
--cc=Dietmar.Eggemann@arm.com \
--cc=Ionela.Voinescu@arm.com \
--cc=devel@acpica.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=viresh.kumar@linaro.org \
/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