summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_ipi.h
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2019-03-09 23:57:20 +0300
committerAnup Patel <anup@brainfault.org>2019-03-12 19:37:25 +0300
commit90cb4917b584b07df3e4037a3b660e9ac28e3384 (patch)
tree4b4905f9c70c5909d2b642255d542b71fb700710 /include/sbi/sbi_ipi.h
parent508a27204cbbca0a9430236e56681e5e0d343fb9 (diff)
downloadopensbi-90cb4917b584b07df3e4037a3b660e9ac28e3384.tar.xz
lib: Implement sfence.vma correctly.
Currently, OpenSBI doesn't distinguish between sfence.vma and sfence.vm asid calls. Moreover, it ignores the page ranges and just flush entire TLB everytime. Fix the sfence implementation by keeping all the tlb flush info in scratch area. The relevant Linux kernel code was added by https://patchwork.kernel.org/project/linux-riscv/list/?series=89695 However, this patch is backward compatible with older version kernel that doesn't have the above patches as well. Fixes #87 Signed-off-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include/sbi/sbi_ipi.h')
-rw-r--r--include/sbi/sbi_ipi.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/sbi/sbi_ipi.h b/include/sbi/sbi_ipi.h
index 708dd8c..1aafe35 100644
--- a/include/sbi/sbi_ipi.h
+++ b/include/sbi/sbi_ipi.h
@@ -15,12 +15,23 @@
#define SBI_IPI_EVENT_SOFT 0x1
#define SBI_IPI_EVENT_FENCE_I 0x2
#define SBI_IPI_EVENT_SFENCE_VMA 0x4
-#define SBI_IPI_EVENT_HALT 0x8
+#define SBI_IPI_EVENT_SFENCE_VMA_ASID 0x8
+#define SBI_IPI_EVENT_HALT 0x10
struct sbi_scratch;
+struct sbi_ipi_data {
+ unsigned long ipi_type;
+};
+
+struct sbi_tlb_info {
+ unsigned long start;
+ unsigned long size;
+ unsigned long asid;
+};
+
int sbi_ipi_send_many(struct sbi_scratch *scratch,
- ulong *pmask, u32 event);
+ ulong *pmask, u32 event, void *data);
void sbi_ipi_clear_smode(struct sbi_scratch *scratch);