From aec4791aa747c9a8db76d9191de27fd607c6acde Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Tue, 1 Dec 2026 19:38:52 +0200 Subject: [PATCH] boards: intel_adsp: enable timing functions for all Intel targets Setting of CONFIG_TIMING_FUNCTIONS affects telemetry data output and also the implementation of CONFIG_PERFORMANCE_COUNTERS. On Intel platforms, if CONFIG_TIMING_FUNCTIONS is defined, Xtensa CCOUNT (DSP cycles) is used as to measure cycles. Otherwise the system 38.4Mhz wall clock timer is used. Currently only some Intel targets enable CONFIG_TIMING_FUNCTIONS, creating unnecessary behavioural delta. Enable the setting for every Intel ADSP target in the shared boards/intel_adsp/Kconfig.defconfig and drop it from the MTL and LNL board configurations. TIMING_FUNCTIONS has no in-tree default, so the defconfig default applies. The thread runtime statistics are not affected, they only use the timing functions with CONFIG_THREAD_RUNTIME_STATS_USE_TIMING_FUNCTIONS. Signed-off-by: Kai Vehmanen --- app/boards/intel_adsp/Kconfig.defconfig | 10 ++++++++++ app/boards/intel_adsp_ace15_mtpm.conf | 1 - app/boards/intel_adsp_ace20_lnl.conf | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/boards/intel_adsp/Kconfig.defconfig b/app/boards/intel_adsp/Kconfig.defconfig index f656ec2f7aca..7e78a5136d7b 100644 --- a/app/boards/intel_adsp/Kconfig.defconfig +++ b/app/boards/intel_adsp/Kconfig.defconfig @@ -165,6 +165,16 @@ config LOG_CORE_ID_PREFIX config LOG_TIMESTAMP_64BIT default y +# Zephyr / timing +# ---------------------------------------- +# Use the Xtensa CCOUNT (DSP cycles) for timing_counter_get(), which the +# SOF telemetry uses for the LL tick and component performance +# measurements, so that the KCPS and load values are in DSP cycles on all +# Intel targets, as in the reference firmware. + +config TIMING_FUNCTIONS + default y + # Zephyr / debugging # ---------------------------------------- diff --git a/app/boards/intel_adsp_ace15_mtpm.conf b/app/boards/intel_adsp_ace15_mtpm.conf index a967959f531c..01d46ffc97b0 100644 --- a/app/boards/intel_adsp_ace15_mtpm.conf +++ b/app/boards/intel_adsp_ace15_mtpm.conf @@ -60,7 +60,6 @@ CONFIG_LLEXT_STORAGE_WRITABLE=y CONFIG_LLEXT_EXPERIMENTAL=y CONFIG_LLEXT_EDK=n CONFIG_MODULES=y -CONFIG_TIMING_FUNCTIONS=y CONFIG_WATCHDOG=y CONFIG_TIMESLICE_PER_THREAD=y CONFIG_THREAD_RUNTIME_STATS=y diff --git a/app/boards/intel_adsp_ace20_lnl.conf b/app/boards/intel_adsp_ace20_lnl.conf index 9eab3366ac0d..f802e708646f 100644 --- a/app/boards/intel_adsp_ace20_lnl.conf +++ b/app/boards/intel_adsp_ace20_lnl.conf @@ -46,7 +46,6 @@ CONFIG_LLEXT_STORAGE_WRITABLE=y CONFIG_LLEXT_EXPERIMENTAL=y CONFIG_LLEXT_EDK=n CONFIG_MODULES=y -CONFIG_TIMING_FUNCTIONS=y # Zephyr / device drivers CONFIG_DAI_DMIC_HAS_MULTIPLE_LINE_SYNC=y