Repository navigation
Conversation
Since commit c1e037a ("trace: do not include the platform trace header from sof/trace/trace.h") nothing includes platform/trace/trace.h, and nothing calls the platform_trace_point() hook it provided. Remove the header from every platform, and the cAVS trace header that the Tiger Lake one included. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Only the host build includes platform/drivers/idc.h, from posix/include/rtos/idc.h, and it uses the copy in the library platform. The Zephyr rtos/idc.h does not include it, so the AMD, i.MX and posix copies are never used. Remove them. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Only the host build includes platform/lib/cpu.h and platform/lib/pm_runtime.h, from the posix/include wrappers, and it uses the copies in the library platform. The Zephyr builds include neither header, so the AMD, i.MX, MediaTek and posix copies are never used. Remove them. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Nothing includes these headers: - cavs/drivers/mn.h and cavs/drivers/timestamp.h: register definitions that can only be included from platform/drivers/mn.h and platform/drivers/timestamp.h, which no platform has any more; - cavs/ext_manifest.h: the cAVS configuration extended manifest element, which the firmware no longer emits; - cavs/lib/power_down.h and cavs/mem_window.h: prototypes of functions that SOF does not define (Zephyr owns the cAVS power down and the memory windows); - auth/intel_status_logger_api.h: inline wrappers around the status logger callbacks, which nothing calls. Remove them. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The i.MX8, i.MX8M and i.MX8ULP platforms have copies of the Xtensa core configuration headers in include/arch/xtensa/config/, and ACP 7.x has a copy of xtensa/tie/xt_datacache.h in include/arch/. None of these platforms adds include/arch to the include path, so the copies are never used: the core configuration comes from hal_xtensa. Remove them. The ACP 6.0 and ACP 7.0 copies are kept: those platforms add include/arch to the include path, so their copies replace the toolchain headers. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
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 60 platform headers that no build includes (6,828 lines). This is the first part of the platform header cleanup in #11517 step 1 ("Remove dead code"). Later parts remove the unused macros in the headers that are still included.
Patches
platform: remove the unused platform trace headers. Since c1e037a nothing includesplatform/trace/trace.hand nothing callsplatform_trace_point(). Removes the header from all 15 platforms, pluscavs/trace/trace.h.platform: remove the unused IDC headers. Only the host build includesplatform/drivers/idc.h, fromposix/include/rtos/idc.h, and it uses thelibrarycopy. The Zephyrrtos/idc.hdoes not include it. Removes the AMD, i.MX and posix copies.platform: remove the unused CPU and PM runtime headers. Same situation forplatform/lib/cpu.handplatform/lib/pm_runtime.h: only theposix/includewrappers include them, and they resolve to thelibrarycopies. Removes the AMD, i.MX, MediaTek and posix copies.platform: intel: remove unused cAVS and ACE headers.cavs/drivers/mn.handcavs/drivers/timestamp.h: they can only be included fromplatform/drivers/*.hfiles that no longer exist.cavs/ext_manifest.h.cavs/lib/power_down.handcavs/mem_window.h: prototypes of functions that SOF does not define, because Zephyr owns them.auth/intel_status_logger_api.h.platform: remove Xtensa core headers that are not on any include path.include/arch/xtensa/config/*. These platforms don't addinclude/archto the include path; the core configuration comes fromhal_xtensa.xt_datacache.h, which is not on the include path either.include/archto the include path, so their copies replace the toolchain andhal_xtensaheaders that Zephyr includes.How the files were found
zephyr/CMakeLists.txt, plus the host library, testbench and ztest include paths.ninja -t deps) of every configuration listed below at the base commit: none of the 60 files is a dependency of any build.Functional change
None.
Testing
Run on 90fe874 (current main) and at the tip.
Firmware builds, each from scratch at both base and tip:
os_linux_overlay.conf;llext_relocatable.conf, PTL and TGL withdebug_stream_overlay.conf.All pass.
Objects: 10,776 objects, LLEXT modules and ELF files hashed in each build. The only ones that differ are those that embed the source hash or git version:
init.c,ext_manifest.c, eachplatform.c, and the final images.Dependencies: the set of SOF headers the builds depend on is unchanged.
Platforms that already fail on main:
ninja -k 0error sets are unchanged.Cadence xt-clang (RI-2022.10): MTL, PTL and NVL compile.
Host: the host library, the cmocka unit tests for all defconfigs, the testbench and the tools pass (testbench and tools in the SOF CI docker image).
ZTest: 23 of 23 pass, run as in CI.
check_kernel_includes.py --sources --strict: passes.Documentation: builds with no warnings at every commit.
🤖 Generated with Claude Code