Repository navigation
Conversation
Kernel code uses the native Zephyr API. cache_to_uncache() and is_cached() are SOF helpers for the cached and uncached aliases of the Intel ADSP memory. On ACE, cache_to_uncache() is already an alias of sys_cache_uncached_ptr_get(). On cAVS, SOF clears address bit 29 itself, and Zephyr now does the same: the cAVS cached and uncached regions are 5 and 4 (CONFIG_INTEL_ADSP_CACHED_REGION, _UNCACHED_REGION), which only differ in that bit. Call sys_cache_uncached_ptr_get() in the telemetry and IPC code, and sys_cache_is_ptr_cached() in the IDC message asserts. is_cached() tested address bit 29; Zephyr tests that the address is in the cached region, which is the same for the SRAM addresses of the IDC messages. Remove is_cached(), which has no other users. The user code, including the platform mailbox helpers, keeps the SOF helpers. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
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.
Use the Zephyr cache pointer API instead of the SOF cache alias helpers in the kernel code. Part of #11517 (step 2).
Changes
cache_to_uncache()→sys_cache_uncached_ptr_get()in the telemetry and IPC code.is_cached()→sys_cache_is_ptr_cached()in the IDC message asserts, andis_cached()is removed: it has no other users.Why this is the same on cAVS
On ACE,
cache_to_uncache()was already an alias ofsys_cache_uncached_ptr_get(). On cAVS, SOF cleared address bit 29 itself. Zephyr now supports the cAVS memory aliases too (CONFIG_CACHE_HAS_MIRRORED_MEMORY_REGIONS), with cached and uncached regions 5 and 4, which only differ in that bit, so it computes the same address.is_cached()tested address bit 29, while Zephyr tests that the address is in the cached region; for the SRAM addresses of the IDC messages the two agree.Not in this PR
User code, including the platform mailbox helpers and
coherent.h, keeps the SOF helpers, so their cAVS implementation stays for now.Functional change
None.
Testing
Tested as a stack of the four Wave D PRs on main 73a7797 (this PR does not depend on the others):
(intelemetry.c, which was already there.🤖 Generated with Claude Code