diff options
author | Atish Patra <atish.patra@wdc.com> | 2019-03-09 23:57:20 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-03-12 19:37:25 +0300 |
commit | 90cb4917b584b07df3e4037a3b660e9ac28e3384 (patch) | |
tree | 4b4905f9c70c5909d2b642255d542b71fb700710 /lib/sbi_system.c | |
parent | 508a27204cbbca0a9430236e56681e5e0d343fb9 (diff) | |
download | opensbi-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 'lib/sbi_system.c')
-rw-r--r-- | lib/sbi_system.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi_system.c b/lib/sbi_system.c index f23d046..b373828 100644 --- a/lib/sbi_system.c +++ b/lib/sbi_system.c @@ -41,7 +41,7 @@ void __attribute__((noreturn)) sbi_system_shutdown(struct sbi_scratch *scratch, /* If that fails (or is not implemented) send an IPI on every * hart to hang and then hang the current hart */ - sbi_ipi_send_many(scratch, NULL, SBI_IPI_EVENT_HALT); + sbi_ipi_send_many(scratch, NULL, SBI_IPI_EVENT_HALT, NULL); sbi_hart_hang(); } |