From 5fbcd625bc8f8980164b4c905dc8097269461419 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Tue, 17 Mar 2020 07:59:38 -0700 Subject: lib: sbi: Update pmp_get() to return decoded size directly Currently pmp_get() returns the log2 length of the PMP memory region size. The caller has to calculate the size based on that and the same codes are duplicated. Update this function to return decoded size directly. Signed-off-by: Bin Meng Reviewed-by: Atish Patra --- include/sbi/riscv_asm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/sbi/riscv_asm.h b/include/sbi/riscv_asm.h index 0d675f65..6c5c7299 100644 --- a/include/sbi/riscv_asm.h +++ b/include/sbi/riscv_asm.h @@ -191,7 +191,7 @@ int pmp_set(unsigned int n, unsigned long prot, unsigned long addr, unsigned long log2len); int pmp_get(unsigned int n, unsigned long *prot_out, unsigned long *addr_out, - unsigned long *log2len_out); + unsigned long *size); #endif /* !__ASSEMBLY__ */ -- cgit v1.3.1