Skip to content

Commit

Permalink
include: sof: trace: don't place trace ctx in special section
Browse files Browse the repository at this point in the history
If trace is disabled (i.e: CONFIG_TRACE=n) there's no need
to place the trace context inside a special linker section
(i.e: .trace_ctx). This spares platforms that don't use trace
from having to include the .trace_ctx section inside their
linker scripts.

Signed-off-by: Laurentiu Mihalcea <[email protected]>
  • Loading branch information
LaurentiuM1234 authored and kv2019i committed Sep 20, 2024
1 parent 33fe317 commit 42c03ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/sof/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ struct tr_ctx {
uint32_t level; /**< Default log level */
};

#if defined(UNIT_TEST)
#if defined(UNIT_TEST) || !defined(CONFIG_TRACE)
#define TRACE_CONTEXT_SECTION
#else
#define TRACE_CONTEXT_SECTION __section(".trace_ctx")
Expand Down

0 comments on commit 42c03ac

Please sign in to comment.