summaryrefslogtreecommitdiff
path: root/kernel/time/vsyscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time/vsyscall.c')
-rw-r--r--kernel/time/vsyscall.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/time/vsyscall.c b/kernel/time/vsyscall.c
index 88e6b8ed6ca5..05d383143165 100644
--- a/kernel/time/vsyscall.c
+++ b/kernel/time/vsyscall.c
@@ -22,10 +22,16 @@ static inline void update_vdso_data(struct vdso_data *vdata,
u64 nsec, sec;
vdata[CS_HRES_COARSE].cycle_last = tk->tkr_mono.cycle_last;
+#ifdef CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT
+ vdata[CS_HRES_COARSE].max_cycles = tk->tkr_mono.clock->max_cycles;
+#endif
vdata[CS_HRES_COARSE].mask = tk->tkr_mono.mask;
vdata[CS_HRES_COARSE].mult = tk->tkr_mono.mult;
vdata[CS_HRES_COARSE].shift = tk->tkr_mono.shift;
vdata[CS_RAW].cycle_last = tk->tkr_raw.cycle_last;
+#ifdef CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT
+ vdata[CS_RAW].max_cycles = tk->tkr_raw.clock->max_cycles;
+#endif
vdata[CS_RAW].mask = tk->tkr_raw.mask;
vdata[CS_RAW].mult = tk->tkr_raw.mult;
vdata[CS_RAW].shift = tk->tkr_raw.shift;
@@ -108,12 +114,12 @@ void update_vsyscall(struct timekeeper *tk)
/*
* If the current clocksource is not VDSO capable, then spare the
- * update of the high reolution parts.
+ * update of the high resolution parts.
*/
if (clock_mode != VDSO_CLOCKMODE_NONE)
update_vdso_data(vdata, tk);
- __arch_update_vsyscall(vdata, tk);
+ __arch_update_vsyscall(vdata);
vdso_write_end(vdata);
@@ -145,9 +151,8 @@ void update_vsyscall_tz(void)
unsigned long vdso_update_begin(void)
{
struct vdso_data *vdata = __arch_get_k_vdso_data();
- unsigned long flags;
+ unsigned long flags = timekeeper_lock_irqsave();
- raw_spin_lock_irqsave(&timekeeper_lock, flags);
vdso_write_begin(vdata);
return flags;
}
@@ -166,5 +171,5 @@ void vdso_update_end(unsigned long flags)
vdso_write_end(vdata);
__arch_sync_vdso_data(vdata);
- raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
+ timekeeper_unlock_irqrestore(flags);
}
m netdev listenerIdo Schimmel 2020-02-22mlxsw: spectrum_dpipe: Take router lock from dpipe codeIdo Schimmel 2020-02-22mlxsw: spectrum_router: Take router lock from inside routing codeIdo Schimmel 2020-02-22mlxsw: spectrum_router: Introduce router lockIdo Schimmel 2020-02-22mlxsw: spectrum_router: Store NVE decapsulation configuration in routerIdo Schimmel 2020-02-22mlxsw: spectrum_router: Expose router struct to internal usersIdo Schimmel 2020-02-22mlxsw: spectrum_mr: Protect multicast route list with a lockIdo Schimmel 2020-02-22mlxsw: spectrum_mr: Protect multicast table list with a lockIdo Schimmel 2020-02-22mlxsw: spectrum_mr: Publish multicast route after writing it to the deviceIdo Schimmel 2020-02-21net/mlx5: Add fsm_reactivate callback supportEran Ben Elisha 2020-02-21net/mlxfw: Add reactivate flow support to FSM burn flowEran Ben Elisha 2020-02-21net/mlxfw: Use MLXFW_ERR_MSG macro for error reportingSaeed Mahameed 2020-02-21net/mlxfw: Convert pr_* to dev_* in mlxfw_fsm.cSaeed Mahameed 2020-02-21net/mlxfw: More error messages coverageSaeed Mahameed 2020-02-21net/mlxfw: Improve FSM err message reporting and return codesSaeed Mahameed 2020-02-21net/mlxfw: Generic mlx FW flash status notifySaeed Mahameed