Skip to content

Remove the scheduler free flags, the Zephyr mm_heap.h shim and a stale XTOS declaration - #11560

Merged
lgirdwood merged 3 commits into
thesofproject:mainfrom
lgirdwood:kernel-user/cleanup-sched-mmheap
Dec 1, 2026
Merged

lgirdwood merged 3 commits into
thesofproject:mainfrom
lgirdwood:kernel-user/cleanup-sched-mmheap

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Part of #11306: remove three leftovers of the XTOS firmware that nothing uses any more.

Patches

  1. schedule: remove the scheduler free flags.
  2. lib: remove the empty Zephyr sof/lib/mm_heap.h.
    • It is a compatibility header kept from the XTOS heap. The Zephyr platform, init and IPC3 sources that include it use nothing from it.
    • The header, those includes and its entry in the kernel-only header list go.
    • The host library keeps its own posix/include/sof/lib/mm_heap.h, which defines its heap.
  3. posix: rtos: task: remove the declaration of task_main_primary_core(), the main task of the XTOS firmware. Nothing defines or calls it.

Functional change

None.

Testing

  • Per commit, compared with main:
    • Builds: tgl, tgl-h, mtl, lnl, ptl, wcl, nvl, imx8, imx8x, imx8m, imx8m_cm7, imx8ulp, imx95 and qemu_xtensa, and the extra CI configurations:
      • native_sim IPC3/IPC4 stub builds;
      • imx93 64-bit;
      • PTL with each userspace overlay;
      • PTL with CONFIG_SOF_USERSPACE_PROXY=n;
      • PTL and MTL with os_linux_overlay.conf;llext_relocatable.conf;
      • PTL and TGL with app/debug_stream_overlay.conf, and PTL with that overlay and user-space LL;
      • PTL and WCL with internal_ci_overlay.conf.
    • Comparisons: objects, LLEXT modules and firmware images (sections, symbols, SYS_INIT() order), and the per-function disassembly. No object changes at any commit. The only image difference is sof_init() on the Cortex-M and imx93 builds, which embeds the git hash.
    • Signing: rimage runs for every Intel platform, and the generated configs are unchanged.
    • Cadence xt-clang (RI-2022.10): MTL, PTL and NVL compile.
    • Host library: builds.
    • Documentation: builds as in CI, with no warnings.
  • At the tip:
    • ZTest passes, run as in CI (37 of 37 configurations);
    • the testbench and the tools pass;
    • the include checker passes with --strict, for the builds and for the sources;
    • the platforms that already fail on main (acp_6_0, acp_7_0, acp_7_x, mt8186, mt8188, mt8195, mt8196, mt8365) have unchanged error sets. Several of them include the removed header.

All of the above was run on 4bdfa15 (current main).

🤖 Generated with Claude Code

lrgirdwo and others added 3 commits November 29, 2026 16:32
The scheduler free operation took a flags argument, and the only flag,
SOF_SCHEDULER_FREE_IRQ_ONLY, asked the XTOS LL scheduler to only free
its interrupt. The XTOS LL scheduler was removed, and none of the
remaining schedulers (the Zephyr LL scheduler and the host library LL
and EDF schedulers) uses the flags. The only caller, the testbench,
passes 0.

Remove SOF_SCHEDULER_FREE_IRQ_ONLY and the flags argument of the
scheduler free operation and of schedule_free().

No functional change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
On Zephyr, sof/lib/mm_heap.h is an empty compatibility header, kept
from the XTOS heap. The Zephyr platform, init and IPC3 sources that
include it use nothing from it. Remove the header and those includes,
and its entry in the kernel-only header list.

The host library keeps its own posix/include/sof/lib/mm_heap.h, which
defines its heap.

No functional change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
task_main_primary_core() was the main task of the XTOS firmware. The
host task header still declares it, but nothing defines or calls it.
Remove the declaration.

No functional change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
@intel-sofci

intel-sofci commented Nov 30, 2026 •

Copy link
Copy Markdown

PR 11560: test results

Run date: 2026-11-30 21:36 UTC

Tested commit: d613fdb6da3948bfff49d1c435f861691f59340d

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

@lgirdwood

Copy link
Copy Markdown
Member Author

CI unrelated

@lgirdwood
lgirdwood merged commit 236f0b1 into thesofproject:main Dec 1, 2026
62 of 68 checks passed
@lgirdwood
lgirdwood deleted the kernel-user/cleanup-sched-mmheap branch December 1, 2026 13:34
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.

4 participants