From e4febe6549aef98ceccda0b22c5a23348fa1f852 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 6 Jul 2021 03:45:16 +0000 Subject: [PATCH 1/3] zephyr_ll.c: declare missing ll_tr trace context No one noticed that ll_tr was missing because the DMA trace does not work in Zephyr and the main branch yet. Signed-off-by: Marc Herbert --- src/schedule/zephyr_ll.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/schedule/zephyr_ll.c b/src/schedule/zephyr_ll.c index 707dcec2ecf5..62c203f8e0f6 100644 --- a/src/schedule/zephyr_ll.c +++ b/src/schedule/zephyr_ll.c @@ -15,6 +15,12 @@ #include +/* 1547fe68-de0c-11eb-8461-3158a1294853 */ +DECLARE_SOF_UUID("zll-schedule", zll_sched_uuid, 0x1547fe68, 0xde0c, 0x11eb, + 0x84, 0x61, 0x31, 0x58, 0xa1, 0x29, 0x48, 0x53); + +DECLARE_TR_CTX(ll_tr, SOF_UUID(zll_sched_uuid), LOG_LEVEL_INFO); + /* per-scheduler data */ struct zephyr_ll { struct list_item tasks; /* list of ll tasks */ From 13e245a832203b138c8d484fb8a5c8c922155669 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 6 Jul 2021 04:00:12 +0000 Subject: [PATCH 2/3] cavs/platform.c: don't guard trace initialization with #ifdef ZEPHYR Because it's mostly working now and avoids macro nesting complexity; there is already #ifdef CONFIG_DW_SPI #elif CONFIG_TRACE Just for the record this is reverting a very tiny part of commit cf8e35f860a7 ("zephyr: init: create a zephyr entry point in SOF.") Signed-off-by: Marc Herbert --- src/platform/intel/cavs/platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platform/intel/cavs/platform.c b/src/platform/intel/cavs/platform.c index 9f529efdd822..4356a880e150 100644 --- a/src/platform/intel/cavs/platform.c +++ b/src/platform/intel/cavs/platform.c @@ -505,7 +505,6 @@ int platform_init(struct sof *sof) if (ret < 0) return ret; -#ifndef __ZEPHYR__ #if CONFIG_DW_SPI /* initialize the SPI slave */ trace_point(TRACE_BOOT_PLATFORM_SPI); @@ -530,7 +529,7 @@ int platform_init(struct sof *sof) /* show heap status */ heap_trace_all(1); -#endif /* __ZEPHYR__ */ + return 0; } From 76cbafd246649dea153f403fcf036c5aa719c1d4 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 6 Jul 2021 04:31:24 +0000 Subject: [PATCH 3/3] ipc3/handler.c: re-enable DMA trace for Zephyr Reverts commit 74cacc313868 ("zephyr: ipc: dont enable DMA trace transport.") modified by commit d7282762bcd1 ("ipc3: don't declare unused variables") Signed-off-by: Marc Herbert --- src/ipc/ipc3/handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipc/ipc3/handler.c b/src/ipc/ipc3/handler.c index c5d1c034e7cd..30e72e91a1bf 100644 --- a/src/ipc/ipc3/handler.c +++ b/src/ipc/ipc3/handler.c @@ -729,7 +729,7 @@ static int ipc_glb_pm_message(uint32_t header) /* * Debug IPC Operations. */ -#if CONFIG_SUECREEK || defined __ZEPHYR__ +#if CONFIG_SUECREEK static int ipc_dma_trace_config(uint32_t header) { return 0; @@ -799,7 +799,7 @@ static int ipc_dma_trace_config(uint32_t header) error: return err; } -#endif /* CONFIG_SUECREEK || defined __ZEPHYR__ */ +#endif /* CONFIG_SUECREEK */ static int ipc_trace_filter_update(uint32_t header) {