From 3c9b09e6a3ebf546e93785eb37d0df973e8bdfdc Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Tue, 17 Nov 2026 19:47:15 +0000 Subject: [PATCH 1/4] iadk: include rtos/userspace_data.h instead of rtos/userspace_helper.h The IADK system agent, KPB service and timestamping service only use the APP_TASK_DATA partition marker, which rtos/userspace_data.h defines. rtos/userspace_helper.h is the kernel-only header for the memory domain and stack helpers, and includes rtos/userspace_data.h. Include only what these sources use. No functional change. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Liam Girdwood --- src/audio/module_adapter/iadk/kpb_service.cpp | 2 +- src/audio/module_adapter/iadk/system_agent.cpp | 2 +- src/audio/module_adapter/iadk/timestamping_service_provider.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/audio/module_adapter/iadk/kpb_service.cpp b/src/audio/module_adapter/iadk/kpb_service.cpp index 6893aa511b1c..75adcf7e9451 100644 --- a/src/audio/module_adapter/iadk/kpb_service.cpp +++ b/src/audio/module_adapter/iadk/kpb_service.cpp @@ -2,7 +2,7 @@ // // Copyright 2026 Intel Corporation. All rights reserved. -#include +#include #include #include #include diff --git a/src/audio/module_adapter/iadk/system_agent.cpp b/src/audio/module_adapter/iadk/system_agent.cpp index 74c02400cb4f..43612986b424 100644 --- a/src/audio/module_adapter/iadk/system_agent.cpp +++ b/src/audio/module_adapter/iadk/system_agent.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/audio/module_adapter/iadk/timestamping_service_provider.cpp b/src/audio/module_adapter/iadk/timestamping_service_provider.cpp index 0c6edb82165b..e6d249d0d96f 100644 --- a/src/audio/module_adapter/iadk/timestamping_service_provider.cpp +++ b/src/audio/module_adapter/iadk/timestamping_service_provider.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include From 11236f7cbd854ac738df716c31a368d2dd3d60b0 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Tue, 17 Nov 2026 19:47:15 +0000 Subject: [PATCH 2/4] rtos: wait: do not include rtos/timer.h rtos/wait.h uses nothing from rtos/timer.h: its delays use Zephyr's k_busy_wait(). Drop the include, which brought the platform timestamp and cycle counter header into the user-space sources that use the delays. zephyr/wrapper.c used the cycle counter through this header, so it includes rtos/timer.h. No functional change. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Liam Girdwood --- zephyr/include/rtos/wait.h | 1 - zephyr/wrapper.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/include/rtos/wait.h b/zephyr/include/rtos/wait.h index 4741e0c9aa8c..2a8bd2086c27 100644 --- a/zephyr/include/rtos/wait.h +++ b/zephyr/include/rtos/wait.h @@ -12,7 +12,6 @@ #include #include #include -#include static inline void wait_delay_us(uint64_t us) { diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index d866c7305824..7dcac306cb60 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #if CONFIG_IPC_MAJOR_4 From 49e469a43ceeefce15026ff55f13af7537d78d8e Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Tue, 17 Nov 2026 19:47:15 +0000 Subject: [PATCH 3/4] platform: intel: ace: move the status logger interface to src/platform sof/auth_api_iface.h, which sof/lib_manager.h includes, uses the status logger callback types of auth/intel_status_logger_iface.h. So the user-space sources that include the library manager header, the IPC4 user-space handler and the native system service, got a header from the kernel platform directory. It only defines callback types. Move it to src/platform, and include it by its include name in intel_status_logger_api.h, which included it by a path relative to the old directory. No functional change. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Liam Girdwood --- .../platform/intel/ace/include/auth/intel_status_logger_api.h | 2 +- src/platform/README.md | 4 +++- .../intel/ace/include/auth/intel_status_logger_iface.h | 0 3 files changed, 4 insertions(+), 2 deletions(-) rename src/{kernel => }/platform/intel/ace/include/auth/intel_status_logger_iface.h (100%) diff --git a/src/kernel/platform/intel/ace/include/auth/intel_status_logger_api.h b/src/kernel/platform/intel/ace/include/auth/intel_status_logger_api.h index eca4162219da..db23a13ea336 100644 --- a/src/kernel/platform/intel/ace/include/auth/intel_status_logger_api.h +++ b/src/kernel/platform/intel/ace/include/auth/intel_status_logger_api.h @@ -9,7 +9,7 @@ #define INTEL_STATUS_LOGGER_API #include "stdint.h" -#include "intel_status_logger_iface.h" +#include inline void sts_log_init(struct status_logger_ctx *ctx) { diff --git a/src/platform/README.md b/src/platform/README.md index 0edad3e9eca8..6f2dd0d4c9dc 100644 --- a/src/platform/README.md +++ b/src/platform/README.md @@ -8,7 +8,7 @@ This directory holds the parts of the platform headers that user-space code may has the same layout as `src/kernel/platform`, and both are on the include path, so the headers keep their include names. -Today it has the mailbox: +Today it has the mailbox and the ACE status logger interface: - `platform/lib/mailbox.h`, and for Intel `ace/lib/mailbox.h` and `cavs/lib/mailbox.h`: the mailbox window addresses and the software register accessors, used through @@ -17,5 +17,7 @@ Today it has the mailbox: `user_access_to_mailbox()`. - `platform/lib/mailbox_layout.h`: the layout of the host memory windows. The platform memory map in `src/kernel/platform`, which user-space code must not include, includes it. +- `auth/intel_status_logger_iface.h` (ACE): the status logger callback types, which the + authentication API structures in `sof/auth_api_iface.h` use. The AMD and MediaTek mailbox headers are still in `src/kernel/platform`. diff --git a/src/kernel/platform/intel/ace/include/auth/intel_status_logger_iface.h b/src/platform/intel/ace/include/auth/intel_status_logger_iface.h similarity index 100% rename from src/kernel/platform/intel/ace/include/auth/intel_status_logger_iface.h rename to src/platform/intel/ace/include/auth/intel_status_logger_iface.h From d68123002cd0d2171a43bd8132a02388cadc8502 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Tue, 17 Nov 2026 19:47:31 +0000 Subject: [PATCH 4/4] scripts: kernel_user_partition: drop clean sources from the baseline Six sources no longer include kernel-only headers in any configuration: the three IADK service sources, the native system service, the IPC4 user-space handler and the detect test sample. Remove them from the leak baseline. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Liam Girdwood --- scripts/kernel_user_partition.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/kernel_user_partition.txt b/scripts/kernel_user_partition.txt index 94315f02ea51..57f6eef51e75 100644 --- a/scripts/kernel_user_partition.txt +++ b/scripts/kernel_user_partition.txt @@ -74,10 +74,6 @@ src/audio/component.c src/audio/copier/copier.c src/audio/dai-zephyr.c src/audio/kpb.c -src/audio/module_adapter/iadk/kpb_service.cpp -src/audio/module_adapter/iadk/system_agent.cpp -src/audio/module_adapter/iadk/timestamping_service_provider.cpp -src/audio/module_adapter/library/native_system_service.c src/audio/pipeline/pipeline-graph.c src/audio/pipeline/pipeline-schedule.c src/audio/pipeline/pipeline-stream.c @@ -85,10 +81,8 @@ src/audio/pipeline/pipeline-xrun.c src/debug/tester/tester_simple_dram_test.c src/ipc/ipc-helper.c src/ipc/ipc4/dai.c -src/ipc/ipc4/handler-user.c src/ipc/ipc4/helper.c src/lib/notifier.c -src/samples/audio/detect_test.c src/schedule/zephyr_domain.c src/schedule/zephyr_dp_schedule.c src/schedule/zephyr_ll.c