Skip to content
Commit 6a8fda8a authored by Jarred White's avatar Jarred White Committed by Greg Kroah-Hartman
Browse files

ACPI: CPPC: Fix bit_offset shift in MASK_VAL() macro

commit 05d92ee7 upstream.

Commit 2f4a4d63 ("ACPI: CPPC: Use access_width over bit_width for
system memory accesses") neglected to properly wrap the bit_offset shift
when it comes to applying the mask. This may cause incorrect values to be
read and may cause the cpufreq module not be loaded.

[   11.059751] cpu_capacity: CPU0 missing/invalid highest performance.
[   11.066005] cpu_capacity: partial information: fallback to 1024 for all CPUs

Also, corrected the bitmask generation in GENMASK (extra bit being added).

Fixes: 2f4a4d63

 ("ACPI: CPPC: Use access_width over bit_width for system memory accesses")
Signed-off-by: default avatarJarred White <jarredwhite@linux.microsoft.com>
Cc: 5.15+ <stable@vger.kernel.org> # 5.15+
Reviewed-by: default avatarVanshidhar Konda <vanshikonda@os.amperecomputing.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1b890ae4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment