Commit 09d28165 authored by Gilles Chanteperdrix's avatar Gilles Chanteperdrix Committed by Philippe Gerum
Browse files

arm/ipipe: fix time update with vdso

parent de8f9aa7
......@@ -46,6 +46,7 @@ extern unsigned long arm_return_addr(int level);
#define IPIPE_CORE_RELEASE 1
struct ipipe_domain;
struct timekeeper;
#define IPIPE_TSC_TYPE_NONE 0
#define IPIPE_TSC_TYPE_FREERUNNING 1
......@@ -92,11 +93,13 @@ void __ipipe_mach_get_tscinfo(struct __ipipe_tscinfo *info);
unsigned long long __ipipe_tsc_get(void) __attribute__((long_call));
void __ipipe_tsc_register(struct __ipipe_tscinfo *info);
void __ipipe_tsc_update(void);
void __ipipe_update_vsyscall(struct timekeeper *tk);
extern unsigned long __ipipe_kuser_tsc_freq;
#define __ipipe_hrclock_freq __ipipe_kuser_tsc_freq
#else /* ! generic tsc */
unsigned long long __ipipe_mach_get_tsc(void);
#define __ipipe_tsc_get() __ipipe_mach_get_tsc()
static inline void __ipipe_update_vsyscall(struct timekeeper *tk) {}
#ifndef __ipipe_hrclock_freq
extern unsigned long __ipipe_hrtimer_freq;
#define __ipipe_hrclock_freq __ipipe_hrtimer_freq
......
......@@ -192,12 +192,19 @@ void __ipipe_tsc_update(void)
}
EXPORT_SYMBOL(__ipipe_tsc_get);
void update_vsyscall(struct timekeeper *tk)
void __ipipe_update_vsyscall(struct timekeeper *tk)
{
if (tk->tkr_mono.clock == &clksrc)
ipipe_update_hostrt(tk);
}
#if !IS_ENABLED(CONFIG_VDSO)
void update_vsyscall(struct timekeeper *tk)
{
__ipipe_update_vsyscall(tk);
}
void update_vsyscall_tz(void)
{
}
#endif
......@@ -299,6 +299,8 @@ void update_vsyscall(struct timekeeper *tk)
struct timespec xtime_coarse;
struct timespec64 *wtm = &tk->wall_to_monotonic;
__ipipe_update_vsyscall(tk);
if (!cntvct_ok) {
/* The entry points have been zeroed, so there is no
* point in updating the data page.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment