diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index fefa263e04a5..62251271221c 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -38,3 +38,14 @@ jobs: run: yamllint -f parsable -d "$yamllint_config" --strict .github/workflows/*.yml *.yml + + kernel-includes: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + filter: 'tree:0' + + - name: no kernel-only headers in user-space code + # see scripts/check_kernel_includes.py + run: python3 scripts/check_kernel_includes.py --sources --strict diff --git a/CMakeLists.txt b/CMakeLists.txt index 1af14e4b4089..225a8fc35bcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,9 @@ add_library(sof_options INTERFACE) target_link_libraries(sof_options INTERFACE sof_public_headers) +# kernel-only headers, included as , not part of the public headers +target_include_directories(sof_options INTERFACE ${PROJECT_SOURCE_DIR}/src/kernel/include) + if(BUILD_COUNTERS) target_compile_definitions(sof_options INTERFACE BLD_COUNTERS=1) else() diff --git a/CODEOWNERS b/CODEOWNERS index 551110534d13..810c969b2977 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -10,7 +10,6 @@ # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners # include files -src/include/sof/drivers/dmic.h @singalsu src/include/ipc/** @thesofproject/steering-committee src/include/ipc/** @randerwang @tmleman @pblaszko src/include/ipc4/** @randerwang @tmleman @pblaszko @@ -22,8 +21,8 @@ src/include/sof/audio/mux.h @fkwasowi src/include/sof/audio/up_down_mixer/* @abonislawski src/include/sof/audio/codec_adapter/* @cujomalainey @abonislawski @dbaluta src/include/sof/audio/module_adapter/* @ranj063 @jxstelter -src/include/sof/drivers/acp_dai_dma.h @bhiregoudar @sunilkumardommati -src/include/sof/drivers/afe* @yaochunhung +src/kernel/include/sof/kernel/drivers/acp_dai_dma.h @bhiregoudar @sunilkumardommati +src/kernel/include/sof/kernel/drivers/afe* @yaochunhung # audio component src/audio/src* @singalsu @abonislawski diff --git a/doc/mainpage.dox b/doc/mainpage.dox index 7352ec16ae61..63525d89fb73 100644 --- a/doc/mainpage.dox +++ b/doc/mainpage.dox @@ -167,8 +167,8 @@ * * - @ref zephyr/include/rtos/alloc.h "rtos/alloc.h"
* - @ref src/include/sof/lib/vregion.h "sof/lib/vregion.h"
- * - @ref zephyr/include/sof/lib/regions_mm.h "sof/lib/regions_mm.h"
- * - @ref zephyr/include/sof/lib/vpage.h "sof/lib/vpage.h"
+ * - @ref src/kernel/include/sof/kernel/lib/regions_mm.h "sof/kernel/lib/regions_mm.h"
+ * - @ref src/kernel/include/sof/kernel/lib/vpage.h "sof/kernel/lib/vpage.h"
* - @ref src/include/sof/lib/fast-get.h "sof/lib/fast-get.h"
* - @ref zephyr/include/sof/lib/memory.h "sof/lib/memory.h" * @@ -232,7 +232,7 @@ * - @ref zephyr/include/sof/lib/dai.h "sof/lib/dai.h"
* - @ref zephyr/include/sof/lib/dma.h "sof/lib/dma.h"
* - @ref zephyr/include/sof/lib/pm_runtime.h "pm_runtime.h"
- * - @ref src/include/sof/platform.h "sof/platform.h" + * - @ref src/kernel/include/sof/kernel/platform.h "sof/kernel/platform.h" * * * Low-level peripheral drivers: Digital Audio Interfaces (I2S/SSP, SoundWire, DMIC/PDM, HDA), diff --git a/posix/include/rtos/timer.h b/posix/include/rtos/timer.h index b9756b66c87c..9087cde5c438 100644 --- a/posix/include/rtos/timer.h +++ b/posix/include/rtos/timer.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include struct comp_dev; diff --git a/scripts/check_kernel_includes.py b/scripts/check_kernel_includes.py index d4e9a639043e..2945119d7c92 100755 --- a/scripts/check_kernel_includes.py +++ b/scripts/check_kernel_includes.py @@ -24,13 +24,20 @@ checked builds are reported, so that they can be dropped from the list once they are clean in every configuration. +With --sources it checks the source tree instead of build directories: +kernel-only headers in src/kernel/include are included as +, and no user-space source or header may include one. +This covers code that no checked build compiles, and has no baseline. + Usage: check_kernel_includes.py [--strict] [--summary] [...] + check_kernel_includes.py --sources [--strict] """ import argparse import fnmatch import os +import re import subprocess import sys from collections import defaultdict @@ -122,9 +129,50 @@ def check_build(build_dir, manifest, sof_root, zephyr_base): return leaks, built +KERNEL_INCLUDE = re.compile(r'^\s*#\s*include\s*[<"](sof/kernel/[^>"]+)[>"]', re.M) + + +def source_files(sof_root): + """Return the files of the SOF source tree, relative to it.""" + try: + out = subprocess.run(['git', '-C', sof_root, 'ls-files'], + check=True, capture_output=True, text=True).stdout + return out.split() + except (OSError, subprocess.CalledProcessError): + files = [] + for top, _, names in os.walk(sof_root): + files += [os.path.relpath(os.path.join(top, n), sof_root) for n in names] + return files + + +def check_sources(manifest, sof_root): + """Return {user-space file: [kernel header includes]} from the source tree.""" + user_src = manifest['user-sources'] + not_user = manifest['not-user-sources'] + user_hdr = manifest['user-headers'] + kernel_hdr = manifest['kernel-headers'] + + found = {} + for rel in source_files(sof_root): + if rel.endswith(SOURCE_EXTS): + if not matches(rel, user_src) or matches(rel, not_user): + continue + elif not (rel.endswith('.h') and matches(rel, user_hdr)) or \ + matches(rel, kernel_hdr): + continue + path = os.path.join(sof_root, rel) + if not os.path.isfile(path): + continue + with open(path, encoding='utf-8', errors='replace') as f: + incs = KERNEL_INCLUDE.findall(f.read()) + if incs: + found[rel] = incs + return found + + def main(): parser = argparse.ArgumentParser(description=__doc__.split('\n', 1)[0]) - parser.add_argument('build_dirs', nargs='+', metavar='build-dir') + parser.add_argument('build_dirs', nargs='*', metavar='build-dir') parser.add_argument('--manifest', default=DEFAULT_MANIFEST) parser.add_argument('--sof-root', default=SOF_ROOT, help='SOF source directory the build directories were built from') @@ -135,9 +183,23 @@ def main(): 'includes a kernel-only header') parser.add_argument('--summary', action='store_true', help='only print per-header counts, not every source file') + parser.add_argument('--sources', action='store_true', + help='check the source tree for includes from ' + 'user-space code instead of build directories') args = parser.parse_args() manifest = parse_manifest(args.manifest) + + if args.sources: + found = check_sources(manifest, args.sof_root) + for src in sorted(found): + print(f'{src}:') + for inc in found[src]: + print(f'\t{inc}') + print(f'{len(found)} user-space files include headers from src/kernel/include') + return 1 if args.strict and found else 0 + if not args.build_dirs: + parser.error('build directories or --sources are required') zephyr_base = args.zephyr_base if os.path.isdir(args.zephyr_base) else None leaks = defaultdict(set) diff --git a/scripts/kernel_user_partition.txt b/scripts/kernel_user_partition.txt index 57f6eef51e75..a037aba99d76 100644 --- a/scripts/kernel_user_partition.txt +++ b/scripts/kernel_user_partition.txt @@ -19,11 +19,23 @@ [user-sources] src/* -# Kernel sources inside src/: src/kernel/ and the legacy drivers. +# Kernel sources inside src/: src/kernel/, and the legacy drivers and LL +# scheduling domains, which go with the legacy drivers. [not-user-sources] src/kernel/* src/audio/dai-legacy.c src/audio/host-legacy.c +src/schedule/dma_multi_chan_domain.c +src/schedule/dma_single_chan_domain.c +src/schedule/ll_schedule_xtos.c +src/schedule/zephyr_dma_domain.c + +# Headers that user-space code includes, checked with --sources: they must +# not include headers from src/kernel/include. The [kernel-headers] below +# are excluded. +[user-headers] +src/include/* +src/platform/* # SOF headers that only kernel code may include. # Not listed on purpose: rtos/init.h, which only provides the @@ -32,10 +44,7 @@ src/audio/host-legacy.c # LL and IPC threads, and their layout is in the user-space platform # headers in src/platform. [kernel-headers] -src/include/sof/drivers/* -src/include/sof/platform.h -src/include/sof/llext_manager.h -src/include/sof/ipc/driver.h +src/kernel/include/* src/include/sof/lib/agent.h src/include/sof/lib/cpu-clk-manager.h src/include/sof/lib/perf_cnt.h @@ -52,8 +61,6 @@ zephyr/include/sof/lib/io.h zephyr/include/sof/lib/memory.h zephyr/include/sof/lib/mm_heap.h zephyr/include/sof/lib/pm_runtime.h -zephyr/include/sof/lib/regions_mm.h -zephyr/include/sof/lib/vpage.h # Zephyr headers that only kernel code may include: kernel internals and # driver APIs that are not system calls. diff --git a/src/debug/panic.c b/src/debug/panic.c deleted file mode 100644 index 7f163905ee83..000000000000 --- a/src/debug/panic.c +++ /dev/null @@ -1,150 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright(c) 2018 Intel Corporation. All rights reserved. -// -// Author: Liam Girdwood - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -void dump_panicinfo(void *addr, struct sof_ipc_panic_info *panic_info) -{ - int ret; - - if (!panic_info) - return; - ret = memcpy_s(addr, sizeof(struct sof_ipc_panic_info), panic_info, - sizeof(struct sof_ipc_panic_info)); - /* TODO are asserts even safe in this context? */ - assert(!ret); - dcache_writeback_region(addr, sizeof(struct sof_ipc_panic_info)); -} - -/** Dumps stack as part of panic. - * - * \return SOF_IPC_PANIC_STACK if offset is off the stack_limit, - * unchanged 'p' panic code input otherwise. - */ -static uint32_t dump_stack(uint32_t p, void *addr, size_t offset, - size_t limit, uintptr_t *stack_ptr) -{ - uintptr_t stack_limit = (uintptr_t)arch_get_stack_entry(); - uintptr_t stack_bottom = stack_limit + arch_get_stack_size() - - sizeof(void *); - uintptr_t stack_top = (uintptr_t)arch_get_stack_ptr() + offset; - size_t size = stack_bottom - stack_top; - int ret; - - *stack_ptr = stack_top; - - /* is stack smashed ? */ - if (stack_top - offset <= stack_limit) { - p = SOF_IPC_PANIC_STACK; - return p; - } - - /* make sure stack size won't overflow dump area */ - if (size > limit) - size = limit; - - /* copy stack contents and writeback */ - ret = memcpy_s(addr, limit, (void *)stack_top, size - sizeof(void *)); - assert(!ret); - dcache_writeback_region(addr, size - sizeof(void *)); - - return p; -} - -/** Copy registers, panic_info and current stack to mailbox exception - * window. Opaque 'data' (e.g.: optional epc1) is passed to - * arch_dump_regs(). - */ -void panic_dump(uint32_t p, struct sof_ipc_panic_info *panic_info, - uintptr_t *data) -{ - char *ext_offset; - size_t avail; - uintptr_t stack_ptr; - - /* disable all IRQs */ - interrupt_global_disable(); - - /* ARCH_OOPS_SIZE is platform-dependent */ - ext_offset = (char *)mailbox_get_exception_base() + ARCH_OOPS_SIZE; - - /* dump panic info, filename and linenum */ - dump_panicinfo(ext_offset, panic_info); - ext_offset += sizeof(struct sof_ipc_panic_info); - - /* Dump stack frames and override panic code 'p' if ext_offset is - * off stack_limit. Find stack_ptr. - */ - avail = MAILBOX_EXCEPTION_SIZE - - (size_t)(ext_offset - (char *)mailbox_get_exception_base()); - p = dump_stack(p, ext_offset, 0, avail, &stack_ptr); - - /* Write oops.arch_hdr and oops.plat_hdr headers and dump DSP core - * registers. After arch_dump_regs() use only inline funcs if - * needed. - */ - arch_dump_regs((void *)mailbox_get_exception_base(), stack_ptr, data); - - /* panic - send IPC oops message to host */ - platform_panic(p); - - /* and loop forever */ - while (1) - ; -} - -void __panic(uint32_t panic_code, const char *filename, uint32_t linenum) -{ - struct sof_ipc_panic_info panicinfo = { .linenum = linenum }; - const unsigned int length_max = sizeof(panicinfo.filename); - int mem_len; - int ret; - - /* including the ending '\0' */ - mem_len = rstrlen(filename) + 1; - - if (mem_len > length_max) { - /* copy those last bytes only */ - ret = memcpy_s(panicinfo.filename, - length_max, - filename + mem_len - length_max, - length_max); - /* TODO are asserts safe in this context? */ - assert(!ret); - - /* prefixing with "..." */ - ret = memcpy_s(panicinfo.filename, length_max, "...", 3); - assert(!ret); - } else { - ret = memcpy_s(panicinfo.filename, length_max, filename, mem_len); - assert(!ret); - } - - /* To distinguish regular panic() calls from exceptions, we will - * set a reserved value for the exception cause (63) so the - * coredumper tool could distinguish between the situations. - */ -#if !__clang_analyzer__ - __asm__ __volatile__("movi a3, 63\n\t" - "wsr.exccause a3\n\t" - "esync" : : : - "a3", "memory"); -#endif - - panic_dump(panic_code, &panicinfo, NULL); -} diff --git a/src/include/sof/drivers/dmic.h b/src/include/sof/drivers/dmic.h deleted file mode 100644 index 154fd99351af..000000000000 --- a/src/include/sof/drivers/dmic.h +++ /dev/null @@ -1,562 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2017 Intel Corporation. All rights reserved. - * - * Author: Seppo Ingalsuo - */ - -#ifndef __SOF_DRIVERS_DMIC_H__ -#define __SOF_DRIVERS_DMIC_H__ - -#if CONFIG_INTEL_DMIC - -/* Let find up to 50 mode candidates to choose from */ -#define DMIC_MAX_MODES 50 - -/* Minimum OSR is always applied for 48 kHz and less sample rates */ -#define DMIC_MIN_OSR 50 - -/* These are used as guideline for configuring > 48 kHz sample rates. The - * minimum OSR can be relaxed down to 40 (use 3.84 MHz clock for 96 kHz). - */ -#define DMIC_HIGH_RATE_MIN_FS 64000 -#define DMIC_HIGH_RATE_OSR_MIN 40 - -/* HW FIR pipeline needs 5 additional cycles per channel for internal - * operations. This is used in MAX filter length check. - */ -#define DMIC_FIR_PIPELINE_OVERHEAD 5 - -/* The microphones create a low frequecy thump sound when clock is enabled. - * The unmute linear gain ramp chacteristic is defined here. - * NOTE: Do not set any of these to 0. - */ -#define DMIC_UNMUTE_RAMP_US 1000 /* 1 ms (in microseconds) */ -#define DMIC_UNMUTE_CIC 1 /* Unmute CIC at 1 ms */ -#define DMIC_UNMUTE_FIR 2 /* Unmute FIR at 2 ms */ - -#if CONFIG_TIGERLAKE -#define DMIC_HW_VERSION 1 -#define DMIC_HW_CONTROLLERS 2 -#define DMIC_HW_FIFOS 2 -#endif - -/* For NHLT DMIC configuration parsing */ -#define DMIC_HW_CONTROLLERS_MAX 4 -#define DMIC_HW_FIFOS_MAX 2 - -#endif - -#if DMIC_HW_VERSION - -#include -#include -#include -#include -#include -#include - -/* Parameters used in modes computation */ -#define DMIC_HW_BITS_CIC 26 -#define DMIC_HW_BITS_FIR_COEF 20 -#define DMIC_HW_BITS_FIR_GAIN 20 -#define DMIC_HW_BITS_FIR_INPUT 22 -#define DMIC_HW_BITS_FIR_OUTPUT 24 -#define DMIC_HW_BITS_FIR_INTERNAL 26 -#define DMIC_HW_BITS_GAIN_OUTPUT 22 -#define DMIC_HW_FIR_LENGTH_MAX 250 -#define DMIC_HW_CIC_SHIFT_MIN -8 -#define DMIC_HW_CIC_SHIFT_MAX 4 -#define DMIC_HW_FIR_SHIFT_MIN 0 -#define DMIC_HW_FIR_SHIFT_MAX 8 -#define DMIC_HW_CIC_DECIM_MIN 5 -#define DMIC_HW_CIC_DECIM_MAX 31 /* Note: Limited by BITS_CIC */ -#define DMIC_HW_FIR_DECIM_MIN 2 -#define DMIC_HW_FIR_DECIM_MAX 20 /* Note: Practical upper limit */ -#define DMIC_HW_SENS_Q28 Q_CONVERT_FLOAT(1.0, 28) /* Q1.28 */ -#define DMIC_HW_PDM_CLK_MIN 100000 /* Note: Practical min value */ -#define DMIC_HW_DUTY_MIN 20 /* Note: Practical min value */ -#define DMIC_HW_DUTY_MAX 80 /* Note: Practical max value */ - -/* DMIC register offsets */ - -/* Global registers */ -#define OUTCONTROL0 0x0000 -#define OUTSTAT0 0x0004 -#define OUTDATA0 0x0008 -#define OUTCONTROL1 0x0100 -#define OUTSTAT1 0x0104 -#define OUTDATA1 0x0108 -#define PDM0 0x1000 -#define PDM0_COEFFICIENT_A 0x1400 -#define PDM0_COEFFICIENT_B 0x1800 -#define PDM1 0x2000 -#define PDM1_COEFFICIENT_A 0x2400 -#define PDM1_COEFFICIENT_B 0x2800 -#define PDM2 0x3000 -#define PDM2_COEFFICIENT_A 0x3400 -#define PDM2_COEFFICIENT_B 0x3800 -#define PDM3 0x4000 -#define PDM3_COEFFICIENT_A 0x4400 -#define PDM3_COEFFICIENT_B 0x4800 -#define PDM_COEF_RAM_A_LENGTH 0x0400 -#define PDM_COEF_RAM_B_LENGTH 0x0400 - -/* Local registers in each PDMx */ -#define CIC_CONTROL 0x000 -#define CIC_CONFIG 0x004 -#define MIC_CONTROL 0x00c -#define FIR_CONTROL_A 0x020 -#define FIR_CONFIG_A 0x024 -#define DC_OFFSET_LEFT_A 0x028 -#define DC_OFFSET_RIGHT_A 0x02c -#define OUT_GAIN_LEFT_A 0x030 -#define OUT_GAIN_RIGHT_A 0x034 -#define FIR_CONTROL_B 0x040 -#define FIR_CONFIG_B 0x044 -#define DC_OFFSET_LEFT_B 0x048 -#define DC_OFFSET_RIGHT_B 0x04c -#define OUT_GAIN_LEFT_B 0x050 -#define OUT_GAIN_RIGHT_B 0x054 - -/* Register bits */ - -/* OUTCONTROLx IPM bit fields style */ -#if DMIC_HW_VERSION == 1 || (DMIC_HW_VERSION == 2 && DMIC_HW_CONTROLLERS <= 2) -#define DMIC_IPM_VER1 -#elif DMIC_HW_VERSION == 2 && DMIC_HW_CONTROLLERS > 2 -#define DMIC_IPM_VER2 -#else -#error Not supported HW version -#endif - -#define OUTCONTROL0_BFTH_MAX 4 /* Max depth 16 */ - -#if defined DMIC_IPM_VER1 -/* OUTCONTROL0 bits */ -#define OUTCONTROL0_TIE_BIT BIT(27) -#define OUTCONTROL0_SIP_BIT BIT(26) -#define OUTCONTROL0_FINIT_BIT BIT(25) -#define OUTCONTROL0_FCI_BIT BIT(24) -#define OUTCONTROL0_TIE(x) SET_BIT(27, x) -#define OUTCONTROL0_SIP(x) SET_BIT(26, x) -#define OUTCONTROL0_FINIT(x) SET_BIT(25, x) -#define OUTCONTROL0_FCI(x) SET_BIT(24, x) -#define OUTCONTROL0_BFTH(x) SET_BITS(23, 20, x) -#define OUTCONTROL0_OF(x) SET_BITS(19, 18, x) -#define OUTCONTROL0_IPM(x) SET_BITS(17, 16, x) -#define OUTCONTROL0_TH(x) SET_BITS(5, 0, x) - -#define OUTCONTROL0_TIE_GET(x) GET_BIT(27, x) -#define OUTCONTROL0_SIP_GET(x) GET_BIT(26, x) -#define OUTCONTROL0_FINIT_GET(x) GET_BIT(25, x) -#define OUTCONTROL0_FCI_GET(x) GET_BIT(24, x) -#define OUTCONTROL0_BFTH_GET(x) GET_BITS(23, 20, x) -#define OUTCONTROL0_OF_GET(x) GET_BITS(19, 18, x) -#define OUTCONTROL0_IPM_GET(x) GET_BITS(17, 16, x) -#define OUTCONTROL0_TH_GET(x) GET_BITS(5, 0, x) - -/* OUTCONTROL1 bits */ -#define OUTCONTROL1_TIE_BIT BIT(27) -#define OUTCONTROL1_SIP_BIT BIT(26) -#define OUTCONTROL1_FINIT_BIT BIT(25) -#define OUTCONTROL1_FCI_BIT BIT(24) -#define OUTCONTROL1_TIE(x) SET_BIT(27, x) -#define OUTCONTROL1_SIP(x) SET_BIT(26, x) -#define OUTCONTROL1_FINIT(x) SET_BIT(25, x) -#define OUTCONTROL1_FCI(x) SET_BIT(24, x) -#define OUTCONTROL1_BFTH(x) SET_BITS(23, 20, x) -#define OUTCONTROL1_OF(x) SET_BITS(19, 18, x) -#define OUTCONTROL1_IPM(x) SET_BITS(17, 16, x) -#define OUTCONTROL1_TH(x) SET_BITS(5, 0, x) - -#define OUTCONTROL1_TIE_GET(x) GET_BIT(27, x) -#define OUTCONTROL1_SIP_GET(x) GET_BIT(26, x) -#define OUTCONTROL1_FINIT_GET(x) GET_BIT(25, x) -#define OUTCONTROL1_FCI_GET(x) GET_BIT(24, x) -#define OUTCONTROL1_BFTH_GET(x) GET_BITS(23, 20, x) -#define OUTCONTROL1_OF_GET(x) GET_BITS(19, 18, x) -#define OUTCONTROL1_IPM_GET(x) GET_BITS(17, 16, x) -#define OUTCONTROL1_TH_GET(x) GET_BITS(5, 0, x) -#endif - -#if defined DMIC_IPM_VER2 -/* OUTCONTROL0 bits */ -#define OUTCONTROL0_TIE_BIT BIT(27) -#define OUTCONTROL0_SIP_BIT BIT(26) -#define OUTCONTROL0_FINIT_BIT BIT(25) -#define OUTCONTROL0_FCI_BIT BIT(24) -#define OUTCONTROL0_TIE(x) SET_BIT(27, x) -#define OUTCONTROL0_SIP(x) SET_BIT(26, x) -#define OUTCONTROL0_FINIT(x) SET_BIT(25, x) -#define OUTCONTROL0_FCI(x) SET_BIT(24, x) -#define OUTCONTROL0_BFTH(x) SET_BITS(23, 20, x) -#define OUTCONTROL0_OF(x) SET_BITS(19, 18, x) -#define OUTCONTROL0_IPM(x) SET_BITS(17, 15, x) -#define OUTCONTROL0_IPM_SOURCE_1(x) SET_BITS(14, 13, x) -#define OUTCONTROL0_IPM_SOURCE_2(x) SET_BITS(12, 11, x) -#define OUTCONTROL0_IPM_SOURCE_3(x) SET_BITS(10, 9, x) -#define OUTCONTROL0_IPM_SOURCE_4(x) SET_BITS(8, 7, x) -#define OUTCONTROL0_IPM_SOURCE_MODE(x) SET_BIT(6, x) -#define OUTCONTROL0_TH(x) SET_BITS(5, 0, x) -#define OUTCONTROL0_TIE_GET(x) GET_BIT(27, x) -#define OUTCONTROL0_SIP_GET(x) GET_BIT(26, x) -#define OUTCONTROL0_FINIT_GET(x) GET_BIT(25, x) -#define OUTCONTROL0_FCI_GET(x) GET_BIT(24, x) -#define OUTCONTROL0_BFTH_GET(x) GET_BITS(23, 20, x) -#define OUTCONTROL0_OF_GET(x) GET_BITS(19, 18, x) -#define OUTCONTROL0_IPM_GET(x) GET_BITS(17, 15, x) -#define OUTCONTROL0_IPM_SOURCE_1_GET(x) GET_BITS(14, 13, x) -#define OUTCONTROL0_IPM_SOURCE_2_GET(x) GET_BITS(12, 11, x) -#define OUTCONTROL0_IPM_SOURCE_3_GET(x) GET_BITS(10, 9, x) -#define OUTCONTROL0_IPM_SOURCE_4_GET(x) GET_BITS(8, 7, x) -#define OUTCONTROL0_IPM_SOURCE_MODE_GET(x) GET_BIT(6, x) -#define OUTCONTROL0_TH_GET(x) GET_BITS(5, 0, x) - -/* OUTCONTROL1 bits */ -#define OUTCONTROL1_TIE_BIT BIT(27) -#define OUTCONTROL1_SIP_BIT BIT(26) -#define OUTCONTROL1_FINIT_BIT BIT(25) -#define OUTCONTROL1_FCI_BIT BIT(24) -#define OUTCONTROL1_TIE(x) SET_BIT(27, x) -#define OUTCONTROL1_SIP(x) SET_BIT(26, x) -#define OUTCONTROL1_FINIT(x) SET_BIT(25, x) -#define OUTCONTROL1_FCI(x) SET_BIT(24, x) -#define OUTCONTROL1_BFTH(x) SET_BITS(23, 20, x) -#define OUTCONTROL1_OF(x) SET_BITS(19, 18, x) -#define OUTCONTROL1_IPM(x) SET_BITS(17, 15, x) -#define OUTCONTROL1_IPM_SOURCE_1(x) SET_BITS(14, 13, x) -#define OUTCONTROL1_IPM_SOURCE_2(x) SET_BITS(12, 11, x) -#define OUTCONTROL1_IPM_SOURCE_3(x) SET_BITS(10, 9, x) -#define OUTCONTROL1_IPM_SOURCE_4(x) SET_BITS(8, 7, x) -#define OUTCONTROL1_IPM_SOURCE_MODE(x) SET_BIT(6, x) -#define OUTCONTROL1_TH(x) SET_BITS(5, 0, x) -#define OUTCONTROL1_TIE_GET(x) GET_BIT(27, x) -#define OUTCONTROL1_SIP_GET(x) GET_BIT(26, x) -#define OUTCONTROL1_FINIT_GET(x) GET_BIT(25, x) -#define OUTCONTROL1_FCI_GET(x) GET_BIT(24, x) -#define OUTCONTROL1_BFTH_GET(x) GET_BITS(23, 20, x) -#define OUTCONTROL1_OF_GET(x) GET_BITS(19, 18, x) -#define OUTCONTROL1_IPM_GET(x) GET_BITS(17, 15, x) -#define OUTCONTROL1_IPM_SOURCE_1_GET(x) GET_BITS(14, 13, x) -#define OUTCONTROL1_IPM_SOURCE_2_GET(x) GET_BITS(12, 11, x) -#define OUTCONTROL1_IPM_SOURCE_3_GET(x) GET_BITS(10, 9, x) -#define OUTCONTROL1_IPM_SOURCE_4_GET(x) GET_BITS(8, 7, x) -#define OUTCONTROL1_IPM_SOURCE_MODE_GET(x) GET_BIT(6, x) -#define OUTCONTROL1_TH_GET(x) GET_BITS(5, 0, x) - -#define OUTCONTROLX_IPM_NUMSOURCES 4 - -#endif - -/* OUTSTAT0 bits */ -#define OUTSTAT0_AFE_BIT BIT(31) -#define OUTSTAT0_ASNE_BIT BIT(29) -#define OUTSTAT0_RFS_BIT BIT(28) -#define OUTSTAT0_ROR_BIT BIT(27) -#define OUTSTAT0_FL_MASK MASK(6, 0) - -/* OUTSTAT1 bits */ -#define OUTSTAT1_AFE_BIT BIT(31) -#define OUTSTAT1_ASNE_BIT BIT(29) -#define OUTSTAT1_RFS_BIT BIT(28) -#define OUTSTAT1_ROR_BIT BIT(27) -#define OUTSTAT1_FL_MASK MASK(6, 0) - -/* CIC_CONTROL bits */ -#define CIC_CONTROL_SOFT_RESET_BIT BIT(16) -#define CIC_CONTROL_CIC_START_B_BIT BIT(15) -#define CIC_CONTROL_CIC_START_A_BIT BIT(14) -#define CIC_CONTROL_MIC_B_POLARITY_BIT BIT(3) -#define CIC_CONTROL_MIC_A_POLARITY_BIT BIT(2) -#define CIC_CONTROL_MIC_MUTE_BIT BIT(1) -#define CIC_CONTROL_STEREO_MODE_BIT BIT(0) - -#define CIC_CONTROL_SOFT_RESET(x) SET_BIT(16, x) -#define CIC_CONTROL_CIC_START_B(x) SET_BIT(15, x) -#define CIC_CONTROL_CIC_START_A(x) SET_BIT(14, x) -#define CIC_CONTROL_MIC_B_POLARITY(x) SET_BIT(3, x) -#define CIC_CONTROL_MIC_A_POLARITY(x) SET_BIT(2, x) -#define CIC_CONTROL_MIC_MUTE(x) SET_BIT(1, x) -#define CIC_CONTROL_STEREO_MODE(x) SET_BIT(0, x) - -#define CIC_CONTROL_SOFT_RESET_GET(x) GET_BIT(16, x) -#define CIC_CONTROL_CIC_START_B_GET(x) GET_BIT(15, x) -#define CIC_CONTROL_CIC_START_A_GET(x) GET_BIT(14, x) -#define CIC_CONTROL_MIC_B_POLARITY_GET(x) GET_BIT(3, x) -#define CIC_CONTROL_MIC_A_POLARITY_GET(x) GET_BIT(2, x) -#define CIC_CONTROL_MIC_MUTE_GET(x) GET_BIT(1, x) -#define CIC_CONTROL_STEREO_MODE_GET(x) GET_BIT(0, x) - -/* CIC_CONFIG bits */ -#define CIC_CONFIG_CIC_SHIFT(x) SET_BITS(27, 24, x) -#define CIC_CONFIG_COMB_COUNT(x) SET_BITS(15, 8, x) - -/* CIC_CONFIG masks */ -#define CIC_CONFIG_CIC_SHIFT_MASK MASK(27, 24) -#define CIC_CONFIG_COMB_COUNT_MASK MASK(15, 8) - -#define CIC_CONFIG_CIC_SHIFT_GET(x) GET_BITS(27, 24, x) -#define CIC_CONFIG_COMB_COUNT_GET(x) GET_BITS(15, 8, x) - -/* MIC_CONTROL bits */ -#define MIC_CONTROL_PDM_EN_B_BIT BIT(1) -#define MIC_CONTROL_PDM_EN_A_BIT BIT(0) -#define MIC_CONTROL_PDM_CLKDIV(x) SET_BITS(15, 8, x) -#define MIC_CONTROL_PDM_SKEW(x) SET_BITS(7, 4, x) -#define MIC_CONTROL_CLK_EDGE(x) SET_BIT(3, x) -#define MIC_CONTROL_PDM_EN_B(x) SET_BIT(1, x) -#define MIC_CONTROL_PDM_EN_A(x) SET_BIT(0, x) - -/* MIC_CONTROL masks */ -#define MIC_CONTROL_PDM_CLKDIV_MASK MASK(15, 8) - -#define MIC_CONTROL_PDM_CLKDIV_GET(x) GET_BITS(15, 8, x) -#define MIC_CONTROL_PDM_SKEW_GET(x) GET_BITS(7, 4, x) -#define MIC_CONTROL_PDM_CLK_EDGE_GET(x) GET_BIT(3, x) -#define MIC_CONTROL_PDM_EN_B_GET(x) GET_BIT(1, x) -#define MIC_CONTROL_PDM_EN_A_GET(x) GET_BIT(0, x) - -/* FIR_CONTROL_A bits */ -#define FIR_CONTROL_A_START_BIT BIT(7) -#define FIR_CONTROL_A_ARRAY_START_EN_BIT BIT(6) -#define FIR_CONTROL_A_MUTE_BIT BIT(1) -#define FIR_CONTROL_A_START(x) SET_BIT(7, x) -#define FIR_CONTROL_A_ARRAY_START_EN(x) SET_BIT(6, x) -#define FIR_CONTROL_A_DCCOMP(x) SET_BIT(4, x) -#define FIR_CONTROL_A_MUTE(x) SET_BIT(1, x) -#define FIR_CONTROL_A_STEREO(x) SET_BIT(0, x) - -#define FIR_CONTROL_A_START_GET(x) GET_BIT(7, x) -#define FIR_CONTROL_A_ARRAY_START_EN_GET(x) GET_BIT(6, x) -#define FIR_CONTROL_A_DCCOMP_GET(x) GET_BIT(4, x) -#define FIR_CONTROL_A_MUTE_GET(x) GET_BIT(1, x) -#define FIR_CONTROL_A_STEREO_GET(x) GET_BIT(0, x) - -/* FIR_CONFIG_A bits */ -#define FIR_CONFIG_A_FIR_DECIMATION(x) SET_BITS(20, 16, x) -#define FIR_CONFIG_A_FIR_SHIFT(x) SET_BITS(11, 8, x) -#define FIR_CONFIG_A_FIR_LENGTH(x) SET_BITS(7, 0, x) - -#define FIR_CONFIG_A_FIR_DECIMATION_GET(x) GET_BITS(20, 16, x) -#define FIR_CONFIG_A_FIR_SHIFT_GET(x) GET_BITS(11, 8, x) -#define FIR_CONFIG_A_FIR_LENGTH_GET(x) GET_BITS(7, 0, x) - -/* DC offset compensation time constants */ -#define DCCOMP_TC0 0 -#define DCCOMP_TC1 1 -#define DCCOMP_TC2 2 -#define DCCOMP_TC3 3 -#define DCCOMP_TC4 4 -#define DCCOMP_TC5 5 -#define DCCOMP_TC6 6 -#define DCCOMP_TC7 7 - -/* DC_OFFSET_LEFT_A bits */ -#define DC_OFFSET_LEFT_A_DC_OFFS(x) SET_BITS(21, 0, x) - -/* DC_OFFSET_RIGHT_A bits */ -#define DC_OFFSET_RIGHT_A_DC_OFFS(x) SET_BITS(21, 0, x) - -/* OUT_GAIN_LEFT_A bits */ -#define OUT_GAIN_LEFT_A_GAIN(x) SET_BITS(19, 0, x) - -/* OUT_GAIN_RIGHT_A bits */ -#define OUT_GAIN_RIGHT_A_GAIN(x) SET_BITS(19, 0, x) - -/* FIR_CONTROL_B bits */ -#define FIR_CONTROL_B_START_BIT BIT(7) -#define FIR_CONTROL_B_ARRAY_START_EN_BIT BIT(6) -#define FIR_CONTROL_B_MUTE_BIT BIT(1) -#define FIR_CONTROL_B_START(x) SET_BIT(7, x) -#define FIR_CONTROL_B_ARRAY_START_EN(x) SET_BIT(6, x) -#define FIR_CONTROL_B_DCCOMP(x) SET_BIT(4, x) -#define FIR_CONTROL_B_MUTE(x) SET_BIT(1, x) -#define FIR_CONTROL_B_STEREO(x) SET_BIT(0, x) - -#define FIR_CONTROL_B_START_GET(x) GET_BIT(7, x) -#define FIR_CONTROL_B_ARRAY_START_EN_GET(x) GET_BIT(6, x) -#define FIR_CONTROL_B_DCCOMP_GET(x) GET_BIT(4, x) -#define FIR_CONTROL_B_MUTE_GET(x) GET_BIT(1, x) -#define FIR_CONTROL_B_STEREO_GET(x) GET_BIT(0, x) - -/* FIR_CONFIG_B bits */ -#define FIR_CONFIG_B_FIR_DECIMATION(x) SET_BITS(20, 16, x) -#define FIR_CONFIG_B_FIR_SHIFT(x) SET_BITS(11, 8, x) -#define FIR_CONFIG_B_FIR_LENGTH(x) SET_BITS(7, 0, x) - -#define FIR_CONFIG_B_FIR_DECIMATION_GET(x) GET_BITS(20, 16, x) -#define FIR_CONFIG_B_FIR_SHIFT_GET(x) GET_BITS(11, 8, x) -#define FIR_CONFIG_B_FIR_LENGTH_GET(x) GET_BITS(7, 0, x) - -/* DC_OFFSET_LEFT_B bits */ -#define DC_OFFSET_LEFT_B_DC_OFFS(x) SET_BITS(21, 0, x) - -/* DC_OFFSET_RIGHT_B bits */ -#define DC_OFFSET_RIGHT_B_DC_OFFS(x) SET_BITS(21, 0, x) - -/* OUT_GAIN_LEFT_B bits */ -#define OUT_GAIN_LEFT_B_GAIN(x) SET_BITS(19, 0, x) - -/* OUT_GAIN_RIGHT_B bits */ -#define OUT_GAIN_RIGHT_B_GAIN(x) SET_BITS(19, 0, x) - -/* FIR coefficients */ -#define FIR_COEF_A(x) SET_BITS(19, 0, x) -#define FIR_COEF_B(x) SET_BITS(19, 0, x) - -/* Used for scaling FIR coefficients for HW */ -#define DMIC_HW_FIR_COEF_MAX ((1 << (DMIC_HW_BITS_FIR_COEF - 1)) - 1) -#define DMIC_HW_FIR_COEF_Q (DMIC_HW_BITS_FIR_COEF - 1) - -/* Internal precision in gains computation, e.g. Q4.28 in int32_t */ -#define DMIC_FIR_SCALE_Q 28 - -/* Used in unmute ramp values calculation */ -#define DMIC_HW_FIR_GAIN_MAX ((1 << (DMIC_HW_BITS_FIR_GAIN - 1)) - 1) - -/* Hardwired log ramp parameters. The first value is the initial gain in - * decibels. The default ramp time is provided by 1st order equation - * ramp time = coef * samplerate + offset. The default ramp is 200 ms for - * 48 kHz and 400 ms for 16 kHz. - */ -#define LOGRAMP_START_DB Q_CONVERT_FLOAT(-90, DB2LIN_FIXED_INPUT_QY) -#define LOGRAMP_TIME_COEF_Q15 -205 /* dy/dx (16000,400) (48000,200) */ -#define LOGRAMP_TIME_OFFS_Q0 500 /* Offset for line slope */ - -/* Limits for ramp time from topology */ -#define LOGRAMP_TIME_MIN_MS 10 /* Min. 10 ms */ -#define LOGRAMP_TIME_MAX_MS 1000 /* Max. 1s */ - -/* Simplify log ramp step calculation equation with this constant term */ -#define LOGRAMP_CONST_TERM ((int32_t) \ - ((int64_t)-LOGRAMP_START_DB * DMIC_UNMUTE_RAMP_US / 1000)) - -/* Fractional shift for gain update. Gain format is Q2.30. */ -#define Q_SHIFT_GAIN_X_GAIN_COEF \ - (Q_SHIFT_BITS_32(30, DB2LIN_FIXED_OUTPUT_QY, 30)) - -#define dmic_irq(dmic) dmic->plat_data.irq -#define dmic_irq_name(dmic) dmic->plat_data.irq_name - -/* Common data for all DMIC DAI instances */ -struct dmic_global_shared { - struct sof_ipc_dai_dmic_params prm[DMIC_HW_FIFOS]; /* Configuration requests */ - uint32_t active_fifos_mask; /* Bits (dai->index) are set to indicate active FIFO */ - uint32_t pause_mask; /* Bits (dai->index) are set to indicate driver pause */ -}; - -/* DMIC private data */ -struct dmic_pdata { - struct dmic_global_shared *global; /* Common data for all DMIC DAI instances */ - uint16_t enable[DMIC_HW_CONTROLLERS]; /* Mic 0 and 1 enable bits array for PDMx */ - uint32_t state; /* Driver component state */ - int32_t startcount; /* Counter that controls HW unmute */ - int32_t gain_coef; /* Gain update constant */ - int32_t gain; /* Gain value to be applied to HW */ - int32_t unmute_ramp_time_ms; /* Unmute ramp time in milliseconds */ - int irq; /* Interrupt number used */ - enum sof_ipc_frame dai_format; /* PCM format s32_le etc. */ - int dai_channels; /* Channels count */ - int dai_rate; /* Sample rate in Hz */ -}; - -struct decim_modes { - int16_t clkdiv[DMIC_MAX_MODES]; - int16_t mcic[DMIC_MAX_MODES]; - int16_t mfir[DMIC_MAX_MODES]; - int num_of_modes; -}; - -struct matched_modes { - int16_t clkdiv[DMIC_MAX_MODES]; - int16_t mcic[DMIC_MAX_MODES]; - int16_t mfir_a[DMIC_MAX_MODES]; - int16_t mfir_b[DMIC_MAX_MODES]; - int num_of_modes; -}; - -struct dmic_configuration { - struct pdm_decim *fir_a; - struct pdm_decim *fir_b; - int clkdiv; - int mcic; - int mfir_a; - int mfir_b; - int cic_shift; - int fir_a_shift; - int fir_b_shift; - int fir_a_length; - int fir_b_length; - int32_t fir_a_scale; - int32_t fir_b_scale; -}; - -struct nhlt_dmic_gateway_attributes { - uint32_t dw; -}; - -struct nhlt_dmic_ts_group { - uint32_t ts_group[4]; -}; - -struct nhlt_dmic_clock_on_delay { - uint32_t clock_on_delay; -}; - -struct nhlt_dmic_channel_ctrl_mask { - uint32_t channel_ctrl_mask; -}; - -struct nhlt_pdm_ctrl_mask { - uint32_t pdm_ctrl_mask; -}; - -struct nhlt_pdm_ctrl_cfg { - uint32_t cic_control; - uint32_t cic_config; - uint32_t reserved0; - uint32_t mic_control; - uint32_t pdm_sdw_map; - uint32_t reuse_fir_from_pdm; - uint32_t reserved1[2]; -}; - -struct nhlt_pdm_ctrl_fir_cfg { - uint32_t fir_control; - uint32_t fir_config; - int32_t dc_offset_left; - int32_t dc_offset_right; - int32_t out_gain_left; - int32_t out_gain_right; - uint32_t reserved[2]; -}; - -struct nhlt_pdm_fir_coeffs { - int32_t fir_coeffs[0]; -}; - -int dmic_set_config_computed(struct dai *dai); -int dmic_get_hw_params_computed(struct dai *dai, struct sof_ipc_stream_params *params, int dir); -int dmic_set_config_nhlt(struct dai *dai, const void *spec_config); -int dmic_get_hw_params_nhlt(struct dai *dai, struct sof_ipc_stream_params *params, int dir); - -extern const struct dai_driver dmic_driver; - -static inline int dmic_get_unmute_ramp_from_samplerate(int rate) -{ - int32_t time_ms; - - time_ms = sat_int32(Q_MULTSR_32X32((int64_t)rate, LOGRAMP_TIME_COEF_Q15, 0, 15, 0) + - LOGRAMP_TIME_OFFS_Q0); - if (time_ms > LOGRAMP_TIME_MAX_MS) - return LOGRAMP_TIME_MAX_MS; - - if (time_ms < LOGRAMP_TIME_MIN_MS) - return LOGRAMP_TIME_MIN_MS; - - return time_ms; -} - -#endif /* DMIC_HW_VERSION */ -#endif /* __SOF_DRIVERS_DMIC_H__ */ diff --git a/src/include/sof/drivers/pmc.h b/src/include/sof/drivers/pmc.h deleted file mode 100644 index dc9ea3708a33..000000000000 --- a/src/include/sof/drivers/pmc.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2019 Intel Corporation. All rights reserved. - * - * Author: Tomasz Lauda - */ - -#ifndef __SOF_DRIVERS_PMC_H__ -#define __SOF_DRIVERS_PMC_H__ - -#include - -#endif /* __SOF_DRIVERS_PMC_H__ */ diff --git a/src/kernel/README.md b/src/kernel/README.md index 4c7c01de4be0..46ed32764be3 100644 --- a/src/kernel/README.md +++ b/src/kernel/README.md @@ -23,6 +23,17 @@ Zephyr builds everything below this directory into the `sof_kernel` library inst library for this directory tree, so the CMake files of moved directories do not change. Their Kconfig files are sourced from [`Kconfig`](Kconfig). +## Headers + +Kernel-only headers are in [`include/sof/kernel`](include/sof/kernel) and are included as +``, keeping the path they had below `sof/`: `sof/platform.h` is +``. The directory is on the include path of the firmware, the host +library and the testbench, but not of LLEXT modules. Kernel-only headers that the host builds +replace with their own versions, such as the `rtos/` headers, have not moved yet. +User-space code must not include anything from here: the `codestyle` CI workflow runs +`scripts/check_kernel_includes.py --sources`, which fails when a user-space source or header +includes ``. + Code here may use kernel-only headers. User-space code must not call into it directly. The checker in `scripts/check_kernel_includes.py` reports kernel-only includes from user-space sources, and CI fails when one is added. The user-space sources that still include diff --git a/src/kernel/arch/xtensa/drivers/cache_attr.c b/src/kernel/arch/xtensa/drivers/cache_attr.c index 265afe0b3ac4..2483c9c84efb 100644 --- a/src/kernel/arch/xtensa/drivers/cache_attr.c +++ b/src/kernel/arch/xtensa/drivers/cache_attr.c @@ -7,7 +7,7 @@ #ifdef CONFIG_COMPILER_WORKAROUND_CACHE_ATTR #include -#include +#include /* * We want to avoid buggy compiler optimization (function inlining). diff --git a/src/kernel/audio/base_fw.c b/src/kernel/audio/base_fw.c index 0ccf866b036e..289a6f5cf449 100644 --- a/src/kernel/audio/base_fw.c +++ b/src/kernel/audio/base_fw.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/audio/base_fw_intel.c b/src/kernel/audio/base_fw_intel.c index 43ba7d0011dc..2b7c46ae59f6 100644 --- a/src/kernel/audio/base_fw_intel.c +++ b/src/kernel/audio/base_fw_intel.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/src/kernel/audio/module_adapter/library/userspace_proxy.c b/src/kernel/audio/module_adapter/library/userspace_proxy.c index c7b667abfa2f..37ef6ab7dcbc 100644 --- a/src/kernel/audio/module_adapter/library/userspace_proxy.c +++ b/src/kernel/audio/module_adapter/library/userspace_proxy.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/acp_7_x/ipc.c b/src/kernel/drivers/amd/acp_7_x/ipc.c index 35f8f6b0bb08..558ee0587b08 100644 --- a/src/kernel/drivers/amd/acp_7_x/ipc.c +++ b/src/kernel/drivers/amd/acp_7_x/ipc.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/common/acp_bt_dai.c b/src/kernel/drivers/amd/common/acp_bt_dai.c index 315a6f25dde7..17295fffada5 100644 --- a/src/kernel/drivers/amd/common/acp_bt_dai.c +++ b/src/kernel/drivers/amd/common/acp_bt_dai.c @@ -7,7 +7,7 @@ // Sivasubramanian #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/common/acp_dma.c b/src/kernel/drivers/amd/common/acp_dma.c index bfefd0001ed5..768500b65908 100644 --- a/src/kernel/drivers/amd/common/acp_dma.c +++ b/src/kernel/drivers/amd/common/acp_dma.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/common/acp_dmic_dai.c b/src/kernel/drivers/amd/common/acp_dmic_dai.c index 420c2926d274..6f4904f18a94 100644 --- a/src/kernel/drivers/amd/common/acp_dmic_dai.c +++ b/src/kernel/drivers/amd/common/acp_dmic_dai.c @@ -7,7 +7,7 @@ // Sivasubramanian #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/common/acp_dmic_dma.c b/src/kernel/drivers/amd/common/acp_dmic_dma.c index 9cd163c70c82..12464fab0430 100644 --- a/src/kernel/drivers/amd/common/acp_dmic_dma.c +++ b/src/kernel/drivers/amd/common/acp_dmic_dma.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/common/acp_sp_dma.c b/src/kernel/drivers/amd/common/acp_sp_dma.c index 583a39aa4628..bc0276041ed5 100644 --- a/src/kernel/drivers/amd/common/acp_sp_dma.c +++ b/src/kernel/drivers/amd/common/acp_sp_dma.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/common/ipc.c b/src/kernel/drivers/amd/common/ipc.c index fbb0ebdb1492..b74866988496 100644 --- a/src/kernel/drivers/amd/common/ipc.c +++ b/src/kernel/drivers/amd/common/ipc.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/rembrandt/acp_bt_dma.c b/src/kernel/drivers/amd/rembrandt/acp_bt_dma.c index 3fe07c59d196..cb146dcf3172 100644 --- a/src/kernel/drivers/amd/rembrandt/acp_bt_dma.c +++ b/src/kernel/drivers/amd/rembrandt/acp_bt_dma.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/rembrandt/acp_dma.c b/src/kernel/drivers/amd/rembrandt/acp_dma.c index ef94d92dcfd8..50f39b266357 100644 --- a/src/kernel/drivers/amd/rembrandt/acp_dma.c +++ b/src/kernel/drivers/amd/rembrandt/acp_dma.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/rembrandt/acp_dmic_dma.c b/src/kernel/drivers/amd/rembrandt/acp_dmic_dma.c index 1c81e62836ec..39bfa090a282 100644 --- a/src/kernel/drivers/amd/rembrandt/acp_dmic_dma.c +++ b/src/kernel/drivers/amd/rembrandt/acp_dmic_dma.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/rembrandt/acp_hs_dai.c b/src/kernel/drivers/amd/rembrandt/acp_hs_dai.c index 2dc1d8ef72c4..fcc3f1fa5a27 100644 --- a/src/kernel/drivers/amd/rembrandt/acp_hs_dai.c +++ b/src/kernel/drivers/amd/rembrandt/acp_hs_dai.c @@ -7,7 +7,7 @@ // Sivasubramanian #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/rembrandt/acp_hs_dma.c b/src/kernel/drivers/amd/rembrandt/acp_hs_dma.c index f00c408bcff0..3502731212bd 100644 --- a/src/kernel/drivers/amd/rembrandt/acp_hs_dma.c +++ b/src/kernel/drivers/amd/rembrandt/acp_hs_dma.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/rembrandt/acp_sp_dai.c b/src/kernel/drivers/amd/rembrandt/acp_sp_dai.c index 4fcc8968765e..070a65c489b9 100644 --- a/src/kernel/drivers/amd/rembrandt/acp_sp_dai.c +++ b/src/kernel/drivers/amd/rembrandt/acp_sp_dai.c @@ -7,7 +7,7 @@ // Sivasubramanian #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/rembrandt/acp_sp_dma.c b/src/kernel/drivers/amd/rembrandt/acp_sp_dma.c index 156494f0c6cf..d63e84be0f00 100644 --- a/src/kernel/drivers/amd/rembrandt/acp_sp_dma.c +++ b/src/kernel/drivers/amd/rembrandt/acp_sp_dma.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/amd/rembrandt/ipc.c b/src/kernel/drivers/amd/rembrandt/ipc.c index ffc13987bb13..c0b64d863857 100644 --- a/src/kernel/drivers/amd/rembrandt/ipc.c +++ b/src/kernel/drivers/amd/rembrandt/ipc.c @@ -7,7 +7,7 @@ // Sivasubramanian #include #include -#include +#include #include #include #include @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/generic/dummy-dma.c b/src/kernel/drivers/generic/dummy-dma.c index 70f4c31e6be4..fd4efea90603 100644 --- a/src/kernel/drivers/generic/dummy-dma.c +++ b/src/kernel/drivers/generic/dummy-dma.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/host/ipc.c b/src/kernel/drivers/host/ipc.c index f53710ab26f2..7727f6b10995 100644 --- a/src/kernel/drivers/host/ipc.c +++ b/src/kernel/drivers/host/ipc.c @@ -8,7 +8,7 @@ // Ranjani Sridharan #include -#include +#include #include /* testbench ipc */ diff --git a/src/kernel/drivers/imx/ipc.c b/src/kernel/drivers/imx/ipc.c index a124d20a9028..6cf36224ac6c 100644 --- a/src/kernel/drivers/imx/ipc.c +++ b/src/kernel/drivers/imx/ipc.c @@ -6,10 +6,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/mediatek/afe/afe-dai.c b/src/kernel/drivers/mediatek/afe/afe-dai.c index 0157dcc9830c..d9df479687f8 100644 --- a/src/kernel/drivers/mediatek/afe/afe-dai.c +++ b/src/kernel/drivers/mediatek/afe/afe-dai.c @@ -9,7 +9,7 @@ */ #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/mediatek/afe/afe-drv.c b/src/kernel/drivers/mediatek/afe/afe-drv.c index ac66dc2337ee..40ca9973118f 100644 --- a/src/kernel/drivers/mediatek/afe/afe-drv.c +++ b/src/kernel/drivers/mediatek/afe/afe-drv.c @@ -15,8 +15,8 @@ #include #include #include -#include -#include +#include +#include /*#define AFE_DRV_LOG*/ static struct mtk_base_afe mtk_afe; diff --git a/src/kernel/drivers/mediatek/afe/afe-memif.c b/src/kernel/drivers/mediatek/afe/afe-memif.c index 48e55c733920..b4e400fd8dea 100644 --- a/src/kernel/drivers/mediatek/afe/afe-memif.c +++ b/src/kernel/drivers/mediatek/afe/afe-memif.c @@ -10,9 +10,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/drivers/mediatek/afe/zephyr_mtk_afe_memif.c b/src/kernel/drivers/mediatek/afe/zephyr_mtk_afe_memif.c index 910e497f827e..60cfe26ac2d4 100644 --- a/src/kernel/drivers/mediatek/afe/zephyr_mtk_afe_memif.c +++ b/src/kernel/drivers/mediatek/afe/zephyr_mtk_afe_memif.c @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include #include #define DT_DRV_COMPAT mediatek_afe_memif_dma diff --git a/src/kernel/drivers/mediatek/afe/zephyr_mtk_dai.c b/src/kernel/drivers/mediatek/afe/zephyr_mtk_dai.c index 3e8fe0fa7dbe..b4831016fe03 100644 --- a/src/kernel/drivers/mediatek/afe/zephyr_mtk_dai.c +++ b/src/kernel/drivers/mediatek/afe/zephyr_mtk_dai.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/idc/idc.c b/src/kernel/idc/idc.c index 5784fcadc4c1..829ffdc359b7 100644 --- a/src/kernel/idc/idc.c +++ b/src/kernel/idc/idc.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/include/sof/drivers/acp_dai_dma.h b/src/kernel/include/sof/kernel/drivers/acp_dai_dma.h similarity index 100% rename from src/include/sof/drivers/acp_dai_dma.h rename to src/kernel/include/sof/kernel/drivers/acp_dai_dma.h diff --git a/src/include/sof/drivers/afe-dai.h b/src/kernel/include/sof/kernel/drivers/afe-dai.h similarity index 100% rename from src/include/sof/drivers/afe-dai.h rename to src/kernel/include/sof/kernel/drivers/afe-dai.h diff --git a/src/include/sof/drivers/afe-drv.h b/src/kernel/include/sof/kernel/drivers/afe-drv.h similarity index 100% rename from src/include/sof/drivers/afe-drv.h rename to src/kernel/include/sof/kernel/drivers/afe-drv.h diff --git a/src/include/sof/drivers/afe-memif.h b/src/kernel/include/sof/kernel/drivers/afe-memif.h similarity index 100% rename from src/include/sof/drivers/afe-memif.h rename to src/kernel/include/sof/kernel/drivers/afe-memif.h diff --git a/src/include/sof/drivers/cache_attr.h b/src/kernel/include/sof/kernel/drivers/cache_attr.h similarity index 100% rename from src/include/sof/drivers/cache_attr.h rename to src/kernel/include/sof/kernel/drivers/cache_attr.h diff --git a/src/include/sof/drivers/edma.h b/src/kernel/include/sof/kernel/drivers/edma.h similarity index 100% rename from src/include/sof/drivers/edma.h rename to src/kernel/include/sof/kernel/drivers/edma.h diff --git a/src/include/sof/drivers/interrupt-map.h b/src/kernel/include/sof/kernel/drivers/interrupt-map.h similarity index 100% rename from src/include/sof/drivers/interrupt-map.h rename to src/kernel/include/sof/kernel/drivers/interrupt-map.h diff --git a/src/include/sof/drivers/mu.h b/src/kernel/include/sof/kernel/drivers/mu.h similarity index 100% rename from src/include/sof/drivers/mu.h rename to src/kernel/include/sof/kernel/drivers/mu.h diff --git a/src/include/sof/drivers/ssp.h b/src/kernel/include/sof/kernel/drivers/ssp.h similarity index 100% rename from src/include/sof/drivers/ssp.h rename to src/kernel/include/sof/kernel/drivers/ssp.h diff --git a/src/include/sof/ipc/driver.h b/src/kernel/include/sof/kernel/ipc/driver.h similarity index 99% rename from src/include/sof/ipc/driver.h rename to src/kernel/include/sof/kernel/ipc/driver.h index 9b6506a7c1e8..4811fca79d76 100644 --- a/src/include/sof/ipc/driver.h +++ b/src/kernel/include/sof/kernel/ipc/driver.h @@ -9,7 +9,7 @@ #ifndef __SOF_IPC_DRIVER_H__ #define __SOF_IPC_DRIVER_H__ -#include +#include #include #include #include diff --git a/zephyr/include/sof/lib/regions_mm.h b/src/kernel/include/sof/kernel/lib/regions_mm.h similarity index 100% rename from zephyr/include/sof/lib/regions_mm.h rename to src/kernel/include/sof/kernel/lib/regions_mm.h diff --git a/zephyr/include/sof/lib/vpage.h b/src/kernel/include/sof/kernel/lib/vpage.h similarity index 100% rename from zephyr/include/sof/lib/vpage.h rename to src/kernel/include/sof/kernel/lib/vpage.h diff --git a/src/include/sof/llext_manager.h b/src/kernel/include/sof/kernel/llext_manager.h similarity index 100% rename from src/include/sof/llext_manager.h rename to src/kernel/include/sof/kernel/llext_manager.h diff --git a/src/include/sof/platform.h b/src/kernel/include/sof/kernel/platform.h similarity index 96% rename from src/include/sof/platform.h rename to src/kernel/include/sof/kernel/platform.h index 070809ad38b1..1cc6a0b2d08d 100644 --- a/src/include/sof/platform.h +++ b/src/kernel/include/sof/kernel/platform.h @@ -6,7 +6,7 @@ */ /** - * \file include/sof/platform.h + * \file include/sof/kernel/platform.h * \brief Platform API definition * \author Marcin Maka */ diff --git a/src/kernel/init/init.c b/src/kernel/init/init.c index 20f0f1b2fe1f..46386c242f98 100644 --- a/src/kernel/init/init.c +++ b/src/kernel/init/init.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc-common-kernel.c b/src/kernel/ipc/ipc-common-kernel.c index 832a14a1a9de..8b180c6a1aff 100644 --- a/src/kernel/ipc/ipc-common-kernel.c +++ b/src/kernel/ipc/ipc-common-kernel.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc-zephyr.c b/src/kernel/ipc/ipc-zephyr.c index e9f452fa3577..0748a0c084bb 100644 --- a/src/kernel/ipc/ipc-zephyr.c +++ b/src/kernel/ipc/ipc-zephyr.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc3/dai.c b/src/kernel/ipc/ipc3/dai.c index 067aaf8579a6..5b0efff590da 100644 --- a/src/kernel/ipc/ipc3/dai.c +++ b/src/kernel/ipc/ipc3/dai.c @@ -11,13 +11,13 @@ #include #include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc3/handler.c b/src/kernel/ipc/ipc3/handler.c index 7f7ef1962a45..6bb62648c11a 100644 --- a/src/kernel/ipc/ipc3/handler.c +++ b/src/kernel/ipc/ipc3/handler.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc3/helper.c b/src/kernel/ipc/ipc3/helper.c index 8393ccb183bd..308348b42c25 100644 --- a/src/kernel/ipc/ipc3/helper.c +++ b/src/kernel/ipc/ipc3/helper.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc3/host-page-table.c b/src/kernel/ipc/ipc3/host-page-table.c index 56b2335a3a76..b9eda7d84e96 100644 --- a/src/kernel/ipc/ipc3/host-page-table.c +++ b/src/kernel/ipc/ipc3/host-page-table.c @@ -5,11 +5,11 @@ // Author: Liam Girdwood // Keyon Jie -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc4/handler-kernel.c b/src/kernel/ipc/ipc4/handler-kernel.c index c980c94d2d15..b8d02c3771ae 100644 --- a/src/kernel/ipc/ipc4/handler-kernel.c +++ b/src/kernel/ipc/ipc4/handler-kernel.c @@ -18,11 +18,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc4/handler-ll-kernel.c b/src/kernel/ipc/ipc4/handler-ll-kernel.c index 6571cf54288a..7ca33bc24dd2 100644 --- a/src/kernel/ipc/ipc4/handler-ll-kernel.c +++ b/src/kernel/ipc/ipc4/handler-ll-kernel.c @@ -18,11 +18,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc4/handler-ll-user.c b/src/kernel/ipc/ipc4/handler-ll-user.c index 1073cb73af1d..31e249fce0c0 100644 --- a/src/kernel/ipc/ipc4/handler-ll-user.c +++ b/src/kernel/ipc/ipc4/handler-ll-user.c @@ -18,11 +18,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/ipc/ipc4/handler-user-kernel.c b/src/kernel/ipc/ipc4/handler-user-kernel.c index ec4d49736fee..dfaee78f6d09 100644 --- a/src/kernel/ipc/ipc4/handler-user-kernel.c +++ b/src/kernel/ipc/ipc4/handler-user-kernel.c @@ -18,11 +18,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/lib/agent.c b/src/kernel/lib/agent.c index 52a042aba17d..2d62a57b38ca 100644 --- a/src/kernel/lib/agent.c +++ b/src/kernel/lib/agent.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/lib/clk.c b/src/kernel/lib/clk.c index 5a1867ba06fb..d1349557d17a 100644 --- a/src/kernel/lib/clk.c +++ b/src/kernel/lib/clk.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/library_manager/lib_manager.c b/src/kernel/library_manager/lib_manager.c index f2b25edd7ea2..b34dbab56541 100644 --- a/src/kernel/library_manager/lib_manager.c +++ b/src/kernel/library_manager/lib_manager.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/library_manager/llext_manager.c b/src/kernel/library_manager/llext_manager.c index 267955040cce..02a0ef947a14 100644 --- a/src/kernel/library_manager/llext_manager.c +++ b/src/kernel/library_manager/llext_manager.c @@ -21,8 +21,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/kernel/platform/ace30/include/platform/platform.h b/src/kernel/platform/ace30/include/platform/platform.h index 9bf720bb84d9..767d9925c270 100644 --- a/src/kernel/platform/ace30/include/platform/platform.h +++ b/src/kernel/platform/ace30/include/platform/platform.h @@ -34,6 +34,6 @@ #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/amd/acp_7_0/include/platform/platform.h b/src/kernel/platform/amd/acp_7_0/include/platform/platform.h index 67a718b80610..d94133648d28 100644 --- a/src/kernel/platform/amd/acp_7_0/include/platform/platform.h +++ b/src/kernel/platform/amd/acp_7_0/include/platform/platform.h @@ -93,6 +93,6 @@ extern intptr_t _module_init_end; #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/amd/acp_7_0/lib/clk.c b/src/kernel/platform/amd/acp_7_0/lib/clk.c index 0fa3eb6bedd4..6c1ecb37fda3 100644 --- a/src/kernel/platform/amd/acp_7_0/lib/clk.c +++ b/src/kernel/platform/amd/acp_7_0/lib/clk.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/amd/acp_7_0/platform.c b/src/kernel/platform/amd/acp_7_0/platform.c index 6d40612c22d7..dd14a6d82da9 100644 --- a/src/kernel/platform/amd/acp_7_0/platform.c +++ b/src/kernel/platform/amd/acp_7_0/platform.c @@ -9,8 +9,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/amd/acp_7_x/include/platform/platform.h b/src/kernel/platform/amd/acp_7_x/include/platform/platform.h index 29aac5567bd3..4697dd343367 100644 --- a/src/kernel/platform/amd/acp_7_x/include/platform/platform.h +++ b/src/kernel/platform/amd/acp_7_x/include/platform/platform.h @@ -95,5 +95,5 @@ extern intptr_t _module_init_end; #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/amd/acp_7_x/lib/clk.c b/src/kernel/platform/amd/acp_7_x/lib/clk.c index 578b35bb0ab6..14e212425192 100644 --- a/src/kernel/platform/amd/acp_7_x/lib/clk.c +++ b/src/kernel/platform/amd/acp_7_x/lib/clk.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/amd/acp_7_x/platform.c b/src/kernel/platform/amd/acp_7_x/platform.c index 740f2eb687aa..f29408c73744 100644 --- a/src/kernel/platform/amd/acp_7_x/platform.c +++ b/src/kernel/platform/amd/acp_7_x/platform.c @@ -10,8 +10,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/amd/rembrandt/include/platform/platform.h b/src/kernel/platform/amd/rembrandt/include/platform/platform.h index c1544cee6b6f..ce7a38f26fb9 100644 --- a/src/kernel/platform/amd/rembrandt/include/platform/platform.h +++ b/src/kernel/platform/amd/rembrandt/include/platform/platform.h @@ -92,6 +92,6 @@ extern intptr_t _module_init_end; #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/amd/rembrandt/lib/dai.c b/src/kernel/platform/amd/rembrandt/lib/dai.c index c72e5e6ee139..db6683263101 100644 --- a/src/kernel/platform/amd/rembrandt/lib/dai.c +++ b/src/kernel/platform/amd/rembrandt/lib/dai.c @@ -6,7 +6,7 @@ // Bala Kishore #include -#include +#include #include #include #include diff --git a/src/kernel/platform/amd/rembrandt/lib/dma.c b/src/kernel/platform/amd/rembrandt/lib/dma.c index 838e954dbc4e..60d50dc9dd3e 100644 --- a/src/kernel/platform/amd/rembrandt/lib/dma.c +++ b/src/kernel/platform/amd/rembrandt/lib/dma.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/amd/rembrandt/platform.c b/src/kernel/platform/amd/rembrandt/platform.c index b915c4963438..381f1594d924 100644 --- a/src/kernel/platform/amd/rembrandt/platform.c +++ b/src/kernel/platform/amd/rembrandt/platform.c @@ -8,8 +8,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/imx8/include/platform/platform.h b/src/kernel/platform/imx8/include/platform/platform.h index 8bc1cbdff495..b76865e193a2 100644 --- a/src/kernel/platform/imx8/include/platform/platform.h +++ b/src/kernel/platform/imx8/include/platform/platform.h @@ -12,7 +12,7 @@ #if !defined(__ASSEMBLER__) && !defined(LINKER) -#include +#include #include #include #include @@ -83,6 +83,6 @@ extern intptr_t _module_init_end; #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/imx8/platform.c b/src/kernel/platform/imx8/platform.c index b07039832c2b..a0baf7115513 100644 --- a/src/kernel/platform/imx8/platform.c +++ b/src/kernel/platform/imx8/platform.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/imx8m/include/platform/platform.h b/src/kernel/platform/imx8m/include/platform/platform.h index fa462cd7ba71..09013f407d21 100644 --- a/src/kernel/platform/imx8m/include/platform/platform.h +++ b/src/kernel/platform/imx8m/include/platform/platform.h @@ -73,6 +73,6 @@ extern intptr_t _module_init_end; #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/imx8m/platform.c b/src/kernel/platform/imx8m/platform.c index 8bc719dc52ec..285065f13692 100644 --- a/src/kernel/platform/imx8m/platform.c +++ b/src/kernel/platform/imx8m/platform.c @@ -7,8 +7,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/imx8m_cm7/include/platform/platform.h b/src/kernel/platform/imx8m_cm7/include/platform/platform.h index 36818ee3a5aa..cf96924b024b 100644 --- a/src/kernel/platform/imx8m_cm7/include/platform/platform.h +++ b/src/kernel/platform/imx8m_cm7/include/platform/platform.h @@ -22,6 +22,6 @@ #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/imx8m_cm7/platform.c b/src/kernel/platform/imx8m_cm7/platform.c index da1da0c90a8b..e909c73ff65b 100644 --- a/src/kernel/platform/imx8m_cm7/platform.c +++ b/src/kernel/platform/imx8m_cm7/platform.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include #include @@ -16,7 +16,7 @@ #include #include #include -#include +#include static const struct sof_ipc_fw_ready ready = { .hdr = { diff --git a/src/kernel/platform/imx8ulp/include/platform/platform.h b/src/kernel/platform/imx8ulp/include/platform/platform.h index f2f89a5632d8..105231eee740 100644 --- a/src/kernel/platform/imx8ulp/include/platform/platform.h +++ b/src/kernel/platform/imx8ulp/include/platform/platform.h @@ -12,7 +12,7 @@ #if !defined(__ASSEMBLER__) && !defined(LINKER) -#include +#include #include #include #include @@ -83,6 +83,6 @@ extern intptr_t _module_init_end; #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/imx8ulp/platform.c b/src/kernel/platform/imx8ulp/platform.c index 96706dd9854a..61116a96c8b4 100644 --- a/src/kernel/platform/imx8ulp/platform.c +++ b/src/kernel/platform/imx8ulp/platform.c @@ -6,10 +6,10 @@ #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/imx93_a55/include/platform/platform.h b/src/kernel/platform/imx93_a55/include/platform/platform.h index 99782e8d796f..192f75f74337 100644 --- a/src/kernel/platform/imx93_a55/include/platform/platform.h +++ b/src/kernel/platform/imx93_a55/include/platform/platform.h @@ -26,6 +26,6 @@ #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/imx93_a55/platform.c b/src/kernel/platform/imx93_a55/platform.c index 7bc7df3578c6..1222426bd529 100644 --- a/src/kernel/platform/imx93_a55/platform.c +++ b/src/kernel/platform/imx93_a55/platform.c @@ -7,12 +7,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/imx95/include/platform/platform.h b/src/kernel/platform/imx95/include/platform/platform.h index 91c4f00cd3fd..97c543b527d1 100644 --- a/src/kernel/platform/imx95/include/platform/platform.h +++ b/src/kernel/platform/imx95/include/platform/platform.h @@ -22,6 +22,6 @@ #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/imx95/platform.c b/src/kernel/platform/imx95/platform.c index b7d4bed96b24..3b001e52bb01 100644 --- a/src/kernel/platform/imx95/platform.c +++ b/src/kernel/platform/imx95/platform.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include #include @@ -16,7 +16,7 @@ #include #include #include -#include +#include static const struct sof_ipc_fw_ready ready = { .hdr = { diff --git a/src/kernel/platform/intel/ace/lib/watchdog.c b/src/kernel/platform/intel/ace/lib/watchdog.c index 260a4f68be8d..68676f52aeae 100644 --- a/src/kernel/platform/intel/ace/lib/watchdog.c +++ b/src/kernel/platform/intel/ace/lib/watchdog.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/kernel/platform/intel/ace/platform.c b/src/kernel/platform/intel/ace/platform.c index 806a58a27bd8..186ac136b1e7 100644 --- a/src/kernel/platform/intel/ace/platform.c +++ b/src/kernel/platform/intel/ace/platform.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/intel/cavs/platform.c b/src/kernel/platform/intel/cavs/platform.c index 4752916a85b5..72a8934653f3 100644 --- a/src/kernel/platform/intel/cavs/platform.c +++ b/src/kernel/platform/intel/cavs/platform.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/library/include/platform/drivers/pmc.h b/src/kernel/platform/library/include/platform/drivers/pmc.h deleted file mode 100644 index 0139bf828883..000000000000 --- a/src/kernel/platform/library/include/platform/drivers/pmc.h +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2016 Intel Corporation. All rights reserved. - * - * Author: Liam Girdwood - */ - -#ifdef __SOF_DRIVERS_PMC_H__ - -#ifndef __PLATFORM_DRIVERS_PMC_H__ -#define __PLATFORM_DRIVERS_PMC_H__ - -#include - -int platform_ipc_pmc_init(void); -int ipc_pmc_send_msg(uint32_t message); -int pmc_process_msg_queue(void); - -#endif /* __PLATFORM_DRIVERS_PMC_H__ */ - -#else - -#error "This file shouldn't be included from outside of sof/drivers/pmc.h" - -#endif /* __SOF_DRIVERS_PMC_H__ */ diff --git a/src/kernel/platform/library/include/platform/platform.h b/src/kernel/platform/library/include/platform/platform.h index 3aa66b93fc13..785ad4e3fb48 100644 --- a/src/kernel/platform/library/include/platform/platform.h +++ b/src/kernel/platform/library/include/platform/platform.h @@ -72,6 +72,6 @@ static inline void ipc_platform_send_msg_direct(const struct ipc_msg *msg) {} #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/library/lib/memory.c b/src/kernel/platform/library/lib/memory.c index 3f92c62889d7..0d32fcda6390 100644 --- a/src/kernel/platform/library/lib/memory.c +++ b/src/kernel/platform/library/lib/memory.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/library/platform.c b/src/kernel/platform/library/platform.c index ced1dcbca32d..acac856bc225 100644 --- a/src/kernel/platform/library/platform.c +++ b/src/kernel/platform/library/platform.c @@ -5,7 +5,7 @@ // Author: Curtis Malainey #include -#include +#include #include #include #include diff --git a/src/kernel/platform/lunarlake/include/platform/platform.h b/src/kernel/platform/lunarlake/include/platform/platform.h index 19de9027aeb5..7aead0b32474 100644 --- a/src/kernel/platform/lunarlake/include/platform/platform.h +++ b/src/kernel/platform/lunarlake/include/platform/platform.h @@ -34,6 +34,6 @@ #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/meteorlake/include/platform/platform.h b/src/kernel/platform/meteorlake/include/platform/platform.h index b40ae2a7ef81..e95544f87beb 100644 --- a/src/kernel/platform/meteorlake/include/platform/platform.h +++ b/src/kernel/platform/meteorlake/include/platform/platform.h @@ -34,6 +34,6 @@ #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/mtk/dai.c b/src/kernel/platform/mtk/dai.c index 2e1d85a89dfc..c12fc02a1d36 100644 --- a/src/kernel/platform/mtk/dai.c +++ b/src/kernel/platform/mtk/dai.c @@ -5,7 +5,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/src/kernel/platform/mtk/platform.c b/src/kernel/platform/mtk/platform.c index 1cb835717f05..7d22531df130 100644 --- a/src/kernel/platform/mtk/platform.c +++ b/src/kernel/platform/mtk/platform.c @@ -4,9 +4,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/mtk/tools/mt-dai-gen.c b/src/kernel/platform/mtk/tools/mt-dai-gen.c index 9c3ae67013a8..610b1e31d4f2 100644 --- a/src/kernel/platform/mtk/tools/mt-dai-gen.c +++ b/src/kernel/platform/mtk/tools/mt-dai-gen.c @@ -2,7 +2,7 @@ // Copyright(c) 2024 Google LLC. All rights reserved. // Author: Andy Ross #include -#include +#include #include /* DIY assertion, an "assert()" is already defined in platform headers */ diff --git a/src/kernel/platform/novalake/include/platform/platform.h b/src/kernel/platform/novalake/include/platform/platform.h index 9bf720bb84d9..767d9925c270 100644 --- a/src/kernel/platform/novalake/include/platform/platform.h +++ b/src/kernel/platform/novalake/include/platform/platform.h @@ -34,6 +34,6 @@ #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/platform/posix/posix.c b/src/kernel/platform/posix/posix.c index eb5a55274eb7..859ce6744789 100644 --- a/src/kernel/platform/posix/posix.c +++ b/src/kernel/platform/posix/posix.c @@ -1,10 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright(c) 2022 Google LLC. All rights reserved. // Author: Andy Ross -#include +#include #include #include -#include +#include #include #include #include diff --git a/src/kernel/platform/tigerlake/include/platform/platform.h b/src/kernel/platform/tigerlake/include/platform/platform.h index 64082d4386f2..348379b18d0e 100644 --- a/src/kernel/platform/tigerlake/include/platform/platform.h +++ b/src/kernel/platform/tigerlake/include/platform/platform.h @@ -38,6 +38,6 @@ extern intptr_t _module_init_end; #else -#error "This file shouldn't be included from outside of sof/platform.h" +#error "This file shouldn't be included from outside of sof/kernel/platform.h" #endif /* __SOF_PLATFORM_H__ */ diff --git a/src/kernel/probe/probe.c b/src/kernel/probe/probe.c index 62c1d27e3cf7..e5026cf3581c 100644 --- a/src/kernel/probe/probe.c +++ b/src/kernel/probe/probe.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/schedule/zephyr_domain-kernel.c b/src/kernel/schedule/zephyr_domain-kernel.c index e1c7bd6f1156..c99760e18c2a 100644 --- a/src/kernel/schedule/zephyr_domain-kernel.c +++ b/src/kernel/schedule/zephyr_domain-kernel.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/schedule/zephyr_dp_schedule-kernel.c b/src/kernel/schedule/zephyr_dp_schedule-kernel.c index f575b4f401fc..81e5dad1a3a7 100644 --- a/src/kernel/schedule/zephyr_dp_schedule-kernel.c +++ b/src/kernel/schedule/zephyr_dp_schedule-kernel.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/schedule/zephyr_dp_schedule_application-kernel.c b/src/kernel/schedule/zephyr_dp_schedule_application-kernel.c index 6e0fbc2780d1..e839d32f716b 100644 --- a/src/kernel/schedule/zephyr_dp_schedule_application-kernel.c +++ b/src/kernel/schedule/zephyr_dp_schedule_application-kernel.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/schedule/dma_multi_chan_domain.c b/src/schedule/dma_multi_chan_domain.c index 7fd478d50afc..fec3ad3ecae9 100644 --- a/src/schedule/dma_multi_chan_domain.c +++ b/src/schedule/dma_multi_chan_domain.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/schedule/dma_single_chan_domain.c b/src/schedule/dma_single_chan_domain.c index a2a5d5bdb059..0852c954b4cd 100644 --- a/src/schedule/dma_single_chan_domain.c +++ b/src/schedule/dma_single_chan_domain.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/schedule/ll_schedule_xtos.c b/src/schedule/ll_schedule_xtos.c index 073662ff48c5..1321dcf89c62 100644 --- a/src/schedule/ll_schedule_xtos.c +++ b/src/schedule/ll_schedule_xtos.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/schedule/zephyr_dma_domain.c b/src/schedule/zephyr_dma_domain.c index 50901ef7b2af..6189e00f3d47 100644 --- a/src/schedule/zephyr_dma_domain.c +++ b/src/schedule/zephyr_dma_domain.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/cmocka/src/audio/buffer/buffer_copy.c b/test/cmocka/src/audio/buffer/buffer_copy.c index f4e958d7fe19..35a3dbc73b0e 100644 --- a/test/cmocka/src/audio/buffer/buffer_copy.c +++ b/test/cmocka/src/audio/buffer/buffer_copy.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/cmocka/src/audio/buffer/buffer_new.c b/test/cmocka/src/audio/buffer/buffer_new.c index 1561c94ec675..8aee748b029d 100644 --- a/test/cmocka/src/audio/buffer/buffer_new.c +++ b/test/cmocka/src/audio/buffer/buffer_new.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/cmocka/src/audio/buffer/buffer_wrap.c b/test/cmocka/src/audio/buffer/buffer_wrap.c index a1fc37383274..282249ee9a9a 100644 --- a/test/cmocka/src/audio/buffer/buffer_wrap.c +++ b/test/cmocka/src/audio/buffer/buffer_wrap.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/cmocka/src/audio/buffer/buffer_write.c b/test/cmocka/src/audio/buffer/buffer_write.c index 3fd5504560d8..7982c22fb32d 100644 --- a/test/cmocka/src/audio/buffer/buffer_write.c +++ b/test/cmocka/src/audio/buffer/buffer_write.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/cmocka/src/audio/mixer/mixer_test.c b/test/cmocka/src/audio/mixer/mixer_test.c index 26ed18ba2c16..a5c3bbbce620 100644 --- a/test/cmocka/src/audio/mixer/mixer_test.c +++ b/test/cmocka/src/audio/mixer/mixer_test.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/cmocka/src/audio/pipeline/pipeline_mocks.h b/test/cmocka/src/audio/pipeline/pipeline_mocks.h index 636caac3dc9f..8a97813fc24b 100644 --- a/test/cmocka/src/audio/pipeline/pipeline_mocks.h +++ b/test/cmocka/src/audio/pipeline/pipeline_mocks.h @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/cmocka/src/common_mocks.c b/test/cmocka/src/common_mocks.c index 53a5bc667f8e..e911fd5cce46 100644 --- a/test/cmocka/src/common_mocks.c +++ b/test/cmocka/src/common_mocks.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/ztest/unit/audio/crossover/CMakeLists.txt b/test/ztest/unit/audio/crossover/CMakeLists.txt index 71557a2256b1..23d061180d16 100644 --- a/test/ztest/unit/audio/crossover/CMakeLists.txt +++ b/test/ztest/unit/audio/crossover/CMakeLists.txt @@ -12,6 +12,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${SOF_ROOT}/src/audio/crossover diff --git a/test/ztest/unit/audio/drc/CMakeLists.txt b/test/ztest/unit/audio/drc/CMakeLists.txt index 225ab3fef4dc..7acd0f49104d 100644 --- a/test/ztest/unit/audio/drc/CMakeLists.txt +++ b/test/ztest/unit/audio/drc/CMakeLists.txt @@ -17,6 +17,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${SOF_ROOT}/src/audio diff --git a/test/ztest/unit/audio/selector/CMakeLists.txt b/test/ztest/unit/audio/selector/CMakeLists.txt index c3082f21587f..a5ca2b2d829d 100644 --- a/test/ztest/unit/audio/selector/CMakeLists.txt +++ b/test/ztest/unit/audio/selector/CMakeLists.txt @@ -16,6 +16,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${SOF_ROOT}/src/audio diff --git a/test/ztest/unit/dsrc/CMakeLists.txt b/test/ztest/unit/dsrc/CMakeLists.txt index ef4ce93d443f..769761758586 100644 --- a/test/ztest/unit/dsrc/CMakeLists.txt +++ b/test/ztest/unit/dsrc/CMakeLists.txt @@ -11,6 +11,7 @@ include(${SOF_ROOT}/scripts/cmake/misc.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ) diff --git a/test/ztest/unit/fast-get/CMakeLists.txt b/test/ztest/unit/fast-get/CMakeLists.txt index 4a6040911fff..8cff74ba04cf 100644 --- a/test/ztest/unit/fast-get/CMakeLists.txt +++ b/test/ztest/unit/fast-get/CMakeLists.txt @@ -15,6 +15,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${PROJECT_BINARY_DIR}/include/generated # For uuid-registry.h diff --git a/test/ztest/unit/math/a_law/CMakeLists.txt b/test/ztest/unit/math/a_law/CMakeLists.txt index d4e4d6fbe438..1c4fa191a0ec 100644 --- a/test/ztest/unit/math/a_law/CMakeLists.txt +++ b/test/ztest/unit/math/a_law/CMakeLists.txt @@ -12,6 +12,7 @@ set(SOF_ROOT "${PROJECT_SOURCE_DIR}/../../../../..") target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include # ref_chirp_mono_8k_s16.h is shared with the mu_law suite; a_law_codec.h # is colocated with this test. ${SOF_ROOT}/test/ztest/unit/math/arithmetic diff --git a/test/ztest/unit/math/advanced/functions/CMakeLists.txt b/test/ztest/unit/math/advanced/functions/CMakeLists.txt index 797133172e30..2ac00c8f6a34 100644 --- a/test/ztest/unit/math/advanced/functions/CMakeLists.txt +++ b/test/ztest/unit/math/advanced/functions/CMakeLists.txt @@ -15,6 +15,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${SOF_ROOT}/test/cmocka/include diff --git a/test/ztest/unit/math/auditory/CMakeLists.txt b/test/ztest/unit/math/auditory/CMakeLists.txt index ef05f3115861..d64e3d5d46be 100644 --- a/test/ztest/unit/math/auditory/CMakeLists.txt +++ b/test/ztest/unit/math/auditory/CMakeLists.txt @@ -16,6 +16,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${SOF_ROOT}/test/ztest/unit/common diff --git a/test/ztest/unit/math/basic/arithmetic/CMakeLists.txt b/test/ztest/unit/math/basic/arithmetic/CMakeLists.txt index b71031491abf..91bce81f3a7a 100644 --- a/test/ztest/unit/math/basic/arithmetic/CMakeLists.txt +++ b/test/ztest/unit/math/basic/arithmetic/CMakeLists.txt @@ -8,6 +8,7 @@ set(SOF_ROOT "${PROJECT_SOURCE_DIR}/../../../../../..") target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ) # Define SOF-specific configurations for unit testing diff --git a/test/ztest/unit/math/basic/complex/CMakeLists.txt b/test/ztest/unit/math/basic/complex/CMakeLists.txt index db756e341b5b..30669157bdb1 100644 --- a/test/ztest/unit/math/basic/complex/CMakeLists.txt +++ b/test/ztest/unit/math/basic/complex/CMakeLists.txt @@ -8,6 +8,7 @@ set(SOF_ROOT "${PROJECT_SOURCE_DIR}/../../../../../..") target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ) # Define SOF-specific configurations for unit testing diff --git a/test/ztest/unit/math/basic/trigonometry/CMakeLists.txt b/test/ztest/unit/math/basic/trigonometry/CMakeLists.txt index 48d009abbee8..b2a37f658a97 100644 --- a/test/ztest/unit/math/basic/trigonometry/CMakeLists.txt +++ b/test/ztest/unit/math/basic/trigonometry/CMakeLists.txt @@ -8,6 +8,7 @@ set(SOF_ROOT "${PROJECT_SOURCE_DIR}/../../../../../..") target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ) # Define SOF-specific configurations for unit testing diff --git a/test/ztest/unit/math/dct/CMakeLists.txt b/test/ztest/unit/math/dct/CMakeLists.txt index 0dba80efaf1c..2599c20c8396 100644 --- a/test/ztest/unit/math/dct/CMakeLists.txt +++ b/test/ztest/unit/math/dct/CMakeLists.txt @@ -16,6 +16,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${SOF_ROOT}/test/ztest/unit/common diff --git a/test/ztest/unit/math/dft3/CMakeLists.txt b/test/ztest/unit/math/dft3/CMakeLists.txt index b97d6e33b2a5..4f89eaef1c36 100644 --- a/test/ztest/unit/math/dft3/CMakeLists.txt +++ b/test/ztest/unit/math/dft3/CMakeLists.txt @@ -16,6 +16,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/platform/posix/include # Reference test vectors are #included in place from the CMocka tree # rather than copied, so both frameworks share identical data. diff --git a/test/ztest/unit/math/fft/CMakeLists.txt b/test/ztest/unit/math/fft/CMakeLists.txt index 85aae340cff5..1bfdd38fe58c 100644 --- a/test/ztest/unit/math/fft/CMakeLists.txt +++ b/test/ztest/unit/math/fft/CMakeLists.txt @@ -16,6 +16,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${SOF_ROOT}/src/audio diff --git a/test/ztest/unit/math/fft_multi/CMakeLists.txt b/test/ztest/unit/math/fft_multi/CMakeLists.txt index 698bcb7d9dcc..991e24220c24 100644 --- a/test/ztest/unit/math/fft_multi/CMakeLists.txt +++ b/test/ztest/unit/math/fft_multi/CMakeLists.txt @@ -16,6 +16,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${SOF_ROOT}/test/ztest/unit/common diff --git a/test/ztest/unit/math/matrix/CMakeLists.txt b/test/ztest/unit/math/matrix/CMakeLists.txt index a739985ce022..2e79921b2c0c 100644 --- a/test/ztest/unit/math/matrix/CMakeLists.txt +++ b/test/ztest/unit/math/matrix/CMakeLists.txt @@ -16,6 +16,7 @@ include(${SOF_ROOT}/scripts/cmake/uuid-registry.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ${SOF_ROOT}/test/ztest/unit/common diff --git a/test/ztest/unit/math/mu_law/CMakeLists.txt b/test/ztest/unit/math/mu_law/CMakeLists.txt index ea427ad68e3f..cc0a5063ddf8 100644 --- a/test/ztest/unit/math/mu_law/CMakeLists.txt +++ b/test/ztest/unit/math/mu_law/CMakeLists.txt @@ -12,6 +12,7 @@ set(SOF_ROOT "${PROJECT_SOURCE_DIR}/../../../../..") target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include # ref_chirp_mono_8k_s16.h is shared with the a_law suite; mu_law_codec.h # is colocated with this test. ${SOF_ROOT}/test/ztest/unit/math/arithmetic diff --git a/test/ztest/unit/math/window/CMakeLists.txt b/test/ztest/unit/math/window/CMakeLists.txt index 4d72339dbdc7..3f2000a0e1f7 100644 --- a/test/ztest/unit/math/window/CMakeLists.txt +++ b/test/ztest/unit/math/window/CMakeLists.txt @@ -12,6 +12,7 @@ set(SOF_ROOT "${PROJECT_SOURCE_DIR}/../../../../..") target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ) target_compile_definitions(app PRIVATE diff --git a/test/ztest/unit/objpool/CMakeLists.txt b/test/ztest/unit/objpool/CMakeLists.txt index 544ce203618b..def6f08424dd 100644 --- a/test/ztest/unit/objpool/CMakeLists.txt +++ b/test/ztest/unit/objpool/CMakeLists.txt @@ -11,6 +11,7 @@ include(${SOF_ROOT}/scripts/cmake/misc.cmake) target_include_directories(app PRIVATE ${SOF_ROOT}/zephyr/include ${SOF_ROOT}/src/include + ${SOF_ROOT}/src/kernel/include ${SOF_ROOT}/src/kernel/platform/posix/include ${SOF_ROOT}/src/platform/posix/include ) diff --git a/tools/testbench/CMakeLists.txt b/tools/testbench/CMakeLists.txt index fd1ca8ffbc2f..a18d41576e31 100644 --- a/tools/testbench/CMakeLists.txt +++ b/tools/testbench/CMakeLists.txt @@ -42,6 +42,7 @@ set(config_h ${sof_binary_directory}/library_autoconfig.h) target_include_directories(${testbench} PRIVATE "${sof_source_directory}/src/kernel/platform/library/include") target_include_directories(${testbench} PRIVATE "${sof_source_directory}/src/platform/library/include") target_include_directories(${testbench} PRIVATE "${sof_source_directory}/src/audio") +target_include_directories(${testbench} PRIVATE "${sof_source_directory}/src/kernel/include") # Configuration time, make copy configure_file(${default_asoc_h} ${CMAKE_CURRENT_BINARY_DIR}/include/alsa/sound/asoc.h) diff --git a/tools/testbench/file.c b/tools/testbench/file.c index 33c85485c626..25b19542d350 100644 --- a/tools/testbench/file.c +++ b/tools/testbench/file.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/testbench/testbench.c b/tools/testbench/testbench.c index 670f34c1ab27..2ecb795fe0eb 100644 --- a/tools/testbench/testbench.c +++ b/tools/testbench/testbench.c @@ -6,7 +6,7 @@ // Ranjani Sridharan #include -#include +#include #include #include #include diff --git a/tools/testbench/topology_ipc3.c b/tools/testbench/topology_ipc3.c index 331ab2ff1103..64525b845455 100644 --- a/tools/testbench/topology_ipc3.c +++ b/tools/testbench/topology_ipc3.c @@ -10,7 +10,7 @@ #if CONFIG_IPC_MAJOR_3 #include -#include +#include #include #include #include diff --git a/tools/tplg_parser/CMakeLists.txt b/tools/tplg_parser/CMakeLists.txt index 9a4d19f3ba64..d4eba5cb2e5f 100644 --- a/tools/tplg_parser/CMakeLists.txt +++ b/tools/tplg_parser/CMakeLists.txt @@ -45,6 +45,7 @@ target_include_directories(sof_tplg_parser PRIVATE ${sof_source_directory}/src/a target_include_directories(sof_tplg_parser PRIVATE ${sof_source_directory}/src/kernel/arch/host/include) target_include_directories(sof_tplg_parser PRIVATE ${sof_source_directory}/src/kernel/platform/library/include) target_include_directories(sof_tplg_parser PRIVATE ${sof_source_directory}/src/platform/library/include) +target_include_directories(sof_tplg_parser PRIVATE ${sof_source_directory}/src/kernel/include) target_include_directories(sof_tplg_parser PRIVATE ${sof_source_directory}/posix/include) # Configuration time, make copy diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 9e4f19b15d86..ad5533ab1310 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -171,6 +171,8 @@ set(RIMAGE_CONFIG_PATH ${RIMAGE_TOP}/config CACHE PATH # default SOF includes target_include_directories(SOF INTERFACE ${RIMAGE_TOP}/src/include) target_include_directories(SOF INTERFACE ${SOF_SRC_PATH}/include) +# kernel-only headers, included as ; LLEXT modules do not get them +target_include_directories(SOF INTERFACE ${SOF_SRC_PATH}/kernel/include) target_include_directories(SOF INTERFACE ${SOF_SRC_PATH}/kernel/arch/${ARCH}/include) target_include_directories(SOF INTERFACE ${sof_top_dir}/third_party/include) target_include_directories(SOF INTERFACE ${sof_top_dir}/zephyr/include) diff --git a/zephyr/lib/alloc.c b/zephyr/lib/alloc.c index 5b4d09368c99..d87e621c8d0d 100644 --- a/zephyr/lib/alloc.c +++ b/zephyr/lib/alloc.c @@ -8,12 +8,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include /* for zephyr_ll_user_heap() */ @@ -31,7 +31,7 @@ #endif #if CONFIG_VIRTUAL_HEAP -#include +#include #include struct vmh_heap; diff --git a/zephyr/lib/clk.c b/zephyr/lib/clk.c index 06cc5979753e..5aa3ba191236 100644 --- a/zephyr/lib/clk.c +++ b/zephyr/lib/clk.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/zephyr/lib/cpu.c b/zephyr/lib/cpu.c index ec5217823f8a..de0e028aeb14 100644 --- a/zephyr/lib/cpu.c +++ b/zephyr/lib/cpu.c @@ -21,7 +21,7 @@ static uint32_t mic_disable_status; #include #include #include -#include +#include #include #include #include diff --git a/zephyr/lib/fast-get.c b/zephyr/lib/fast-get.c index df9c0b1619a1..9ea839ca3761 100644 --- a/zephyr/lib/fast-get.c +++ b/zephyr/lib/fast-get.c @@ -69,7 +69,7 @@ static bool fast_get_find_entry(void *data, void *arg) #define PAGE_SZ CONFIG_MM_DRV_PAGE_SIZE #define FAST_GET_MAX_COPY_SIZE (PAGE_SZ / 2) #else -#include +#include #define PAGE_SZ HOST_PAGE_SIZE #define FAST_GET_MAX_COPY_SIZE 0 #endif diff --git a/zephyr/lib/pm_runtime.c b/zephyr/lib/pm_runtime.c index dd238b9b9708..5a1e753d47e2 100644 --- a/zephyr/lib/pm_runtime.c +++ b/zephyr/lib/pm_runtime.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include LOG_MODULE_REGISTER(power, CONFIG_SOF_LOG_LEVEL); diff --git a/zephyr/lib/regions_mm.c b/zephyr/lib/regions_mm.c index be0c32b679ac..c600884753ca 100644 --- a/zephyr/lib/regions_mm.c +++ b/zephyr/lib/regions_mm.c @@ -9,7 +9,7 @@ #if defined(CONFIG_MM_DRV) #include -#include +#include #ifdef CONFIG_SOF_TELEMETRY_MEMORY #include #endif diff --git a/zephyr/lib/vpage.c b/zephyr/lib/vpage.c index 6a50da85aa7e..f6a4435eb0d5 100644 --- a/zephyr/lib/vpage.c +++ b/zephyr/lib/vpage.c @@ -10,8 +10,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/zephyr/lib/vregion.c b/zephyr/lib/vregion.c index f245af699d35..ad33d25c889e 100644 --- a/zephyr/lib/vregion.c +++ b/zephyr/lib/vregion.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/zephyr/test/vmh.c b/zephyr/test/vmh.c index abb00b561b3d..d62863feb5d8 100644 --- a/zephyr/test/vmh.c +++ b/zephyr/test/vmh.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/zephyr/test/vpage.c b/zephyr/test/vpage.c index 71e6205f5d20..f6509d6ef03e 100644 --- a/zephyr/test/vpage.c +++ b/zephyr/test/vpage.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index 7dcac306cb60..0a32cfb701e5 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -7,15 +7,15 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include