mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
Paravirt clock related functions are available in multiple archs. In order to share the common parts, move the common static keys to kernel/sched/ and remove them from the arch specific files. Make a common paravirt_steal_clock() implementation available in kernel/sched/cputime.c, guarding it with a new config option CONFIG_HAVE_PV_STEAL_CLOCK_GEN, which can be selected by an arch in case it wants to use that common variant. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260105110520.21356-7-jgross@suse.com
18 lines
356 B
C
18 lines
356 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_ARM_PARAVIRT_H
|
|
#define _ASM_ARM_PARAVIRT_H
|
|
|
|
#ifdef CONFIG_PARAVIRT
|
|
#include <linux/static_call_types.h>
|
|
|
|
u64 dummy_steal_clock(int cpu);
|
|
|
|
DECLARE_STATIC_CALL(pv_steal_clock, dummy_steal_clock);
|
|
|
|
static inline u64 paravirt_steal_clock(int cpu)
|
|
{
|
|
return static_call(pv_steal_clock)(cpu);
|
|
}
|
|
#endif
|
|
|
|
#endif
|