mirror of
https://github.com/riscv-software-src/opensbi
synced 2025-10-17 14:18:17 +01:00
lib: Allow sending IPI to self.
S-mode software may send IPI to self. For example, tlbflush may be executed for the same hart. Let the hart send IPI to itself. It's an overhead but doesn't break anything. However, if we don't allow it, it breaks if S-mode keep sending IPIs. Signed-off-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
parent
b9c517f559
commit
bc545539d2
@ -31,7 +31,7 @@ int sbi_ipi_send_many(struct sbi_scratch *scratch,
|
||||
|
||||
/* send IPIs to everyone */
|
||||
for (i = 0, m = mask; m; i++, m >>= 1) {
|
||||
if ((m & 1) && (i != hartid) && !sbi_platform_hart_disabled(plat, hartid)) {
|
||||
if ((m & 1) && !sbi_platform_hart_disabled(plat, hartid)) {
|
||||
oth = sbi_hart_id_to_scratch(scratch, i);
|
||||
atomic_raw_set_bit(event, &oth->ipi_type);
|
||||
mb();
|
||||
|
Loading…
x
Reference in New Issue
Block a user