Repository navigation
Conversation
zephyr/wrapper.c still defines symbols that the XTOS-era code needed at link time: - irq_name_level2[] and irq_name_level5[]: nothing refers to them. - arch_dump_regs_a(): nothing calls it. - platform_interrupt_set() and platform_interrupt_clear(): only the legacy interrupt API in interrupt-legacy.h calls them, which only the AMD platforms without native drivers use, and acp_6_0, the only such platform, defines its own versions in rembrandt/interrupt.c. Remove them. _xtos_ints_off() is still needed by arch_interrupt_disable_mask() in the legacy interrupt code, so only build it for the AMD platforms without native drivers. In the LL scheduler, take the local interrupt lock with arch_irq_lock() and arch_irq_unlock() directly instead of the irq_local_disable() and irq_local_enable() macros, which expand to the same calls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The removed stubs cause unresolved references in Zephyr ACP 6.0 builds, and removing the debug anchor breaks the coredump backtrace command.
2 open issues
What changed in this PR
This PR advances SOF’s migration away from XTOS-era code under #11517 by removing legacy linkage stubs and using Zephyr’s local interrupt APIs directly.
Changes:
- Removes interrupt-name symbols, platform interrupt stubs, and the debug register-dump stub.
- Limits
_xtos_ints_off()to AMD builds without native drivers. - Replaces LL scheduler interrupt wrappers with
arch_irq_lock()andarch_irq_unlock().
| File | Description |
|---|---|
zephyr/wrapper.c |
Removes legacy linkage symbols and restricts the remaining XTOS interrupt helper. |
src/schedule/zephyr_ll.c |
Uses Zephyr’s local interrupt lock and unlock calls directly. |
Review effort: Balanced
| @@ -118,16 +112,6 @@ void interrupt_unmask(uint32_t irq, unsigned int cpu) | |||
| } | |||
| #endif | |||
|
|
|||
Member
Author
There was a problem hiding this comment.
All non native zephyr code is getting removed, platforms have to transition to native zephyr.
| return host_notify + cpu_get_id(); | ||
| } | ||
|
|
||
| #if defined(CONFIG_AMD) && !defined(CONFIG_ZEPHYR_NATIVE_DRIVERS) |
Member
Author
There was a problem hiding this comment.
The Zephyr tooling should be used here, will check that this change compiles with Zephyr, if so we could also remove the old sof script too.
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.


Remove the interrupt and debug linkage stubs that
zephyr/wrapper.cstill carries for XTOS-era code. Part of #11517 (step 1, "thewrapper.cIRQ linkage stubs"); #11516 did not cover them.Changes
irq_name_level2[]andirq_name_level5[]: nothing refers to them.arch_dump_regs_a(): nothing calls it.platform_interrupt_set()andplatform_interrupt_clear(): only the legacy interrupt API ininterrupt-legacy.hcalls them. Only the AMD platforms without native drivers use that API, and acp_6_0, the only such platform, defines its own versions inrembrandt/interrupt.c._xtos_ints_off()is only built for the AMD platforms without native drivers, becausearch_interrupt_disable_mask()in their legacy interrupt code still calls it.arch_irq_lock()andarch_irq_unlock()directly.irq_local_disable()andirq_local_enable()expand to the same calls.These symbols were also searched for in the Zephyr tree, the modules and their prebuilt libraries. None of them refers to the removed symbols.
Not in this PR
interrupt_mask()andinterrupt_unmask()stubs: the legacy DMA domains can still call them on MediaTek, which does not build on main, so they go with the legacy driver removal (#11517 step 14).Functional change
None. Only
wrapper.cchanges, by losing the removed functions and data;zephyr_ll.ccompiles to the same code.Testing
wrapper.cchanges, plus the objects that embed the git version.🤖 Generated with Claude Code