Skip to content

boards: intel_adsp: enable timing functions for all Intel targets - #11581

Open
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202612-intel-timing-functions
Open

kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202612-intel-timing-functions

Conversation

@kv2019i

@kv2019i kv2019i commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

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.

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 <kai.vehmanen@linux.intel.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change standardizing timing defaults across Intel ADSP targets.

No open issues 🎉

What changed in this PR

Standardizes timing measurements across Intel ADSP targets by enabling CONFIG_TIMING_FUNCTIONS in the shared board defaults, making SOF telemetry and performance counters consistently use DSP cycles.

Changes:

  • Adds a shared timing-functions default and documents its purpose.
  • Removes redundant Meteor Lake and Lunar Lake settings; thread runtime statistics remain unchanged.
File Description
app/​boards/​intel_adsp/​Kconfig.defconfig Enables timing functions by default for all Intel ADSP targets.
app/​boards/​intel_adsp_ace20_lnl.conf Removes the redundant Lunar Lake timing setting.
app/​boards/​intel_adsp_ace15_mtpm.conf Removes the redundant Meteor Lake timing setting.

Review effort: Balanced

@kv2019i

kv2019i commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

FYI @lgirdwood @abonislawski this helps when parsing telemetry output as timer source is same for all intel targets. I'm still not convinced ccount is necessarily a good idea for telemetry. We use clock and power gating and DSP speed can be adjusted dynamically, so the raw ccount can be hard to parse with generic tools and prone to errors.

The original commit 0419b7c actually used the 38.4Mhz clock to report. The field name was "last_ccount", but I guess this is for historical reason.

Commit 3be9f32 changed to use raw ccount, but this was not enabled for all Intel targets, so now we have a mix (this PR fixes that).

FYI @dcpleung

@intel-sofci

Copy link
Copy Markdown

PR 11581: test results

Run date: 2026-12-01 19:22 UTC

Tested commit: aec4791aa747c9a8db76d9191de27fd607c6acde

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants