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

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

Merge branch 'timers-for-linus-urgent' of...

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

* 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer: Fix /proc/timer_list regression
  itimers: Fix racy writes to cpu_itimer fields
  timekeeping: Fix clock_gettime vsyscall time warp
parents 60d8ce2c 8629ea2e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -473,7 +473,7 @@ void update_vsyscall_tz(void)
{
}

void update_vsyscall(struct timespec *wall, struct clocksource *c)
void update_vsyscall(struct timespec *wall, struct clocksource *c, u32 mult)
{
        unsigned long flags;

@@ -481,7 +481,7 @@ void update_vsyscall(struct timespec *wall, struct clocksource *c)

        /* copy fsyscall clock data */
        fsyscall_gtod_data.clk_mask = c->mask;
        fsyscall_gtod_data.clk_mult = c->mult;
        fsyscall_gtod_data.clk_mult = mult;
        fsyscall_gtod_data.clk_shift = c->shift;
        fsyscall_gtod_data.clk_fsys_mmio = c->fsys_mmio;
        fsyscall_gtod_data.clk_cycle_last = c->cycle_last;
+3 −2
Original line number Diff line number Diff line
@@ -834,7 +834,8 @@ static cycle_t timebase_read(struct clocksource *cs)
	return (cycle_t)get_tb();
}

void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
		     u32 mult)
{
	u64 t2x, stamp_xsec;

@@ -847,7 +848,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)

	/* XXX this assumes clock->shift == 22 */
	/* 4611686018 ~= 2^(20+64-22) / 1e9 */
	t2x = (u64) clock->mult * 4611686018ULL;
	t2x = (u64) mult * 4611686018ULL;
	stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC;
	do_div(stamp_xsec, 1000000000);
	stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC;
+2 −1
Original line number Diff line number Diff line
@@ -214,7 +214,8 @@ struct clocksource * __init clocksource_default_clock(void)
	return &clocksource_tod;
}

void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
		     u32 mult)
{
	if (clock != &clocksource_tod)
		return;
+3 −2
Original line number Diff line number Diff line
@@ -73,7 +73,8 @@ void update_vsyscall_tz(void)
	write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags);
}

void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
		     u32 mult)
{
	unsigned long flags;

@@ -82,7 +83,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
	vsyscall_gtod_data.clock.vread = clock->vread;
	vsyscall_gtod_data.clock.cycle_last = clock->cycle_last;
	vsyscall_gtod_data.clock.mask = clock->mask;
	vsyscall_gtod_data.clock.mult = clock->mult;
	vsyscall_gtod_data.clock.mult = mult;
	vsyscall_gtod_data.clock.shift = clock->shift;
	vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec;
	vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;
+4 −2
Original line number Diff line number Diff line
@@ -292,10 +292,12 @@ clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec)
}

#ifdef CONFIG_GENERIC_TIME_VSYSCALL
extern void update_vsyscall(struct timespec *ts, struct clocksource *c);
extern void
update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult);
extern void update_vsyscall_tz(void);
#else
static inline void update_vsyscall(struct timespec *ts, struct clocksource *c)
static inline void
update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult)
{
}

Loading