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/arm/include | |
parent | 6ea312d95e0226b306bb4b8ee3a0727d880378cb (diff) |
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/arm/include')
-rw-r--r-- | arch/arm/include/asm/paravirt.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/arm/include/asm/paravirt.h b/arch/arm/include/asm/paravirt.h index cdbf02d9c1d4..95d5b0d625cd 100644 --- a/arch/arm/include/asm/paravirt.h +++ b/arch/arm/include/asm/paravirt.h @@ -3,23 +3,19 @@ #define _ASM_ARM_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); } #endif |