diff options
| author | Xiang W <[email protected]> | 2023-12-11 21:29:50 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-12-18 19:51:45 +0530 |
| commit | 925ce146229b2b4f20506f213bff5954cd03fea7 (patch) | |
| tree | 313b2a93ec07d47d34c994d2cb213469afae5abc /lib | |
| parent | 27072504958c2eabddf1fa6ab7177bfe8035beba (diff) | |
lib: sbi: Simplify the initialization of root_hmask in sbi_domain_init
The original code has multiple conversions between hartid and
hartindex. Can call sbi_hartmask_set_hartindex directly to
avoid conversion.
Signed-off-by: Xiang W <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sbi/sbi_domain.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c index 88d25deb..4e9f7428 100644 --- a/lib/sbi/sbi_domain.c +++ b/lib/sbi/sbi_domain.c @@ -815,8 +815,7 @@ int sbi_domain_init(struct sbi_scratch *scratch, u32 cold_hartid) /* Root domain possible and assigned HARTs */ for (i = 0; i < plat->hart_count; i++) - sbi_hartmask_set_hartid(sbi_hartindex_to_hartid(i), - root_hmask); + sbi_hartmask_set_hartindex(i, root_hmask); /* Finally register the root domain */ rc = sbi_domain_register(&root, root_hmask); |
