diff options
author | Juergen Gross <jgross@suse.com> | 2021-03-11 15:23:09 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-03-11 16:17:52 +0100 |
commit | a0e2bf7cb7006b5a58ee81f4da4fe575875f2781 (patch) | |
tree | 74da4d815e17d058066f7d615e0b6c462b155f71 /arch/arm64/include/asm/paravirt.h | |
parent | static_call: Add function to query current function (diff) | |
download | linux-a0e2bf7cb7006b5a58ee81f4da4fe575875f2781.tar.xz linux-a0e2bf7cb7006b5a58ee81f4da4fe575875f2781.zip |
x86/paravirt: Switch time pvops functions to use static_call()
The time pvops functions are the only ones left which might be
used in 32-bit mode and which return a 64-bit value.
Switch them to use the static_call() mechanism instead of pvops, as
this allows quite some simplification of the pvops implementation.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210311142319.4723-5-jgross@suse.com
Diffstat (limited to 'arch/arm64/include/asm/paravirt.h')
-rw-r--r-- | arch/arm64/include/asm/paravirt.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/arm64/include/asm/paravirt.h b/arch/arm64/include/asm/paravirt.h index cf3a0fd7c1a7..9aa193e0e8f2 100644 --- a/arch/arm64/include/asm/paravirt.h +++ b/arch/arm64/include/asm/paravirt.h @@ -3,23 +3,19 @@ #define _ASM_ARM64_PARAVIRT_H #ifdef CONFIG_PARAVIRT +#include <linux/static_call_types.h> + struct static_key; extern struct static_key paravirt_steal_enabled; extern struct static_key paravirt_steal_rq_enabled; -struct pv_time_ops { - unsigned long long (*steal_clock)(int cpu); -}; - -struct paravirt_patch_template { - struct pv_time_ops time; -}; +u64 dummy_steal_clock(int cpu); -extern struct paravirt_patch_template pv_ops; +DECLARE_STATIC_CALL(pv_steal_clock, dummy_steal_clock); static inline u64 paravirt_steal_clock(int cpu) { - return pv_ops.time.steal_clock(cpu); + return static_call(pv_steal_clock)(cpu); } int __init pv_time_init(void); |