mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-09-20 15:21:42 +01:00
lib: sbi_domain: add TSA annotations
Add Thread Safety Analysis (TSA) annotations for the domain handling code. This includes indicating which fields are protected by a spinlock, and annotating which functions acquire a spinlock, in order to prevent nesting. Exclude sbi_domain_register() from analysis, as it initializes a domain's spinlock. Signed-off-by: Carlos López <carlos.lopezr4096@gmail.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260909162322.29778-11-carlos.lopezr4096@gmail.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -107,6 +107,8 @@ static void hart_context_set(struct sbi_domain *dom, u32 hartindex,
|
||||
*/
|
||||
static int switch_to_next_domain_context(struct hart_context *ctx,
|
||||
struct hart_context *dom_ctx)
|
||||
MUST_NOT_HOLD(&ctx->dom->assigned_harts_lock)
|
||||
MUST_NOT_HOLD(&dom_ctx->dom->assigned_harts_lock)
|
||||
{
|
||||
u32 hartindex = current_hartindex();
|
||||
struct sbi_trap_context *trap_ctx;
|
||||
|
||||
Reference in New Issue
Block a user