Skip to content

soc/intel_adsp/ace: custom arch_spin_relax and some syscalls related changes. #88525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dcpleung
Copy link
Member

  • soc: intel_adsp/ace: use custom arch_spin_relax()
  • soc: intel_adsp/ace: link xtensa_swap_update_page_tables earlier
  • soc: intel_adsp/ace: linker: align cpuhold_* variables

(See individual commits for more details.)

...earlier. Similar to xtensa_do_syscall, we want to group
some functions together.

Signed-off-by: Daniel Leung <[email protected]>
For some weird unknown reasons, the simulator really do not
like the cpuhold_* variables to be tightly packed together.
This results in cpuhold_spawned not being updated, and we
will be stuck in the while loop for it to be set.
Workaround this by explicitly aligning these variables on
16 byte boundary. This seems to work for now.

Signed-off-by: Daniel Leung <[email protected]>
Intel Audio DSP ACE needs to use arch_spin_relax() to give
the bus more time to propagate the RCW transactions among
CPUs, and to avoid sending too many requests to the bus
after failing to lock spinlocks. However, the number of
NOPs results in a very big arch_spin_relax() that spans
multiple instruction cache lines, and requires evicting
them just for NOPs.  With 5 CPUs, it can span 6 cache
lines (if using nop.n instead of nop). That's a waste of
space and cache. So instead, we do a tight loop instead.
Since the SoC supports zero-overhead loops, this should
have minimal performance impact.

Signed-off-by: Daniel Leung <[email protected]>
@dcpleung dcpleung force-pushed the soc/intel_adsp/misc_syscall_test_fixes branch from cf577a6 to 2ccc90b Compare April 11, 2025 21:29
@dcpleung dcpleung marked this pull request as ready for review April 11, 2025 22:25
@github-actions github-actions bot added the platform: Intel ADSP Intel Audio platforms label Apr 11, 2025
@kartben kartben merged commit d089815 into zephyrproject-rtos:main Apr 21, 2025
25 checks passed
@dcpleung dcpleung deleted the soc/intel_adsp/misc_syscall_test_fixes branch April 21, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Intel ADSP Intel Audio platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants