diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2012-11-27 23:28:55 -0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-11-27 23:29:09 -0200 |
commit | 71056ae22d43f58d7e0f793af18ace2eaf5b74eb (patch) | |
tree | 02433f7fac25fbbb18405a0fe7a2b5f9925d3610 /arch/x86/include/asm/pvclock.h | |
parent | 582b336ec2c0f0076f5650a029fcc9abd4a906f7 (diff) | |
download | blackbird-op-linux-71056ae22d43f58d7e0f793af18ace2eaf5b74eb.tar.gz blackbird-op-linux-71056ae22d43f58d7e0f793af18ace2eaf5b74eb.zip |
x86: pvclock: generic pvclock vsyscall initialization
Originally from Jeremy Fitzhardinge.
Introduce generic, non hypervisor specific, pvclock initialization
routines.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/pvclock.h')
-rw-r--r-- | arch/x86/include/asm/pvclock.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h index 63f91679af73..109a9dd5d454 100644 --- a/arch/x86/include/asm/pvclock.h +++ b/arch/x86/include/asm/pvclock.h @@ -91,4 +91,16 @@ unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src, return version; } +struct pvclock_vsyscall_time_info { + struct pvclock_vcpu_time_info pvti; + u32 migrate_count; +} __attribute__((__aligned__(SMP_CACHE_BYTES))); + +#define PVTI_SIZE sizeof(struct pvclock_vsyscall_time_info) +#define PVCLOCK_VSYSCALL_NR_PAGES (((NR_CPUS-1)/(PAGE_SIZE/PVTI_SIZE))+1) + +int __init pvclock_init_vsyscall(struct pvclock_vsyscall_time_info *i, + int size); +struct pvclock_vcpu_time_info *pvclock_get_vsyscall_time_info(int cpu); + #endif /* _ASM_X86_PVCLOCK_H */ |