From c44c977e0936c9099ad78a6c8b24810db5c2d293 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 7 Mar 2023 01:37:37 +0100 Subject: [PATCH] soc/amd/common/block/acpi/cpu_power_state: use definition for bit_offset Instead of using a magic constant in the bit_offset field of the C state resource for the C1 state that's entered via the MWAIT instruction, use the existing ACPI_FFIXEDHW_CLASS_MWAIT define. This value is checked by acpi_processor_ffh_cstate_probe in the Linux kernel. Signed-off-by: Felix Held Change-Id: I9edc681efab15b5ceba91c8105f7dc6d687d8be8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73498 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Fred Reitberger --- src/soc/amd/common/block/acpi/cpu_power_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/amd/common/block/acpi/cpu_power_state.c b/src/soc/amd/common/block/acpi/cpu_power_state.c index d8af0c9244..d0e59af835 100644 --- a/src/soc/amd/common/block/acpi/cpu_power_state.c +++ b/src/soc/amd/common/block/acpi/cpu_power_state.c @@ -24,7 +24,7 @@ static void write_cstate_entry(acpi_cstate_t *entry, const acpi_cstate_t *data, entry->resource = (acpi_addr_t){ .space_id = ACPI_ADDRESS_SPACE_FIXED, .bit_width = 2, - .bit_offset = 2, + .bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT, .addrl = 0, .addrh = 0, };