Skip to contentSkip to conversation

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

PATCH New Changbin Du 1 participant 1 message Apr 12, 2024

lore
Share & tools
lore
#0 lore raw

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

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

---
 include/linux/vtime.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/vtime.h +1 -1
index 005d0870e41b..9f0bad8d8617 100644
@@ -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);
Signature · 1 line
2.34.1