linux-stable/drivers/acpi
Vanshidhar Konda ba234a54ee ACPI: CPPC: Fix access width used for PCC registers
commit f489c94802 upstream.

commit 2f4a4d63a1 ("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: 2f4a4d63a1 ("ACPI: CPPC: Use access_width over bit_width for system memory accesses")
Signed-off-by: Vanshidhar Konda <vanshikonda@os.amperecomputing.com>
Tested-by: Jarred White <jarredwhite@linux.microsoft.com>
Reviewed-by: Jarred White <jarredwhite@linux.microsoft.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Cc: 5.15+ <stable@vger.kernel.org> # 5.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-02 16:29:29 +02:00
..
acpica ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields() 2024-04-10 16:28:22 +02:00
apei ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events 2024-02-05 20:12:47 +00:00
arm64 perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09 2023-09-23 11:11:00 +02:00
dptf
nfit ACPI: NFIT: fix a potential deadlock during NFIT teardown 2023-03-03 11:52:21 +01:00
numa ACPI: NUMA: Fix the logic of getting the fake_pxm value 2024-02-05 20:12:47 +00:00
pmic
x86 ACPI: x86: s2idle: Catch multiple ACPI_TYPE_PACKAGE objects 2023-09-23 11:11:00 +02:00
Kconfig
Makefile
ac.c
acpi_adxl.c
acpi_amba.c
acpi_apd.c ACPI: processor: Check for null return of devm_kzalloc() in fch_misc_setup() 2023-05-24 17:32:35 +01:00
acpi_cmos_rtc.c
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c ACPI: extlog: fix NULL pointer dereference check 2024-02-05 20:12:47 +00:00
acpi_fpdt.c ACPI: FPDT: properly handle invalid FPDT subtables 2023-11-28 17:07:12 +00:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c ACPI: LPIT: Avoid u32 multiplication overflow 2024-01-25 15:27:19 -08:00
acpi_lpss.c ACPI: LPSS: Fix the fractional clock divider flags 2024-01-25 15:27:20 -08:00
acpi_memhotplug.c
acpi_pad.c
acpi_pcc.c
acpi_platform.c
acpi_pnp.c
acpi_processor.c
acpi_tad.c
acpi_video.c ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop 2024-02-05 20:12:47 +00:00
acpi_watchdog.c
battery.c ACPI: battery: Fix missing NUL-termination with large strings 2023-03-10 09:32:56 +01:00
bgrt.c
blacklist.c
bus.c ACPI: bus: Ensure that notify handlers are not running after removal 2023-05-11 23:03:16 +09:00
button.c
container.c
cppc_acpi.c ACPI: CPPC: Fix access width used for PCC registers 2024-05-02 16:29:29 +02:00
custom_method.c
debugfs.c
device_pm.c PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3() 2023-03-11 13:55:33 +01:00
device_sysfs.c ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias() 2023-11-20 11:51:55 +01:00
dock.c
ec.c ACPI: EC: Add quirk for HP 250 G7 Notebook PC 2023-11-28 17:06:56 +00:00
ec_sys.c
event.c
evged.c
fan.h
fan_attr.c
fan_core.c
glue.c ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops 2023-01-18 11:58:11 +01:00
hed.c
internal.h
ioapic.c
irq.c ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2023-10-25 12:03:14 +02:00
nvs.c
osi.c
osl.c
pci_irq.c
pci_link.c
pci_mcfg.c
pci_root.c
pci_slot.c
pfr_telemetry.c ACPI: pfr_telemetry: use ACPI_FREE() to free acpi_object 2022-12-31 13:31:57 +01:00
pfr_update.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
platform_profile.c
power.c ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini 2023-05-11 23:03:38 +09:00
pptt.c ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent 2023-03-22 13:34:04 +01:00
prmt.c ACPI: PRM: Check whether EFI runtime is available 2023-01-24 07:24:35 +01:00
proc.c
processor_core.c
processor_driver.c
processor_idle.c ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit() 2024-03-26 18:20:36 -04:00
processor_pdc.c ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-05-11 23:03:11 +09:00
processor_perflib.c ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2023-08-03 10:24:18 +02:00
processor_thermal.c
processor_throttling.c
property.c acpi: property: Let args be NULL in __acpi_node_get_property_reference 2024-01-25 15:27:46 -08:00
reboot.c
resource.c ACPI: resource: Add MAIBENBEN X577 to irq1_edge_low_force_override 2024-03-26 18:20:38 -04:00
sbs.c
sbshc.c
sbshc.h
scan.c ACPI: scan: Fix device check notification handling 2024-03-26 18:20:38 -04:00
sleep.c Revert "ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default" 2024-04-13 13:05:11 +02:00
sleep.h
spcr.c
sysfs.c
tables.c
thermal.c ACPI: thermal: Drop nocrt parameter 2023-09-02 09:16:18 +02:00
tiny-power-button.c
utils.c
video_detect.c ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100 2023-11-20 11:51:53 +01:00
viot.c ACPI: VIOT: Initialize the correct IOMMU fwspec 2023-05-11 23:03:12 +09:00
wakeup.c