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

Commit bcd55074 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull timer core updates from Thomas Gleixner.

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  ia64: vsyscall: Add missing paranthesis
  alarmtimer: Don't call rtc_timer_init() when CONFIG_RTC_CLASS=n
  x86: vdso: Put declaration before code
  x86-64: Inline vdso clock_gettime helpers
  x86-64: Simplify and optimize vdso clock_gettime monotonic variants
  kernel-time: fix s/then/than/ spelling errors
  time: remove no_sync_cmos_clock
  time: Avoid scary backtraces when warning of > 11% adj
  alarmtimer: Make sure we initialize the rtctimer
  ntp: Fix leap-second hrtimer livelock
  x86, tsc: Skip refined tsc calibration on systems with reliable TSC
  rtc: Provide flag for rtc devices that don't support UIE
  ia64: vsyscall: Use seqcount instead of seqlock
  x86: vdso: Use seqcount instead of seqlock
  x86: vdso: Remove bogus locking in update_vsyscall_tz()
  time: Remove bogus comments
  time: Fix change_clocksource locking
  time: x86: Fix race switching from vsyscall to non-vsyscall clock
parents 93f37888 646783a3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -269,8 +269,8 @@ void foo(void)
	BLANK();

	/* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */
	DEFINE(IA64_GTOD_LOCK_OFFSET,
		offsetof (struct fsyscall_gtod_data_t, lock));
	DEFINE(IA64_GTOD_SEQ_OFFSET,
	       offsetof (struct fsyscall_gtod_data_t, seq));
	DEFINE(IA64_GTOD_WALL_TIME_OFFSET,
		offsetof (struct fsyscall_gtod_data_t, wall_time));
	DEFINE(IA64_GTOD_MONO_TIME_OFFSET,
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ ENTRY(fsys_set_tid_address)
	FSYS_RETURN
END(fsys_set_tid_address)

#if IA64_GTOD_LOCK_OFFSET !=0
#if IA64_GTOD_SEQ_OFFSET !=0
#error fsys_gettimeofday incompatible with changes to struct fsyscall_gtod_data_t
#endif
#if IA64_ITC_JITTER_OFFSET !=0
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
 */

struct fsyscall_gtod_data_t {
	seqlock_t	lock;
	seqcount_t	seq;
	struct timespec	wall_time;
	struct timespec monotonic_time;
	cycle_t		clk_mask;
+3 −7
Original line number Diff line number Diff line
@@ -34,9 +34,7 @@

static cycle_t itc_get_cycles(struct clocksource *cs);

struct fsyscall_gtod_data_t fsyscall_gtod_data = {
	.lock = __SEQLOCK_UNLOCKED(fsyscall_gtod_data.lock),
};
struct fsyscall_gtod_data_t fsyscall_gtod_data;

struct itc_jitter_data_t itc_jitter_data;

@@ -459,9 +457,7 @@ void update_vsyscall_tz(void)
void update_vsyscall(struct timespec *wall, struct timespec *wtm,
			struct clocksource *c, u32 mult)
{
        unsigned long flags;

        write_seqlock_irqsave(&fsyscall_gtod_data.lock, flags);
	write_seqcount_begin(&fsyscall_gtod_data.seq);

        /* copy fsyscall clock data */
        fsyscall_gtod_data.clk_mask = c->mask;
@@ -484,6 +480,6 @@ void update_vsyscall(struct timespec *wall, struct timespec *wtm,
		fsyscall_gtod_data.monotonic_time.tv_sec++;
	}

        write_sequnlock_irqrestore(&fsyscall_gtod_data.lock, flags);
	write_seqcount_end(&fsyscall_gtod_data.seq);
}
+10 −7
Original line number Diff line number Diff line
@@ -5,13 +5,8 @@
#include <linux/clocksource.h>

struct vsyscall_gtod_data {
	seqlock_t	lock;
	seqcount_t	seq;

	/* open coded 'struct timespec' */
	time_t		wall_time_sec;
	u32		wall_time_nsec;

	struct timezone sys_tz;
	struct { /* extract of a clocksource struct */
		int vclock_mode;
		cycle_t	cycle_last;
@@ -19,8 +14,16 @@ struct vsyscall_gtod_data {
		u32	mult;
		u32	shift;
	} clock;
	struct timespec wall_to_monotonic;

	/* open coded 'struct timespec' */
	time_t		wall_time_sec;
	u32		wall_time_nsec;
	u32		monotonic_time_nsec;
	time_t		monotonic_time_sec;

	struct timezone sys_tz;
	struct timespec wall_time_coarse;
	struct timespec monotonic_time_coarse;
};
extern struct vsyscall_gtod_data vsyscall_gtod_data;

Loading