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

Commit a03fdb76 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (34 commits)
  time: Prevent 32 bit overflow with set_normalized_timespec()
  clocksource: Delay clocksource down rating to late boot
  clocksource: clocksource_select must be called with mutex locked
  clocksource: Resolve cpu hotplug dead lock with TSC unstable, fix crash
  timers: Drop a function prototype
  clocksource: Resolve cpu hotplug dead lock with TSC unstable
  timer.c: Fix S/390 comments
  timekeeping: Fix invalid getboottime() value
  timekeeping: Fix up read_persistent_clock() breakage on sh
  timekeeping: Increase granularity of read_persistent_clock(), build fix
  time: Introduce CLOCK_REALTIME_COARSE
  x86: Do not unregister PIT clocksource on PIT oneshot setup/shutdown
  clocksource: Avoid clocksource watchdog circular locking dependency
  clocksource: Protect the watchdog rating changes with clocksource_mutex
  clocksource: Call clocksource_change_rating() outside of watchdog_lock
  timekeeping: Introduce read_boot_clock
  timekeeping: Increase granularity of read_persistent_clock()
  timekeeping: Update clocksource with stop_machine
  timekeeping: Add timekeeper read_clock helper functions
  timekeeping: Move NTP adjusted clock multiplier to struct timekeeper
  ...

Fix trivial conflict due to MIPS lemote -> loongson renaming.
parents 202c4675 12e09337
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -253,11 +253,8 @@ static struct clocksource clocksource_32k = {
 */
unsigned long long sched_clock(void)
{
	unsigned long long ret;

	ret = (unsigned long long)clocksource_32k.read(&clocksource_32k);
	ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift;
	return ret;
	return clocksource_cyc2ns(clocksource_32k.read(&clocksource_32k),
				  clocksource_32k.mult, clocksource_32k.shift);
}

static int __init omap_init_clocksource_32k(void)
+3 −2
Original line number Diff line number Diff line
@@ -72,9 +72,10 @@ static unsigned long read_rtc_mmss(void)
	return  mktime(year, mon, day, hour, min, sec);
}

unsigned long read_persistent_clock(void)
void read_persistent_clock(struct timespec *ts)
{
	return read_rtc_mmss();
	ts->tv_sec = read_rtc_mmss();
	ts->tv_nsec = 0;
}

int update_persistent_clock(struct timespec now)
+3 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
#include <asm/dec/ioasic.h>
#include <asm/dec/machtype.h>

unsigned long read_persistent_clock(void)
void read_persistent_clock(struct timespec *ts)
{
	unsigned int year, mon, day, hour, min, sec, real_year;
	unsigned long flags;
@@ -53,7 +53,8 @@ unsigned long read_persistent_clock(void)

	year += real_year - 72 + 2000;

	return mktime(year, mon, day, hour, min, sec);
	ts->tv_sec = mktime(year, mon, day, hour, min, sec);
	ts->tv_nsec = 0;
}

/*
+3 −2
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ static void rtc_end_op(void)
	lasat_ndelay(1000);
}

unsigned long read_persistent_clock(void)
void read_persistent_clock(struct timespec *ts)
{
	unsigned long word;
	unsigned long flags;
@@ -147,7 +147,8 @@ unsigned long read_persistent_clock(void)
	rtc_end_op();
	spin_unlock_irqrestore(&rtc_lock, flags);

	return word;
	ts->tv_sec = word;
	ts->tv_nsec = 0;
}

int rtc_mips_set_mmss(unsigned long time)
+6 −2
Original line number Diff line number Diff line
@@ -92,10 +92,12 @@ static int rtctmp;
int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
		       void *buffer, size_t *lenp, loff_t *ppos)
{
	struct timespec ts;
	int r;

	if (!write) {
		rtctmp = read_persistent_clock();
		read_persistent_clock(&ts);
		rtctmp = ts.tv_sec;
		/* check for time < 0 and set to 0 */
		if (rtctmp < 0)
			rtctmp = 0;
@@ -134,9 +136,11 @@ int sysctl_lasat_rtc(ctl_table *table,
		    void *oldval, size_t *oldlenp,
		    void *newval, size_t newlen)
{
	struct timespec ts;
	int r;

	rtctmp = read_persistent_clock();
	read_persistent_clock(&ts);
	rtctmp = ts.tv_sec;
	if (rtctmp < 0)
		rtctmp = 0;
	r = sysctl_intvec(table, oldval, oldlenp, newval, newlen);
Loading