mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-10-22 20:02:04 +01:00
lib: sbi_scratch: add TSA annotations
Add Thread Safety Analysis (TSA) annotations for the scratch space implementation. This only consists of annotating that the extra_offset global must be accessed under the extra_lock 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-7-carlos.lopezr4096@gmail.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
1 parent
eaac726ea1
commit
2d34c0e0e1
1 file changed
+2
-1
@@ -21,7 +21,8 @@ u32 hartindex_to_hartid_table[SBI_HARTMASK_MAX_BITS] = { [0 ... SBI_HARTMASK_MAX
|
||||
struct sbi_scratch *hartindex_to_scratch_table[SBI_HARTMASK_MAX_BITS];
|
||||
|
||||
static spinlock_t extra_lock = SPIN_LOCK_INITIALIZER;
|
||||
static unsigned long extra_offset = SBI_SCRATCH_EXTRA_SPACE_OFFSET;
|
||||
static unsigned long
|
||||
extra_offset GUARDED_BY(&extra_lock) = SBI_SCRATCH_EXTRA_SPACE_OFFSET;
|
||||
|
||||
/*
|
||||
* Get the alignment size.
|
||||
|
||||
Reference in new issue
Block a user