diff options
author | Atish Patra <atish.patra@wdc.com> | 2019-04-01 17:07:54 -0700 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-04-03 09:57:42 +0530 |
commit | f700216cb55fe690b0eec61bb618b11a0630040e (patch) | |
tree | f004ccbba3ae179ac4e4c47555d36a5a8d9dc301 /include/sbi/sbi_ipi.h | |
parent | 1eba298b0d1be5c1d9d7d4c07a8a18e9613bcb44 (diff) |
lib: Use a fifo to keep track of sfence related IPIs.
Currently, there is no provision for tracking multiple IPIs sent
to a single hart at the same time by different harts.
Use a fifo manage the outstanding requests. While dequeueing, read all
the entries once, because we have only 1 bit to track the type of IPI.
Once the queue is full, busy wait until the there is space available in
queue. This is not the most elegant approach. It should be changed in
favor of a wakeup event once available in opensbi.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include/sbi/sbi_ipi.h')
-rw-r--r-- | include/sbi/sbi_ipi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sbi/sbi_ipi.h b/include/sbi/sbi_ipi.h index 33293c3..609598e 100644 --- a/include/sbi/sbi_ipi.h +++ b/include/sbi/sbi_ipi.h @@ -18,6 +18,7 @@ #define SBI_IPI_EVENT_SFENCE_VMA_ASID 0x8 #define SBI_IPI_EVENT_HALT 0x10 +#define SBI_TLB_FIFO_NUM_ENTRIES 4 enum sbi_tlb_info_types { SBI_TLB_FLUSH_VMA, SBI_TLB_FLUSH_VMA_ASID, @@ -37,6 +38,8 @@ struct sbi_tlb_info { unsigned long type; }; +#define SBI_TLB_INFO_SIZE sizeof(struct sbi_tlb_info) + int sbi_ipi_send_many(struct sbi_scratch *scratch, ulong *pmask, u32 event, void *data); |