diff options
Diffstat (limited to 'src/soc/intel/alderlake')
-rw-r--r-- | src/soc/intel/alderlake/acpi.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/soc/intel/alderlake/acpi.c b/src/soc/intel/alderlake/acpi.c index 1c820c2750..c874067701 100644 --- a/src/soc/intel/alderlake/acpi.c +++ b/src/soc/intel/alderlake/acpi.c @@ -279,6 +279,7 @@ void soc_lpi_get_constraints(void *unused) acpigen_emit_byte(RETURN_OP); acpigen_write_package(num_entries); + size_t cpu_index = 0; for (dev = all_devices; dev; dev = dev->next) { min_sleep_state = get_min_sleep_state(dev); if (min_sleep_state == NONE) @@ -294,15 +295,8 @@ void soc_lpi_get_constraints(void *unused) break; case DEVICE_PATH_APIC: - /* Lookup CPU id */ - for (size_t i = 0; i < CONFIG_MAX_CPUS; i++) { - if (cpu_get_apic_id(i) == dev->path.apic.apic_id) { - snprintf(path, sizeof(path), - CONFIG_ACPI_CPU_STRING, i); - break; - } - } - + snprintf(path, sizeof(path), CONFIG_ACPI_CPU_STRING, + cpu_index++); acpigen_emit_namestring(path); break; |