aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-11-01 12:43:08 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2024-11-01 12:48:17 +0200
commit6d30470de8ba82d2d01fc9ea1860c7e15aa44adf (patch)
tree13f1c13d8845b8237d21eea64fe708b9ff042031 /arch/riscv64
parent3a6dd24312f1fc8eea9f2b8b25daca808a35828f (diff)
downloadkmi-6d30470de8ba82d2d01fc9ea1860c7e15aa44adf.tar.gz
kmi-6d30470de8ba82d2d01fc9ea1860c7e15aa44adf.zip
mark some hot path functions inline
+ Gives a hint to the LTO optimizer to more agressively inline the functions, seems to bring a slight performance increase
Diffstat (limited to 'arch/riscv64')
-rw-r--r--arch/riscv64/kernel/vmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv64/kernel/vmem.c b/arch/riscv64/kernel/vmem.c
index a215208..5a6e71c 100644
--- a/arch/riscv64/kernel/vmem.c
+++ b/arch/riscv64/kernel/vmem.c
@@ -690,7 +690,7 @@ void reuse_rpc(struct tcb *t)
set_bits(*pte, vp_flags(VM_U));
}
-void new_rpc(struct tcb *t)
+inline void new_rpc(struct tcb *t)
{
struct vmem *b = t->arch.rpc_leaf;
int top_idx = t->arch.rpc_idx;
@@ -716,7 +716,7 @@ void new_rpc(struct tcb *t)
set_bits(*pte, vp_flags(VM_U));
}
-void destroy_rpc(struct tcb *t)
+inline void destroy_rpc(struct tcb *t)
{
struct vmem *b = t->arch.rpc_leaf;
int top_idx = t->arch.rpc_idx;
@@ -750,7 +750,7 @@ void destroy_rpc(struct tcb *t)
t->arch.rpc_idx = ctx - 2;
}
-void grow_rpc(struct tcb *t, vm_t top)
+inline void grow_rpc(struct tcb *t, vm_t top)
{
assert(is_aligned(top, BASE_PAGE_SIZE));
struct vmem *b = t->arch.rpc_leaf;