Skip to content

ipc4: helper: fix buffer core assignment for cross-core binds - #11048

Merged
lgirdwood merged 1 commit into
thesofproject:mainfrom
serhiy-katsyuba-intel:create_buf_fix
Jul 30, 2026
Merged

ipc4: helper: fix buffer core assignment for cross-core binds#11048
lgirdwood merged 1 commit into
thesofproject:mainfrom
serhiy-katsyuba-intel:create_buf_fix

Conversation

@serhiy-katsyuba-intel

Copy link
Copy Markdown
Contributor

This fixes a regression introduced by
bde2726 ("ipc4: add user-space command-forwarding context") which replaced

ipc_buf.comp.core = cpu_get_id();

with

ipc_buf.comp.core = src->ipc_config.core;

The replacement was needed to prepare the function to be called from user space, where cpu_get_id() is privileged.

However, it broke the cross-core bind case: such a bind is always processed on the primary core, so the two expressions are not equivalent there.

This fixes a regression introduced by
bde2726 ("ipc4: add user-space command-forwarding context")
which replaced

    ipc_buf.comp.core = cpu_get_id();

with

    ipc_buf.comp.core = src->ipc_config.core;

The replacement was needed to prepare the function to be called from
user space, where cpu_get_id() is privileged.

However, it broke the cross-core bind case: such a bind is always
processed on the primary core, so the two expressions are not
equivalent there.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>

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.

Pull request overview

Fixes an IPC4 regression affecting cross-core binds by restoring correct buffer core assignment while keeping the helper safe for potential user-space invocation (i.e., avoiding privileged cpu_get_id() in the assignment logic).

Changes:

  • Assign the created buffer’s comp.core to PLATFORM_PRIMARY_CORE_ID for cross-core binds (processed on the primary core), otherwise to src->ipc_config.core.
  • Update/assert the core expectation based on the computed buffer core and document the same-core vs cross-core execution behavior.

@lgirdwood
lgirdwood merged commit 6589967 into thesofproject:main Jul 30, 2026
45 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.

4 participants