Skip to content
Commit 3ecf2249 authored by Vanshidhar Konda's avatar Vanshidhar Konda Committed by Greg Kroah-Hartman
Browse files

ACPI: CPPC: Fix access width used for PCC registers

commit f489c948 upstream.

commit 2f4a4d63 ("ACPI: CPPC: Use access_width over bit_width for system
memory accesses") modified cpc_read()/cpc_write() to use access_width to
read CPC registers.

However, for PCC registers the access width field in the ACPI register
macro specifies the PCC subspace ID.  For non-zero PCC subspace ID it is
incorrectly treated as access width. This causes errors when reading
from PCC registers in the CPPC driver.

For PCC registers, base the size of read/write on the bit width field.
The debug message in cpc_read()/cpc_write() is updated to print relevant
information for the address space type used to read the register.

Fixes: 2f4a4d63

 ("ACPI: CPPC: Use access_width over bit_width for system memory accesses")
Signed-off-by: default avatarVanshidhar Konda <vanshikonda@os.amperecomputing.com>
Tested-by: default avatarJarred White <jarredwhite@linux.microsoft.com>
Reviewed-by: default avatarJarred White <jarredwhite@linux.microsoft.com>
Reviewed-by: default avatarEaswar Hariharan <eahariha@linux.microsoft.com>
Cc: 5.15+ <stable@vger.kernel.org> # 5.15+
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a8fda8a
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