From: Linus Torvalds Date: Fri, 18 Sep 2009 16:15:24 +0000 (-0700) Subject: Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Tag: v2.6.32-rc1~649 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a03fdb7612874834d6847107198712d18b5242c7;p=platform%2Fupstream%2Fkernel-adaptation-pc.git Merge branch 'timers-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip * '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. --- a03fdb7612874834d6847107198712d18b5242c7 diff --cc arch/m68knommu/kernel/time.c index c2aa717,6843224..a90acf5 --- a/arch/m68knommu/kernel/time.c +++ b/arch/m68knommu/kernel/time.c @@@ -69,12 -69,13 +69,13 @@@ static unsigned long read_rtc_mmss(void if ((year += 1900) < 1970) year += 100; - return mktime(year, mon, day, hour, min, sec);; + 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) diff --cc arch/mips/loongson/common/time.c index b13d171,0000000..0edbef3 mode 100644,000000..100644 --- a/arch/mips/loongson/common/time.c +++ b/arch/mips/loongson/common/time.c @@@ -1,27 -1,0 +1,28 @@@ +/* + * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology + * Author: Fuxin Zhang, zhangfx@lemote.com + * + * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology + * Author: Wu Zhangjin, wuzj@lemote.com + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ +#include +#include + +#include + +void __init plat_time_init(void) +{ + /* setup mips r4k timer */ + mips_hpt_frequency = cpu_clock_freq / 2; +} + - unsigned long read_persistent_clock(void) ++void read_persistent_clock(struct timespec *ts) +{ - return mc146818_get_cmos_time(); ++ ts->tv_sec = return mc146818_get_cmos_time(); ++ ts->tv_nsec = 0; +}