mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 04:57:24 +07:00
5c83511bdb
Instead of using six globally visible paravirt ops structures combine them in a single structure, keeping the original structures as sub-structures. This avoids the need to assemble struct paravirt_patch_template at runtime on the stack each time apply_paravirt() is being called (i.e. when loading a module). [ tglx: Made the struct and the initializer tabular for readability sake ] Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-9-jgross@suse.com
27 lines
529 B
C
27 lines
529 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_ARM64_PARAVIRT_H
|
|
#define _ASM_ARM64_PARAVIRT_H
|
|
|
|
#ifdef CONFIG_PARAVIRT
|
|
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;
|
|
};
|
|
|
|
extern struct paravirt_patch_template pv_ops;
|
|
|
|
static inline u64 paravirt_steal_clock(int cpu)
|
|
{
|
|
return pv_ops.time.steal_clock(cpu);
|
|
}
|
|
#endif
|
|
|
|
#endif
|