diff options
author | Mario Limonciello <mario.limonciello@amd.com> | 2024-12-07 22:38:06 -0600 |
---|---|---|
committer | Mario Limonciello <mario.limonciello@amd.com> | 2025-03-06 13:01:25 -0600 |
commit | b4cc466b973590114b4bf49025d362ad9618a23e (patch) | |
tree | ca3f5dbeea2cd6f5d2dbfb84cc8875ad341cfea0 /arch/x86/kernel/acpi/cppc.c | |
parent | c630458c7a4b990742905e312af20a7c3260ca14 (diff) |
cpufreq/amd-pstate: Replace all AMD_CPPC_* macros with masks
Bitfield masks are easier to follow and less error prone.
Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Diffstat (limited to 'arch/x86/kernel/acpi/cppc.c')
-rw-r--r-- | arch/x86/kernel/acpi/cppc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/acpi/cppc.c b/arch/x86/kernel/acpi/cppc.c index d745dd586303..77bfb846490c 100644 --- a/arch/x86/kernel/acpi/cppc.c +++ b/arch/x86/kernel/acpi/cppc.c @@ -4,6 +4,8 @@ * Copyright (c) 2016, Intel Corporation. */ +#include <linux/bitfield.h> + #include <acpi/cppc_acpi.h> #include <asm/msr.h> #include <asm/processor.h> @@ -149,7 +151,7 @@ int amd_get_highest_perf(unsigned int cpu, u32 *highest_perf) if (ret) goto out; - val = AMD_CPPC_HIGHEST_PERF(val); + val = FIELD_GET(AMD_CPPC_HIGHEST_PERF_MASK, val); } else { ret = cppc_get_highest_perf(cpu, &val); if (ret) |