aboutsummaryrefslogtreecommitdiff
path: root/include/sbi/sbi_tlb.h
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-05-04 10:58:07 +0530
committerAnup Patel <anup@brainfault.org>2020-05-07 08:55:38 +0530
commit5338679ff043d68f5c26265de144e5ec54109724 (patch)
tree40d77f564ade03e63ce5e6a39bd2d7af9270dcf3 /include/sbi/sbi_tlb.h
parent7993ca2c8e092428eb59febea13a31659450850c (diff)
lib: sbi_tlb: Fix remote TLB HFENCE VVMA implementation
The HFENCE VVMA instructions flushes TLB based on the VMID present in HGATP CSR. To handle this, we get the current VMID for SBI HFENCE VVMA call and we use this current VMID to do remote TLB HFENCE VVMA on desired set of HARTs. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include/sbi/sbi_tlb.h')
-rw-r--r--include/sbi/sbi_tlb.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/sbi/sbi_tlb.h b/include/sbi/sbi_tlb.h
index 6a07ee2..6ee64a9 100644
--- a/include/sbi/sbi_tlb.h
+++ b/include/sbi/sbi_tlb.h
@@ -38,17 +38,19 @@ struct sbi_tlb_info {
unsigned long start;
unsigned long size;
unsigned long asid;
+ unsigned long vmid;
unsigned long type;
struct sbi_hartmask smask;
};
-#define SBI_TLB_INFO_INIT(__ptr, __start, __size, __asid, __type, __src_hart) \
+#define SBI_TLB_INFO_INIT(__p, __start, __size, __asid, __vmid, __type, __src) \
do { \
- (__ptr)->start = (__start); \
- (__ptr)->size = (__size); \
- (__ptr)->asid = (__asid); \
- (__ptr)->type = (__type); \
- SBI_HARTMASK_INIT_EXCEPT(&(__ptr)->smask, (__src_hart)); \
+ (__p)->start = (__start); \
+ (__p)->size = (__size); \
+ (__p)->asid = (__asid); \
+ (__p)->vmid = (__vmid); \
+ (__p)->type = (__type); \
+ SBI_HARTMASK_INIT_EXCEPT(&(__p)->smask, (__src)); \
} while (0)
#define SBI_TLB_INFO_SIZE sizeof(struct sbi_tlb_info)