From 823345ecaed0deb7770d9bac1c881004a6410e91 Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Thu, 12 Mar 2020 10:21:25 +0530 Subject: include: Make sbi_current_hartid() as macro in riscv_asm.h The sbi_current_hartid() being a regular function is quite expensive because for callers it is a function call instead of a direct CSR read. This patch converts sbi_current_hartid() into a macro in riscv_asm.h. Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- include/sbi/sbi_hart.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/sbi/sbi_hart.h') diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index d91e58f..fb4a955 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -32,6 +32,4 @@ sbi_hart_switch_mode(unsigned long arg0, unsigned long arg1, unsigned long next_addr, unsigned long next_mode, bool next_virt); -u32 sbi_current_hartid(void); - #endif -- cgit v1.2.3