From: Mario Limonciello <mario.limonciello@amd.com>
To: Lifeng Zheng <zhenglifeng1@huawei.com>,
rafael@kernel.org, lenb@kernel.org, robert.moore@intel.com,
viresh.kumar@linaro.org, gautham.shenoy@amd.com,
ray.huang@amd.com, perry.yuan@amd.com, pierre.gondois@arm.com
Cc: acpica-devel@lists.linux.dev, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linuxarm@huawei.com, jonathan.cameron@huawei.com,
zhanjie9@hisilicon.com, lihuisong@huawei.com,
cenxinghai@h-partners.com, hepeng68@huawei.com
Subject: Re: [PATCH v6 1/8] ACPI: CPPC: Add IS_OPTIONAL_CPC_REG macro to judge if a cpc_reg is optional
Date: Wed, 9 Apr 2025 13:53:25 -0500 [thread overview]
Message-ID: <7a3bda35-05a0-49ad-b014-1834a176a906@amd.com> (raw)
In-Reply-To: <20250409065703.1461867-2-zhenglifeng1@huawei.com>
On 4/9/2025 1:56 AM, Lifeng Zheng wrote:
> In ACPI 6.5, s8.4.6.1 _CPC (Continuous Performance Control), whether each
> of the per-cpu cpc_regs[] is mendatory or optional is defined. Since the
mandatory
> CPC_SUPPORTED() check is only for optional cpc field, another macro to
> check if the field is optional is needed.
>
> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
> Signed-off-by: Lifeng Zheng <zhenglifeng1@huawei.com>
> ---
> drivers/acpi/cppc_acpi.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
> index f193e713825a..39f019e265da 100644
> --- a/drivers/acpi/cppc_acpi.c
> +++ b/drivers/acpi/cppc_acpi.c
> @@ -129,6 +129,20 @@ static DEFINE_PER_CPU(struct cpc_desc *, cpc_desc_ptr);
> #define CPC_SUPPORTED(cpc) ((cpc)->type == ACPI_TYPE_INTEGER ? \
> !!(cpc)->cpc_entry.int_value : \
> !IS_NULL_REG(&(cpc)->cpc_entry.reg))
> +
> +/*
> + * Each bit indicates the optionality of the register in per-cpu
> + * cpc_regs[] with the corresponding index. 0 means mandatory and 1
> + * means optional.
> + */
> +#define REG_OPTIONAL (0x1FC7D0)
> +
> +/*
> + * Use the index of the register in per-cpu cpc_regs[] to check if
> + * it's an optional one.
> + */
> +#define IS_OPTIONAL_CPC_REG(reg_idx) (REG_OPTIONAL & (1U << (reg_idx)))
> +
> /*
> * Arbitrary Retries in case the remote processor is slow to respond
> * to PCC commands. Keeping it high enough to cover emulators where
next prev parent reply other threads:[~2025-04-09 18:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 6:56 [PATCH v6 0/8] Add functions for getting and setting registers related to autonomous selection in cppc_acpi Lifeng Zheng
2025-04-09 6:56 ` [PATCH v6 1/8] ACPI: CPPC: Add IS_OPTIONAL_CPC_REG macro to judge if a cpc_reg is optional Lifeng Zheng
2025-04-09 18:53 ` Mario Limonciello [this message]
2025-04-10 8:21 ` zhenglifeng (A)
2025-04-09 6:56 ` [PATCH v6 2/8] ACPI: CPPC: Optimize cppc_get_perf() Lifeng Zheng
2025-04-09 17:10 ` Rafael J. Wysocki
2025-04-10 8:23 ` zhenglifeng (A)
2025-04-09 6:56 ` [PATCH v6 3/8] ACPI: CPPC: Rename cppc_get_perf() to cppc_get_reg_val() Lifeng Zheng
2025-04-09 6:56 ` [PATCH v6 4/8] ACPI: CPPC: Extract cppc_get_reg_val_in_pcc() Lifeng Zheng
2025-04-09 6:57 ` [PATCH v6 5/8] ACPI: CPPC: Add cppc_set_reg_val() Lifeng Zheng
2025-04-09 6:57 ` [PATCH v6 6/8] ACPI: CPPC: Refactor register value get and set ABIs Lifeng Zheng
2025-04-09 6:57 ` [PATCH v6 7/8] ACPI: CPPC: Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel() Lifeng Zheng
2025-04-09 6:57 ` [PATCH v6 8/8] ACPI: CPPC: Add three functions related to autonomous selection Lifeng Zheng
2025-04-09 18:59 ` Mario Limonciello
2025-04-10 8:31 ` zhenglifeng (A)
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=7a3bda35-05a0-49ad-b014-1834a176a906@amd.com \
--to=mario.limonciello@amd.com \
--cc=acpica-devel@lists.linux.dev \
--cc=cenxinghai@h-partners.com \
--cc=gautham.shenoy@amd.com \
--cc=hepeng68@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=lenb@kernel.org \
--cc=lihuisong@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=perry.yuan@amd.com \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=robert.moore@intel.com \
--cc=viresh.kumar@linaro.org \
--cc=zhanjie9@hisilicon.com \
--cc=zhenglifeng1@huawei.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
all inboxes | Powered by JetHome®