From: "Yuan, Perry" <Perry.Yuan@amd.com>
To: "Limonciello, Mario" <Mario.Limonciello@amd.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Pierre Gondois <pierre.gondois@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] ACPI: CPPC: Don't require _OSC if X86_FEATURE_CPPC is supported
Date: Mon, 27 Jun 2022 17:26:00 +0000 [thread overview]
Message-ID: <DM4PR12MB52786707F51B48C7559115799CB99@DM4PR12MB5278.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20220627165832.10246-1-mario.limonciello@amd.com>
[AMD Official Use Only - General]
Hi Rafael:
> -----Original Message-----
> From: Limonciello, Mario <Mario.Limonciello@amd.com>
> Sent: Tuesday, June 28, 2022 12:59 AM
> To: Limonciello, Mario <Mario.Limonciello@amd.com>; Rafael J. Wysocki
> <rafael@kernel.org>; Len Brown <lenb@kernel.org>; Pierre Gondois
> <pierre.gondois@arm.com>; Sudeep Holla <sudeep.holla@arm.com>
> Cc: Yuan, Perry <Perry.Yuan@amd.com>; linux-acpi@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH] ACPI: CPPC: Don't require _OSC if X86_FEATURE_CPPC is
> supported
>
> commit 72f2ecb7ece7 ("ACPI: bus: Set CPPC _OSC bits for all and when
> CPPC_LIB is supported") added support for claiming to support CPPC in _OSC
> on non-Intel platforms.
>
> This unfortunately caused a regression on a vartiety of AMD platforms in the
> field because a number of AMD platforms don't set the `_OSC` bit 5 or 6 to
> indicate CPPC or CPPC v2 support.
>
> As these AMD platforms already claim CPPC support via
> `X86_FEATURE_CPPC`, use this enable this feature rather than requiring the
> `_OSC`.
>
> Fixes: 72f2ecb7ece7 ("Set CPPC _OSC bits for all and when CPPC_LIB is
> supported")
> Reported-by: Perry Yuan <perry.yuan@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/acpi/cppc_acpi.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index
> 903528f7e187..5463e6309b9a 100644
> --- a/drivers/acpi/cppc_acpi.c
> +++ b/drivers/acpi/cppc_acpi.c
> @@ -629,6 +629,15 @@ static bool is_cppc_supported(int revision, int
> num_ent)
> return false;
> }
>
> + if (osc_sb_cppc_not_supported) {
> + pr_debug("Firmware missing _OSC support\n"); #ifdef
> CONFIG_X86
> + return boot_cpu_has(X86_FEATURE_CPPC); #else
> + return false;
> +#endif
> + }
> +
> return true;
> }
>
I align with Mario to use his patch to fix the amd pstate driver loading failure issue.
AMD CPUID include the cppc flag to mark the CPPC valid if the _OSC dose not have the CPPC support info added.
Tested-by: Perry Yuan <perry.yuan@amd.com>
> @@ -684,9 +693,6 @@ int acpi_cppc_processor_probe(struct
> acpi_processor *pr)
> acpi_status status;
> int ret = -ENODATA;
>
> - if (osc_sb_cppc_not_supported)
> - return -ENODEV;
> -
> /* Parse the ACPI _CPC table for this CPU. */
> status = acpi_evaluate_object_typed(handle, "_CPC", NULL, &output,
> ACPI_TYPE_PACKAGE);
> --
> 2.34.1
next prev parent reply other threads:[~2022-06-27 17:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 16:58 [PATCH] ACPI: CPPC: Don't require _OSC if X86_FEATURE_CPPC is supported Mario Limonciello
2022-06-27 17:26 ` Yuan, Perry [this message]
2022-06-29 18:41 ` Rafael J. Wysocki
2022-06-29 18:48 ` Limonciello, Mario
2022-06-29 19:09 ` Rafael J. Wysocki
2022-06-29 19:38 ` Limonciello, Mario
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=DM4PR12MB52786707F51B48C7559115799CB99@DM4PR12MB5278.namprd12.prod.outlook.com \
--to=perry.yuan@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.