From 5613f0e6bef377c5f0213f961ab6f5a3d4e54ae8 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Thu, 21 Nov 2024 12:56:12 +0100 Subject: [PATCH] soc/intel/xeon_sp: Fix debug print Fix debug prints that use non-thread safe dev_path(). Since the code is part of MPinit, it's using multiple threads and one threads modifies the only buffer used, resulting in path being printed that do not belong to the current thread. Drop the call since printing the APIC ID is sufficient and thread safe. Change-Id: I0cbc9cb11da8397ab6c2e8e56414558a8a0db93b Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/85288 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/soc/intel/xeon_sp/cpx/cpu.c | 4 ++-- src/soc/intel/xeon_sp/skx/cpu.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/soc/intel/xeon_sp/cpx/cpu.c b/src/soc/intel/xeon_sp/cpx/cpu.c index aaac83b583..d90b8b508e 100644 --- a/src/soc/intel/xeon_sp/cpx/cpu.c +++ b/src/soc/intel/xeon_sp/cpx/cpu.c @@ -78,8 +78,8 @@ static void each_cpu_init(struct device *cpu) { msr_t msr; - printk(BIOS_SPEW, "%s dev: %s, cpu: %lu, apic_id: 0x%x, package_id: 0x%x\n", - __func__, dev_path(cpu), cpu_index(), cpu->path.apic.apic_id, + printk(BIOS_SPEW, "%s: cpu: %lu, apic_id: 0x%x, package_id: 0x%x\n", + __func__, cpu_index(), cpu->path.apic.apic_id, cpu->path.apic.package_id); /* diff --git a/src/soc/intel/xeon_sp/skx/cpu.c b/src/soc/intel/xeon_sp/skx/cpu.c index 0d828c9ab6..fc49ddcff5 100644 --- a/src/soc/intel/xeon_sp/skx/cpu.c +++ b/src/soc/intel/xeon_sp/skx/cpu.c @@ -79,8 +79,8 @@ static void xeon_sp_core_init(struct device *cpu) { msr_t msr; - printk(BIOS_INFO, "%s dev: %s, cpu: %lu, apic_id: 0x%x, package_id: 0x%x\n", - __func__, dev_path(cpu), cpu_index(), cpu->path.apic.apic_id, + printk(BIOS_INFO, "%s: cpu: %lu, apic_id: 0x%x, package_id: 0x%x\n", + __func__, cpu_index(), cpu->path.apic.apic_id, cpu->path.apic.package_id); assert(chip_config);