You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'timers-for-linus-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: avr32: Fix typo in read_persistent_clock() sparc: Convert sparc to use read/update_persistent_clock cris: Convert cris to use read/update_persistent_clock m68k: Convert m68k to use read/update_persistent_clock m32r: Convert m32r to use read/update_peristent_clock blackfin: Convert blackfin to use read/update_persistent_clock ia64: Convert ia64 to use read/update_persistent_clock avr32: Convert avr32 to use read/update_persistent_clock h8300: Convert h8300 to use read/update_persistent_clock frv: Convert frv to use read/update_persistent_clock mn10300: Convert mn10300 to use read/update_persistent_clock alpha: Convert alpha to use read/update_persistent_clock xtensa: Fix unnecessary setting of xtime time: Clean up direct xtime usage in xen
This commit is contained in:
@@ -73,21 +73,24 @@ static irqreturn_t timer_interrupt(int irq, void *dummy)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
void __init time_init(void)
|
||||
void read_persistent_clock(struct timespec *ts)
|
||||
{
|
||||
struct rtc_time time;
|
||||
ts->tv_sec = 0;
|
||||
ts->tv_nsec = 0;
|
||||
|
||||
if (mach_hwclk) {
|
||||
mach_hwclk(0, &time);
|
||||
|
||||
if ((time.tm_year += 1900) < 1970)
|
||||
time.tm_year += 100;
|
||||
xtime.tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday,
|
||||
ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday,
|
||||
time.tm_hour, time.tm_min, time.tm_sec);
|
||||
xtime.tv_nsec = 0;
|
||||
}
|
||||
wall_to_monotonic.tv_sec = -xtime.tv_sec;
|
||||
}
|
||||
|
||||
void __init time_init(void)
|
||||
{
|
||||
mach_sched_init(timer_interrupt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user