Skip to content

Commit c60b0c2

Browse files
committed
arm64: Fix the update_vsyscall() prototype
With commit 576094b (time: Introduce new GENERIC_TIME_VSYSCALL) the old update_vsyscall() prototype is no longer available. This patch updates the arm64 port. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Cc: John Stultz <john.stultz@linaro.org>
1 parent fea2aca commit c60b0c2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

arch/arm64/kernel/vdso.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <linux/sched.h>
2929
#include <linux/signal.h>
3030
#include <linux/slab.h>
31+
#include <linux/timekeeper_internal.h>
3132
#include <linux/vmalloc.h>
3233

3334
#include <asm/cacheflush.h>
@@ -222,11 +223,10 @@ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
222223
/*
223224
* Update the vDSO data page to keep in sync with kernel timekeeping.
224225
*/
225-
void update_vsyscall(struct timespec *ts, struct timespec *wtm,
226-
struct clocksource *clock, u32 mult)
226+
void update_vsyscall(struct timekeeper *tk)
227227
{
228228
struct timespec xtime_coarse;
229-
u32 use_syscall = strcmp(clock->name, "arch_sys_counter");
229+
u32 use_syscall = strcmp(tk->clock->name, "arch_sys_counter");
230230

231231
++vdso_data->tb_seq_count;
232232
smp_wmb();
@@ -237,13 +237,13 @@ void update_vsyscall(struct timespec *ts, struct timespec *wtm,
237237
vdso_data->xtime_coarse_nsec = xtime_coarse.tv_nsec;
238238

239239
if (!use_syscall) {
240-
vdso_data->cs_cycle_last = clock->cycle_last;
241-
vdso_data->xtime_clock_sec = ts->tv_sec;
242-
vdso_data->xtime_clock_nsec = ts->tv_nsec;
243-
vdso_data->cs_mult = mult;
244-
vdso_data->cs_shift = clock->shift;
245-
vdso_data->wtm_clock_sec = wtm->tv_sec;
246-
vdso_data->wtm_clock_nsec = wtm->tv_nsec;
240+
vdso_data->cs_cycle_last = tk->clock->cycle_last;
241+
vdso_data->xtime_clock_sec = tk->xtime_sec;
242+
vdso_data->xtime_clock_nsec = tk->xtime_nsec >> tk->shift;
243+
vdso_data->cs_mult = tk->mult;
244+
vdso_data->cs_shift = tk->shift;
245+
vdso_data->wtm_clock_sec = tk->wall_to_monotonic.tv_sec;
246+
vdso_data->wtm_clock_nsec = tk->wall_to_monotonic.tv_nsec;
247247
}
248248

249249
smp_wmb();

0 commit comments

Comments
 (0)