diff options
| author | Xiang W <[email protected]> | 2023-09-06 21:10:03 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-09-10 11:21:05 +0530 |
| commit | cacfba32cc9541b7b9f838df43c1f2bd43222d3a (patch) | |
| tree | 5b38c9301bee234437581f4c8603a496e2165066 /lib | |
| parent | 901d3d7bff5a511b5f320aad8a0d65e79c95d09c (diff) | |
platform: Allow platforms to specify the size of tlb fifo
For some platforms with a particularly high number of harts, if the
tlb fifo is too small, it case harts to wait. Platforms should be
allowed to specify the size of the tlb fifo.
Signed-off-by: Xiang W <[email protected]>
Signed-off-by: Xing Xiaoguang <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sbi/sbi_tlb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sbi/sbi_tlb.c b/lib/sbi/sbi_tlb.c index 26a87f32..92648da0 100644 --- a/lib/sbi/sbi_tlb.c +++ b/lib/sbi/sbi_tlb.c @@ -422,7 +422,7 @@ int sbi_tlb_init(struct sbi_scratch *scratch, bool cold_boot) return SBI_ENOMEM; } tlb_fifo_mem_off = sbi_scratch_alloc_offset( - SBI_TLB_FIFO_NUM_ENTRIES * SBI_TLB_INFO_SIZE); + sbi_platform_tlb_fifo_num_entries(plat) * SBI_TLB_INFO_SIZE); if (!tlb_fifo_mem_off) { sbi_scratch_free_offset(tlb_fifo_off); sbi_scratch_free_offset(tlb_sync_off); @@ -453,7 +453,7 @@ int sbi_tlb_init(struct sbi_scratch *scratch, bool cold_boot) ATOMIC_INIT(tlb_sync, 0); sbi_fifo_init(tlb_q, tlb_mem, - SBI_TLB_FIFO_NUM_ENTRIES, SBI_TLB_INFO_SIZE); + sbi_platform_tlb_fifo_num_entries(plat), SBI_TLB_INFO_SIZE); return 0; } |
