Repository navigation
Phase 1: stop user-facing headers pulling in kernel-only headers #11330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
74fae84
trace: do not include the platform trace header from sof/trace/trace.h
lrgirdwo 03f6411
lib: perf_cnt: move struct perf_cnt_data to its own header
lrgirdwo 2cb844b
rtos: split the user data placement macros out of userspace_helper.h
lrgirdwo c8de082
audio: component: drop kernel-only includes from component.h
lrgirdwo 9df6dd3
audio: pipeline: do not include the mailbox header from pipeline.h
lrgirdwo 19a40c2
ipc: topology: drop unused platform and memory includes
lrgirdwo 72bfb5f
audio: audio_stream: move audio_stream_sync_to_hw() to its own header
lrgirdwo 9ab9313
audio: component: do not include the DAI and scheduler headers
lrgirdwo 3c7620c
audio: remove unused kernel-only includes from audio and IPC code
lrgirdwo 5a7b58a
scripts: kernel_user_partition: allow module registration
lrgirdwo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2026 Intel Corporation. | ||
| */ | ||
|
|
||
| /** | ||
| * \file posix/include/rtos/userspace_data.h | ||
| * \brief Placement of data that user-space threads must be able to access. | ||
| * | ||
| * Only the memory partition placement attributes, so that user-space code | ||
| * can use them without the kernel memory domain helpers in | ||
| * rtos/userspace_helper.h. | ||
| */ | ||
| #ifndef __POSIX_RTOS_USERSPACE_DATA_H__ | ||
| #define __POSIX_RTOS_USERSPACE_DATA_H__ | ||
|
|
||
| #define APP_TASK_BSS | ||
| #define APP_TASK_DATA | ||
| #define APP_SYSUSER_BSS | ||
| #define APP_SYSUSER_DATA | ||
|
|
||
| #endif /* __POSIX_RTOS_USERSPACE_DATA_H__ */ |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2020 - 2023 Intel Corporation. All rights reserved. | ||
| */ | ||
|
|
||
| /** | ||
| * \file include/sof/audio/audio_stream_hw.h | ||
| * \brief Synchronisation of an audio stream with the state of its DMA buffer | ||
| * | ||
| * Kept separate from sof/audio/audio_stream.h because it needs the Zephyr | ||
| * DMA driver definitions, which most users of the audio stream API do not. | ||
| * Only available in Zephyr builds. | ||
| */ | ||
|
|
||
| #ifndef __SOF_AUDIO_AUDIO_STREAM_HW_H__ | ||
| #define __SOF_AUDIO_AUDIO_STREAM_HW_H__ | ||
|
|
||
| #include <sof/audio/audio_stream.h> | ||
| #include <stdint.h> | ||
|
|
||
| #ifdef __ZEPHYR__ | ||
|
|
||
| #include <zephyr/drivers/dma.h> | ||
|
|
||
| /** | ||
| * Replicates the hardware state of the DMA buffer as a struct audio_stream. | ||
| * @param stream Stream to update. | ||
| * @param dma_status DMA buffer hardware state (struct dma_status from Zephyr). | ||
| */ | ||
| static inline void audio_stream_sync_to_hw(struct audio_stream *stream, | ||
| const struct dma_status *dma_status) | ||
| { | ||
| uintptr_t buf_start = (uintptr_t)audio_stream_get_addr(stream); | ||
|
|
||
| /* Note: It is assumed here that dma_status values are reported as bytes. However, | ||
| * this is actually platform-specific. Although unlikely, they could be, for example, | ||
| * words on some particular platform, and changes should be made here to address | ||
| * such case. | ||
| */ | ||
|
|
||
| assert(dma_status->write_position < audio_stream_get_size(stream)); | ||
| assert(dma_status->read_position < audio_stream_get_size(stream)); | ||
| assert(dma_status->pending_length <= audio_stream_get_size(stream)); | ||
| assert(dma_status->free <= audio_stream_get_size(stream)); | ||
|
|
||
| audio_stream_set_wptr(stream, (void *)(buf_start + dma_status->write_position)); | ||
| audio_stream_set_rptr(stream, (void *)(buf_start + dma_status->read_position)); | ||
| audio_stream_set_avail(stream, dma_status->pending_length); | ||
| audio_stream_set_free(stream, dma_status->free); | ||
| } | ||
|
|
||
| #endif /* __ZEPHYR__ */ | ||
|
|
||
| #endif /* __SOF_AUDIO_AUDIO_STREAM_HW_H__ */ | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.