Fixed time processing.

- arm64: Get TSC corresponding to boot time from IHK.

- x86_64: Calculate the current time using vdso.

Refs: #1186
Fujitsu: POSTK_DEBUG_ARCH_DEP_52
Change-Id: I293ba4bbe5390d50dea44b8a5b7471f59237daff
This commit is contained in:
Tomoki Shirasawa
2019-02-17 16:37:29 +09:00
committed by Masamichi Takagi
parent 07aa96ef95
commit 5bc54a3bbe
15 changed files with 471 additions and 88 deletions

View File

@ -42,7 +42,6 @@ int arch_symbols_init(void)
}
#ifdef POSTK_DEBUG_ARCH_DEP_52
#define VDSO_MAXPAGES 1
struct vdso {
long busy;
@ -53,7 +52,6 @@ struct vdso {
long lbase;
long offset_sigtramp;
};
#endif /*POSTK_DEBUG_ARCH_DEP_52*/
unsigned long
reserve_user_space_common(struct mcctrl_usrdata *usrdata, unsigned long start, unsigned long end);

View File

@ -2,9 +2,13 @@
#include <linux/version.h>
#include <linux/kallsyms.h>
#include <linux/uaccess.h>
#include <asm/vsyscall.h>
#include <asm/vgtod.h>
#include "config.h"
#include "../../mcctrl.h"
#define gtod (&VVAR(vsyscall_gtod_data))
//#define SC_DEBUG
#ifdef SC_DEBUG
@ -54,7 +58,6 @@ int arch_symbols_init(void)
}
#ifdef POSTK_DEBUG_ARCH_DEP_52
#define VDSO_MAXPAGES 2
struct vdso {
long busy;
@ -70,8 +73,8 @@ struct vdso {
long hpet_phys;
void *pvti_virt;
long pvti_phys;
void *vgtod_virt;
};
#endif /*POSTK_DEBUG_ARCH_DEP_52*/
unsigned long
reserve_user_space_common(struct mcctrl_usrdata *usrdata, unsigned long start, unsigned long end);
@ -207,6 +210,7 @@ void get_vdso_info(ihk_os_t os, long vdso_rpa)
#endif
}
vdso->vgtod_virt = (void *)gtod;
out:
wmb();
vdso->busy = 0;

View File

@ -526,24 +526,6 @@ void reply_get_cpu_mapping(long req_pa);
void free_topology_info(ihk_os_t os);
/* archdep.c */
#ifndef POSTK_DEBUG_ARCH_DEP_52
#define VDSO_MAXPAGES 2
struct vdso {
long busy;
int vdso_npages;
char vvar_is_global;
char hpet_is_global;
char pvti_is_global;
char padding;
long vdso_physlist[VDSO_MAXPAGES];
void *vvar_virt;
long vvar_phys;
void *hpet_virt;
long hpet_phys;
void *pvti_virt;
long pvti_phys;
};
#endif /*POSTK_DEBUG_ARCH_DEP_52*/
int reserve_user_space(struct mcctrl_usrdata *usrdata, unsigned long *startp,
unsigned long *endp);