Skip to content

Commit

Permalink
zephyr/app: Clean up Zephyr kconfig defaults
Browse files Browse the repository at this point in the history
Things had gotten a little messy here.  The CPU_MASK_PIN_ONLY and
SMP_BOOT_DELAY options are in fact not generic to all Zephyr builds;
they both depend on SMP, and in fact don't exist otherwise, producing
a build failure if the board defconfig doesn't turn it off.  Create an
application "Kconfig" file (which SOF hasn't used so far), which
allows the dependencies for these settings to be more cleanly
expressed.

Similarly CONFIG_TRACE=y won't build with Zephyr, and all boards were
turning it off independently.  Move that to the prj.conf level.

And likewise CONFIG_ZEPHYR_LOG, while not strictly required for a
Zephyr build, is pervasively enabled (except on ACP6?  What does that
device use for logging?), so it belongs in the global file.

Signed-off-by: Andy Ross <[email protected]>
  • Loading branch information
andyross committed Dec 17, 2024
1 parent f5702db commit b73d53e
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 32 deletions.
8 changes: 8 additions & 0 deletions app/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config SCHED_CPU_MASK_PIN_ONLY
default y if SMP

config SMP_BOOT_DELAY
default y if SMP

source "Kconfig.zephyr"

1 change: 0 additions & 1 deletion app/boards/acp_6_0_adsp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ CONFIG_DCACHE_LINE_SIZE=128
CONFIG_DYNAMIC_INTERRUPTS=y
CONFIG_SHARED_INTERRUPTS=n
CONFIG_ZEPHYR_LOG=n
CONFIG_TRACE=n
CONFIG_DMA=y
CONFIG_ZEPHYR_NATIVE_DRIVERS=n
CONFIG_AMS=n
2 changes: 0 additions & 2 deletions app/boards/imx8qm_mek_mimx8qm6_adsp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ CONFIG_IMX8=y
CONFIG_HAVE_AGENT=n
CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_KPB_FORCE_COPY_TYPE_NORMAL=n
CONFIG_ZEPHYR_LOG=y
CONFIG_TRACE=n
CONFIG_DMA=y
CONFIG_DMA_NXP_EDMA_ENABLE_HALFMAJOR_IRQ=y
CONFIG_SHARED_INTERRUPTS=y
Expand Down
2 changes: 0 additions & 2 deletions app/boards/imx8qxp_mek_mimx8qx6_adsp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ CONFIG_IMX8X=y
CONFIG_HAVE_AGENT=n
CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_KPB_FORCE_COPY_TYPE_NORMAL=n
CONFIG_ZEPHYR_LOG=y
CONFIG_TRACE=n
CONFIG_DMA=y
CONFIG_DMA_NXP_EDMA_ENABLE_HALFMAJOR_IRQ=y
CONFIG_SHARED_INTERRUPTS=y
Expand Down
2 changes: 0 additions & 2 deletions app/boards/imx8ulp_evk_mimx8ud7_adsp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ CONFIG_HAVE_AGENT=n
CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_KPB_FORCE_COPY_TYPE_NORMAL=n

CONFIG_ZEPHYR_LOG=y
CONFIG_TRACE=n

CONFIG_DMA=y
CONFIG_DMA_NXP_EDMA_ENABLE_HALFMAJOR_IRQ=y
Expand Down
1 change: 0 additions & 1 deletion app/boards/imx93_evk_mimx9352_a55.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ CONFIG_DCACHE_LINE_SIZE_DETECT=n
CONFIG_DCACHE_LINE_SIZE=64

CONFIG_IMX93_A55=y
CONFIG_TRACE=n

# DAI-related configurations
CONFIG_SAI_HAS_MCLK_CONFIG_OPTION=y
Expand Down
1 change: 0 additions & 1 deletion app/boards/imx95_evk_mimx9596_m7_ddr.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CONFIG_DYNAMIC_INTERRUPTS=y
CONFIG_TRACE=n
CONFIG_ZEPHYR_NATIVE_DRIVERS=y
CONFIG_IMX95=y

Expand Down
2 changes: 0 additions & 2 deletions app/boards/intel_adsp_ace15_mtpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ CONFIG_LIBRARY_BASE_ADDRESS=0xa0688000

# SOF / logging
CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_TRACE=n
CONFIG_ZEPHYR_LOG=y

# Zephyr / OS features
CONFIG_DEBUG_COREDUMP=y
Expand Down
2 changes: 0 additions & 2 deletions app/boards/intel_adsp_ace20_lnl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ CONFIG_LIBRARY_MANAGER=y

# SOF / logging
CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_TRACE=n
CONFIG_ZEPHYR_LOG=y

# Zephyr / OS features
CONFIG_COUNTER=y
Expand Down
2 changes: 0 additions & 2 deletions app/boards/intel_adsp_ace30_ptl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ CONFIG_INTEL_MODULES=y
CONFIG_LIBRARY_MANAGER=y

# SOF / logging
CONFIG_TRACE=n
CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_ZEPHYR_LOG=y

# Zephyr / OS features
CONFIG_COUNTER=y
Expand Down
1 change: 0 additions & 1 deletion app/boards/intel_adsp_ace30_ptl_sim.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ CONFIG_INTEL_ADSP_IPC=y


# Temporary disabled options
CONFIG_TRACE=n
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=n
CONFIG_PM_DEVICE_POWER_DOMAIN=n
Expand Down
2 changes: 0 additions & 2 deletions app/boards/intel_adsp_cavs25.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ CONFIG_INTEL_MODULES=y
CONFIG_LIBRARY_MANAGER=n

# SOF / logging
CONFIG_TRACE=n
CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_ZEPHYR_LOG=y

# Zephyr / OS features
CONFIG_DEBUG_COREDUMP=y
Expand Down
2 changes: 0 additions & 2 deletions app/boards/intel_adsp_cavs25_tgph.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ CONFIG_INTEL_MODULES=y
CONFIG_LIBRARY_MANAGER=n

# SOF / logging
CONFIG_TRACE=n
CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_ZEPHYR_LOG=y

# Zephyr / OS features
CONFIG_DEBUG_COREDUMP=y
Expand Down
6 changes: 0 additions & 6 deletions app/boards/native_sim_libfuzzer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,3 @@ CONFIG_SYS_HEAP_BIG_ONLY=y
CONFIG_ZEPHYR_NATIVE_DRIVERS=y
CONFIG_ARCH_POSIX_LIBFUZZER=y
CONFIG_ZEPHYR_POSIX_FUZZ_TICKS=100

# Override incompatible options found in sof/app/prj.conf
# to silence build time warnings
# (strange why these are in app/prj.conf but not our problem here)
CONFIG_SMP_BOOT_DELAY=n
CONFIG_SCHED_CPU_MASK_PIN_ONLY=n
8 changes: 2 additions & 6 deletions app/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ CONFIG_HAVE_AGENT=n
# We need more time to test and evaluate.
CONFIG_MINIMAL_LIBC=y

CONFIG_ZEPHYR_LOG=y
CONFIG_TRACE=n
CONFIG_LOG=y
CONFIG_LOG_PRINTK=y
# Log processing is offloaded to a low-priority thread.
Expand All @@ -41,12 +43,6 @@ CONFIG_COMPILER_OPT="-fstrict-overflow"

CONFIG_SCHED_DEADLINE=y
CONFIG_SCHED_CPU_MASK=y
CONFIG_SMP_BOOT_DELAY=y

# SOF code assumes system work queue and other system
# wide threads are pinned to a single core.
# CPU_MASK_PIN_ONLY must be set for all SOF builds.
CONFIG_SCHED_CPU_MASK_PIN_ONLY=y

# Fix the sys ticks value until following bugs are solved:
# - https://github.com/zephyrproject-rtos/zephyr/issues/46378
Expand Down

0 comments on commit b73d53e

Please sign in to comment.