Skip to content

platform: intel: ace: fix is_uncached() definition#10788

Merged
kv2019i merged 1 commit into
thesofproject:mainfrom
serhiy-katsyuba-intel:uncached_fix
May 19, 2026
Merged

platform: intel: ace: fix is_uncached() definition#10788
kv2019i merged 1 commit into
thesofproject:mainfrom
serhiy-katsyuba-intel:uncached_fix

Conversation

@serhiy-katsyuba-intel
Copy link
Copy Markdown
Contributor

Fixes is_uncached() implementation for Intel ACE platforms.

Fixes is_uncached() implementation for Intel ACE platforms.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the Intel ACE platform is_uncached() macro so it correctly reports uncached pointers by negating Zephyr’s cached-pointer predicate.

Changes:

  • Updates is_uncached(address) to return true when sys_cache_is_ptr_cached(address) is false.

Copy link
Copy Markdown
Collaborator

@softwarecki softwarecki left a comment

Choose a reason for hiding this comment

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

Good catch!

#define uncache_to_cache(address) sys_cache_cached_ptr_get(address)
#define cache_to_uncache(address) sys_cache_uncached_ptr_get(address)
#define is_uncached(address) sys_cache_is_ptr_cached(address)
#define is_uncached(address) (!sys_cache_is_ptr_cached(address))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice. But I don't see it used anywhere? It's used in src/include/sof/coherent.h but only when certain macros are defined, specifically COHERENT_CHECK_ALIAS or COHERENT_CHECK_NONSHARED_CORES and those macros seem to never be defined... coherent.h is very much deprecated...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's not used in production code, only in those debug macros. So this did not cause any bug.

@kv2019i kv2019i merged commit b2a7508 into thesofproject:main May 19, 2026
47 of 48 checks passed
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.

7 participants