Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f4b37d8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
 "A few fixes for timekeeping and timers:

   - Plug a subtle race due to a missing READ_ONCE() in the timekeeping
     code where reloading of a pointer results in an inconsistent
     callback argument being supplied to the clocksource->read function.

   - Correct the CLOCK_MONOTONIC_RAW sub-nanosecond accounting in the
     time keeping core code, to prevent a possible discontuity.

   - Apply a similar fix to the arm64 vdso clock_gettime()
     implementation

   - Add missing includes to clocksource drivers, which relied on
     indirect includes which fails in certain configs.

   - Use the proper iomem pointer for read/iounmap in a probe function"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW
  time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting
  time: Fix clock->read(clock) race around clocksource changes
  clocksource: Explicitly include linux/clocksource.h when needed
  clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable
parents 35d8d5d4 8e6cec1c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -221,10 +221,11 @@ void update_vsyscall(struct timekeeper *tk)
		/* tkr_mono.cycle_last == tkr_raw.cycle_last */
		vdso_data->cs_cycle_last	= tk->tkr_mono.cycle_last;
		vdso_data->raw_time_sec		= tk->raw_time.tv_sec;
		vdso_data->raw_time_nsec	= tk->raw_time.tv_nsec;
		vdso_data->raw_time_nsec	= (tk->raw_time.tv_nsec <<
						   tk->tkr_raw.shift) +
						  tk->tkr_raw.xtime_nsec;
		vdso_data->xtime_clock_sec	= tk->xtime_sec;
		vdso_data->xtime_clock_nsec	= tk->tkr_mono.xtime_nsec;
		/* tkr_raw.xtime_nsec == 0 */
		vdso_data->cs_mono_mult		= tk->tkr_mono.mult;
		vdso_data->cs_raw_mult		= tk->tkr_raw.mult;
		/* tkr_mono.shift == tkr_raw.shift */
+0 −1
Original line number Diff line number Diff line
@@ -256,7 +256,6 @@ monotonic_raw:
	seqcnt_check fail=monotonic_raw

	/* All computations are done with left-shifted nsecs. */
	lsl	x14, x14, x12
	get_nsec_per_sec res=x9
	lsl	x9, x9, x12

+2 −2
Original line number Diff line number Diff line
@@ -1209,9 +1209,9 @@ arch_timer_mem_frame_get_cntfrq(struct arch_timer_mem_frame *frame)
		return 0;
	}

	rate = readl_relaxed(frame + CNTFRQ);
	rate = readl_relaxed(base + CNTFRQ);

	iounmap(frame);
	iounmap(base);

	return rate;
}
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/clockchips.h>
#include <linux/clocksource.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/slab.h>
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

#include <linux/clk.h>
#include <linux/clockchips.h>
#include <linux/clocksource.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
Loading