summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_hart.h
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-03-12 07:51:25 +0300
committerAnup Patel <anup@brainfault.org>2020-03-13 09:52:02 +0300
commit823345ecaed0deb7770d9bac1c881004a6410e91 (patch)
treee3b71fb186be4bebd610e796cc12f2d3f33424e6 /include/sbi/sbi_hart.h
parent16e7071f6ddd5ba69d416b5a68e4aa191fc19d3b (diff)
downloadopensbi-823345ecaed0deb7770d9bac1c881004a6410e91.tar.xz
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 <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include/sbi/sbi_hart.h')
-rw-r--r--include/sbi/sbi_hart.h2
1 files changed, 0 insertions, 2 deletions
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