sbi: sbi_domain_context: Add spinlock for updating domain assigned_harts
authorAlvin Chang <alvinga@andestech.com>
Tue, 16 Apr 2024 05:02:13 +0000 (13:02 +0800)
committerAnup Patel <anup@brainfault.org>
Tue, 7 May 2024 14:41:30 +0000 (20:11 +0530)
commit17e829129d60d7d178d47ecbd8990e705690d352
treecdfcf23509ccda4a7ea12bb2e3936c3e89d622db
parent1d89a9da64e4b4f51c59c44eba2f65b037bc4d95
sbi: sbi_domain_context: Add spinlock for updating domain assigned_harts

Add spinlock protection to avoid race condition on assigned_harts
during domain context switching. Also, rename/add variables for
accessing the corresponding domain of target/current context.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
include/sbi/sbi_domain.h
lib/sbi/sbi_domain.c
lib/sbi/sbi_domain_context.c
lib/sbi/sbi_system.c