core: kernel: allow not masking interrupts on output traces#7705
core: kernel: allow not masking interrupts on output traces#7705etienne-lms wants to merge 1 commit intoOP-TEE:masterfrom
Conversation
|
Follow up of #6727. |
|
Sorry I did not look at the code just the description -- can the description be clearer about which message can possibly get mixed up when the new config is enabled? If I'm not mistaken, we have: thread context, non-thread non-interrupt context, and interrupt context, right? |
|
I assume a non-thread context cannot be interrupted. These comprise async interrupts as well as fastcall SMCs. Did I miss something? |
|
Updated. |
jenswi-linaro
left a comment
There was a problem hiding this comment.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
085d70c to
40e6a92
Compare
|
Thanks for updating the description and the comment in
|
Add configuration switch CFG_CONSOLE_MASK_INTERRUPTS define whether or not interrupts are masked when console trace messages are emitted. The config switch is default enabled to reflect core legacy behavior. Disabling this configuration switch can be handy to still benefit from OP-TEE threads output console trace support without adding extra latency to native and foreign interrupts handling when trace messages from interruptible thread context are emitted. Enabling the configuration does not fully prevent collisions of trace messages as described in mk/config.mk. By the way, add an initial value to local variable p in trace_ext_puts(). Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@arm.com>
40e6a92 to
2295e14
Compare
|
|
||
| static bool wait_if_trace_contended(uint32_t *itr_status) | ||
| { | ||
| bool was_contended = false; |
There was a problem hiding this comment.
what is wrong with "contended" instead of "was_contended"
Add configuration switch
CFG_TEE_CONSOLE_UNLOCKEDto evacuate trace messages without masking interrupts. This configuration can be handy to still benefit from OP-TEE threads output console trace support without affecting native and foreign interrupts handling latency.Enabling the configuration does not fully prevent collision of trace messages: a trace message from an non-thread context can still be interrupted by a message from a interrupt context.
By the way, add an initial value to local variable p in trace_ext_puts().