Repository navigation
telemetry: call the Zephyr cache API directly - #11615
Merged
lgirdwood merged 1 commit intoDec 4, 2026
Merged
Conversation
dcache_writeback_region() is an inline wrapper of sys_cache_data_flush_range(). The kernel-only code switched to the Zephyr call in commit 1e6fb6b ("zephyr: call the Zephyr cache API directly in kernel-only code"), but the extended telemetry window code added a new call to the wrapper afterwards. Call the Zephyr function directly here too. telemetry_ext_ready is a plain bool, so it no longer needs the __sparse_cache cast that only matched the wrapper prototype. No lines are added or removed. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
lgirdwood
marked this pull request as ready for review
December 4, 2026 12:54
lgirdwood
requested review from
dbaluta,
kv2019i,
lbetlej,
mmaka1 and
plbossart
as code owners
December 4, 2026 12:54
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the telemetry initialization update to Zephyr’s cache API.
No open issues 🎉
What changed in this PR
Updates extended telemetry initialization to use Zephyr’s cache API directly, continuing the removal of legacy SOF wrappers. No functional change is intended.
Changes:
- Replaces
dcache_writeback_region()withsys_cache_data_flush_range(). - Removes the unnecessary sparse pointer cast.
| File | Description |
|---|---|
| src/kernel/debug/telemetry/telemetry.c | Flushes the telemetry readiness flag through the native Zephyr API. |
Review effort: Balanced
PR 11615: test resultsRun date: 2026-12-04 13:25 UTC Tested commit: 49ee1e041405002b7dd3e7c186da93a8e9b2122e |
kv2019i
approved these changes
Dec 4, 2026
| dcache_writeback_region((__sparse_force void __sparse_cache *)&telemetry_ext_ready, | ||
| sizeof(telemetry_ext_ready)); | ||
| sys_cache_data_flush_range(&telemetry_ext_ready, | ||
| sizeof(telemetry_ext_ready)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Call the Zephyr cache API directly in the extended telemetry window code. Part of #11517 (step 2).
The kernel-only code switched from the SOF cache wrappers to the Zephyr calls in #11571, but
telemetry_late_init()added a newdcache_writeback_region()call afterwards. It now callssys_cache_data_flush_range()directly.telemetry_ext_readyis a plainbool, so the__sparse_cachecast that only matched the wrapper prototype goes away. No lines are added or removed.After this and #11598 (shared code), no code calls
dcache_writeback_region(),dcache_invalidate_region(),dcache_writeback_invalidate_region()oricache_invalidate_region(), and a follow-up can remove them.Functional change
None.
Testing
CONFIG_SOF_TELEMETRY(and with itCONFIG_SOF_TELEMETRY_EXTENDED_WINDOW).telemetry.c.objcompared with main (66a6139), debug sections stripped. Identical on PTL. On MTL the code is identical, and only the name of a compiler-generated switch table (CSWTCH$241→CSWTCH$240) differs.🤖 Generated with Claude Code