|
|
@@ -73,6 +73,13 @@ x_tmp .req x8
|
|
|
movn x_tmp, #0xff00, lsl #48
|
|
|
and \res, x_tmp, \res
|
|
|
mul \res, \res, \mult
|
|
|
+ /*
|
|
|
+ * Fake address dependency from the value computed from the counter
|
|
|
+ * register to subsequent data page accesses so that the sequence
|
|
|
+ * locking also orders the read of the counter.
|
|
|
+ */
|
|
|
+ and x_tmp, \res, xzr
|
|
|
+ add vdso_data, vdso_data, x_tmp
|
|
|
.endm
|
|
|
|
|
|
/*
|
|
|
@@ -147,12 +154,12 @@ ENTRY(__kernel_gettimeofday)
|
|
|
/* w11 = cs_mono_mult, w12 = cs_shift */
|
|
|
ldp w11, w12, [vdso_data, #VDSO_CS_MONO_MULT]
|
|
|
ldp x13, x14, [vdso_data, #VDSO_XTIME_CLK_SEC]
|
|
|
- seqcnt_check fail=1b
|
|
|
|
|
|
get_nsec_per_sec res=x9
|
|
|
lsl x9, x9, x12
|
|
|
|
|
|
get_clock_shifted_nsec res=x15, cycle_last=x10, mult=x11
|
|
|
+ seqcnt_check fail=1b
|
|
|
get_ts_realtime res_sec=x10, res_nsec=x11, \
|
|
|
clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9
|
|
|
|
|
|
@@ -211,13 +218,13 @@ realtime:
|
|
|
/* w11 = cs_mono_mult, w12 = cs_shift */
|
|
|
ldp w11, w12, [vdso_data, #VDSO_CS_MONO_MULT]
|
|
|
ldp x13, x14, [vdso_data, #VDSO_XTIME_CLK_SEC]
|
|
|
- seqcnt_check fail=realtime
|
|
|
|
|
|
/* All computations are done with left-shifted nsecs. */
|
|
|
get_nsec_per_sec res=x9
|
|
|
lsl x9, x9, x12
|
|
|
|
|
|
get_clock_shifted_nsec res=x15, cycle_last=x10, mult=x11
|
|
|
+ seqcnt_check fail=realtime
|
|
|
get_ts_realtime res_sec=x10, res_nsec=x11, \
|
|
|
clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9
|
|
|
clock_gettime_return, shift=1
|
|
|
@@ -231,7 +238,6 @@ monotonic:
|
|
|
ldp w11, w12, [vdso_data, #VDSO_CS_MONO_MULT]
|
|
|
ldp x13, x14, [vdso_data, #VDSO_XTIME_CLK_SEC]
|
|
|
ldp x3, x4, [vdso_data, #VDSO_WTM_CLK_SEC]
|
|
|
- seqcnt_check fail=monotonic
|
|
|
|
|
|
/* All computations are done with left-shifted nsecs. */
|
|
|
lsl x4, x4, x12
|
|
|
@@ -239,6 +245,7 @@ monotonic:
|
|
|
lsl x9, x9, x12
|
|
|
|
|
|
get_clock_shifted_nsec res=x15, cycle_last=x10, mult=x11
|
|
|
+ seqcnt_check fail=monotonic
|
|
|
get_ts_realtime res_sec=x10, res_nsec=x11, \
|
|
|
clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9
|
|
|
|
|
|
@@ -253,13 +260,13 @@ monotonic_raw:
|
|
|
/* w11 = cs_raw_mult, w12 = cs_shift */
|
|
|
ldp w12, w11, [vdso_data, #VDSO_CS_SHIFT]
|
|
|
ldp x13, x14, [vdso_data, #VDSO_RAW_TIME_SEC]
|
|
|
- seqcnt_check fail=monotonic_raw
|
|
|
|
|
|
/* All computations are done with left-shifted nsecs. */
|
|
|
get_nsec_per_sec res=x9
|
|
|
lsl x9, x9, x12
|
|
|
|
|
|
get_clock_shifted_nsec res=x15, cycle_last=x10, mult=x11
|
|
|
+ seqcnt_check fail=monotonic_raw
|
|
|
get_ts_clock_raw res_sec=x10, res_nsec=x11, \
|
|
|
clock_nsec=x15, nsec_to_sec=x9
|
|
|
|