Skip to content

Phase 2 (part 2): move src/idc to src/kernel/idc - #11398

Open
lgirdwood wants to merge 2 commits into
thesofproject:mainfrom
lgirdwood:kernel-user/phase2b
Open

lgirdwood wants to merge 2 commits into
thesofproject:mainfrom
lgirdwood:kernel-user/phase2b

Conversation

@lgirdwood

@lgirdwood lgirdwood commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Phase 2 of #11306 (kernel / user-space partition), second part: move the inter-core communication code to src/kernel/idc. Follows #11394.

Patches

  • src/idc → src/kernel/idc: a pure move. The code is now built into the sof_kernel library added in Phase 2 (part 1): add src/kernel and a sof_kernel library, move src/init #11394.
    • Kconfig: a new src/kernel/Kconfig sources the Kconfig files of the moved directories. src/Kconfig sources it in place of idc/Kconfig, and the option values are unchanged.
    • README: the relative link is fixed.
    • Host builds: only Zephyr builds the IDC code, so they are not affected.
  • Docs: AGENTS.md, the user-space README and the audio README list the kernel-only directories by name. They now list src/kernel, note the sof_kernel library, and keep the directories that have not moved yet. This also covers src/init, which Phase 2 (part 1): add src/kernel and a sof_kernel library, move src/init #11394 moved but did not update here.

Functional change

None. The objects are unchanged, and every build's .config has the same option values before and after. As in #11394, the only effect is on link order: in every firmware image the symbols (name, type and size) and the SYS_INIT() order are identical, and only alignment padding in some sections changes. Two more link-order effects:

Testing

  • Per commit:
    • Builds: every commit was built on tgl, tgl-h, mtl, lnl, ptl, wcl, nvl, imx8, imx8x, imx8m, imx8m_cm7, imx8ulp, imx95 and qemu_xtensa, and in 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.
    • Objects and LLEXT modules: same non-debug section sizes as the previous commit.
    • Firmware images: compared for symbols, SYS_INIT() order and section sizes.
    • Cadence xt-clang (RI-2022.10): MTL, PTL and NVL compile.
    • Host: the host library and cmocka build and pass.
  • At the tip:
    • all cmocka configurations, the testbench and the tools pass;
    • 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.
  • Hardware: TGL (UP Xtreme i11) with sof-hda-generic-cavs25-2ch.tplg boots, plays 5 s on the HDA analog PCM, and plays again after runtime suspend, with no DSP errors.

All of the above was run on 78b23ad with #11394 applied. After the rebase onto d3f51d0 (current main, including #11394), the patches are unchanged, and the firmware builds, the host library and cmocka were repeated at the tip.

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the kernel/userspace reorganization.

No open issues 🎉

What changed in this PR

Continues the kernel/userspace partition in #11306 by moving inter-core communication into src/kernel/idc. The stacked changes from #11394 also establish sof_kernel and relocate initialization code, with no intended functional changes.

Changes:

  • Build IDC and initialization code under the dedicated sof_kernel library.
  • Route IDC configuration through src/kernel/Kconfig, preserving option values.
  • Update documentation paths, kernel-tier guidance, and a test-support comment.
File Description
zephyr/​CMakeLists.txt Creates and links sof_kernel, adds its subtree, and configures trace paths.
test/​ztest/​unit/​common/​sof_context.c Updates the initialization path in a comment.
src/​kernel/​Kconfig Sources the relocated IDC configuration.
src/​kernel/​init/​README.md Updates initialization paths and the userspace documentation link.
src/​kernel/​init/​init.c Relocates firmware initialization code unchanged.
src/​kernel/​init/​ext_manifest.c Relocates firmware metadata definitions unchanged.
src/​kernel/​init/​CMakeLists.txt Relocates initialization source registration.
src/​kernel/​idc/​zephyr_idc.c Relocates Zephyr inter-core messaging unchanged.
src/​kernel/​idc/​README.md Updates the IDC directory path and documentation link.
src/​kernel/​idc/​Kconfig Preserves the IDC timeout option at its new location.
src/​kernel/​idc/​idc.c Relocates IDC command handling unchanged.
src/​kernel/​idc/​CMakeLists.txt Relocates IDC source registration.
src/​kernel/​CMakeLists.txt Selects sof_kernel for the IDC and initialization subdirectories.
src/​Kconfig Replaces the direct IDC include with the kernel configuration entry point.
src/​include/​sof/​userspace/​README.md Documents the kernel subtree and dedicated library.
src/​audio/​README.md Updates the kernel-only IDC path.
AGENTS.md Updates kernel-tier placement guidance for the new layout.

Review effort: Balanced

lrgirdwo and others added 2 commits November 4, 2026 11:36
The inter-core communication code only runs in kernel mode. Move it to
src/kernel/idc, where it is built into the sof_kernel library.

Add src/kernel/Kconfig for the Kconfig files of the moved directories
and source it from src/Kconfig in place of idc/Kconfig. The option
values are unchanged. Fix the relative link in the README. Only Zephyr
builds the IDC code, so the host builds are not affected.
No functional change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
AGENTS.md, the user-space README and the audio README list the
kernel-only directories by name and still name src/init and src/idc,
which are now under src/kernel. List src/kernel, note that it is built
into the sof_kernel library, and keep the directories that have not
moved there yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@intel-sofci

Copy link
Copy Markdown

PR 11398: test results

Run date: 2026-11-04 17:51 UTC

Tested commit: 70ae5693af1b1953d53ce861bbe693aa7f53b77a

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

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.

5 participants