blob: 799d9dd6f7ccb252addeb4f4d5fb99b94370f5f3 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_ARM64_PARAVIRT_H
3#define _ASM_ARM64_PARAVIRT_H
4
5#ifdef CONFIG_PARAVIRT
6struct static_key;
7extern struct static_key paravirt_steal_enabled;
8extern struct static_key paravirt_steal_rq_enabled;
9
10struct pv_time_ops {
11 unsigned long long (*steal_clock)(int cpu);
12};
David Brazdil0f672f62019-12-10 10:32:29 +000013
14struct paravirt_patch_template {
15 struct pv_time_ops time;
16};
17
18extern struct paravirt_patch_template pv_ops;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000019
20static inline u64 paravirt_steal_clock(int cpu)
21{
David Brazdil0f672f62019-12-10 10:32:29 +000022 return pv_ops.time.steal_clock(cpu);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000023}
24#endif
25
26#endif