[PATCH] sched/cputime: arch_vtime_task_switch() should be declared for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE

From: Changbin Du
Date: Thu Apr 11 2024 - 22:30:32 EST


The arch_vtime_task_switch() is only used by the native vtime accounting
code not the generic one.

Signed-off-by: Changbin Du <changbin.du@xxxxxxxxxx>
---
include/linux/vtime.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/vtime.h b/include/linux/vtime.h
index 005d0870e41b..9f0bad8d8617 100644
--- a/include/linux/vtime.h
+++ b/include/linux/vtime.h
@@ -10,7 +10,6 @@
#endif

#ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
-extern void arch_vtime_task_switch(struct task_struct *tsk);
extern void vtime_user_enter(struct task_struct *tsk);
extern void vtime_user_exit(struct task_struct *tsk);
extern void vtime_guest_enter(struct task_struct *tsk);
@@ -25,6 +24,7 @@ static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { }
#endif

#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
+extern void arch_vtime_task_switch(struct task_struct *tsk);
extern void vtime_account_irq(struct task_struct *tsk, unsigned int offset);
extern void vtime_account_softirq(struct task_struct *tsk);
extern void vtime_account_hardirq(struct task_struct *tsk);
--
2.34.1