From 45aae7f10ff2b2fc6a947eb2667eb658188d3b52 Mon Sep 17 00:00:00 2001 From: Fabio Aiuto Date: Fri, 23 Sep 2022 16:51:34 +0200 Subject: treewide: use is_enabled_cpu() on cycles over device list use is_enabled_cpu() on cycles over device list to check whether the current device is enabled cpu. TEST: compile test and qemu run successfully with coreinfo payload Signed-off-by: Fabio Aiuto Change-Id: If64bd18f006b6f5fecef4f606c1df7d3a4d42883 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67797 Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/mainboard/prodrive/hermes/mainboard.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/mainboard/prodrive') diff --git a/src/mainboard/prodrive/hermes/mainboard.c b/src/mainboard/prodrive/hermes/mainboard.c index 2f0de61843..a713342d96 100644 --- a/src/mainboard/prodrive/hermes/mainboard.c +++ b/src/mainboard/prodrive/hermes/mainboard.c @@ -104,11 +104,7 @@ static void update_board_layout(void) /* Update CPU fields */ for (struct device *cpu = all_devices; cpu; cpu = cpu->next) { - if (cpu->path.type != DEVICE_PATH_APIC) - continue; - if (cpu->bus->dev->path.type != DEVICE_PATH_CPU_CLUSTER) - continue; - if (!cpu->enabled) + if (!is_enabled_cpu(cpu)) continue; layout.cpu_count++; if (!layout.cpu_name[0]) -- cgit v1.2.3