summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-03-04 11:51:42 +0300
committerAnup Patel <anup@brainfault.org>2020-03-11 12:59:57 +0300
commitd96316481dbc9a52e7e97c4cef70957507c2845f (patch)
treed786e665940f2cebd911be703fec3329fc0b6db2 /include
parenta4a6a81b7d69b39f4d806e96e6b54a9e0e36d3f3 (diff)
downloadopensbi-d96316481dbc9a52e7e97c4cef70957507c2845f.tar.xz
lib: sbi_tlb: Use sbi_hartmask in sbi_tlb_info
Instead of using single ulong as source mask for sbi_tlb_info, we use sbi_hartmask. This way sbi_tlb_info can easily scale for large number of HARTs. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_tlb.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/sbi/sbi_tlb.h b/include/sbi/sbi_tlb.h
index 3d52636..67c3900 100644
--- a/include/sbi/sbi_tlb.h
+++ b/include/sbi/sbi_tlb.h
@@ -12,6 +12,7 @@
#define __SBI_TLB_H__
#include <sbi/sbi_types.h>
+#include <sbi/sbi_hartmask.h>
/* clang-format off */
@@ -38,7 +39,7 @@ struct sbi_tlb_info {
unsigned long size;
unsigned long asid;
unsigned long type;
- unsigned long shart_mask;
+ struct sbi_hartmask smask;
};
#define SBI_TLB_INFO_INIT(__ptr, __start, __size, __asid, __type, __src_hart) \
@@ -47,7 +48,7 @@ do { \
(__ptr)->size = (__size); \
(__ptr)->asid = (__asid); \
(__ptr)->type = (__type); \
- (__ptr)->shart_mask = 1UL << (__src_hart); \
+ SBI_HARTMASK_INIT_EXCEPT(&(__ptr)->smask, (__src_hart)); \
} while (0)
#define SBI_TLB_INFO_SIZE sizeof(struct sbi_tlb_info)