linux-mips
[Top] [All Lists]

[PATCH 3/3] time: implement read_persistent_clock()

To: ralf@linux-mips.org, anemo@mba.ocn.ne.jp
Subject: [PATCH 3/3] time: implement read_persistent_clock()
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
Date: Fri, 4 May 2007 17:36:46 +0200
Cc: linux-mips@linux-mips.org
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:to:cc:subject:date:message-id:x-mailer:in-reply-to:references:from; b=LOqRDPmNQi9mHy6zNYfTEJ7bIDS5J8huiCcvlKdRyOsrrzq5ZemZwtqZJPN/e1JWYP8oaF8+73Z9zxGeRdUe9U6ZRSkXBR+HG6d5Umxv570Tzw0BGhMp+zJcLe3okZRzesZ5YfCj5dXnswRm7JTPyQo7zMevOiLelcPWyyblCfo=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:to:cc:subject:date:message-id:x-mailer:in-reply-to:references:from; b=J/jIny91Ino2wqa3AfVP0RJeW9Fw198M+JFbdJq9gClVh16d9EoPKtR5WNaMB2oiRjLXDqgke42OQexgWJBj9ZavqHoLUtlHd1+MOqewsaj4bhuBCQtXQBtwkgl5u2MBi1wXc3fRdpCmOCXQF/yiBx78OKzTNkrofAo2DQLQg+g=
In-reply-to: <11782930063123-git-send-email-fbuihuu@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1178293006633-git-send-email-fbuihuu@gmail.com> <11782930063123-git-send-email-fbuihuu@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: Franck Bui-Huu <fbuihuu@gmail.com>

This function is needed by timekeeping subsystem.

This also removes the need to setup xtime.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/kernel/time.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 5a4fd06..0d6efda 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -326,17 +326,16 @@ static void __init init_mips_clocksource(void)
        clocksource_register(&clocksource_mips);
 }
 
+unsigned long read_persistent_clock(void)
+{
+       return rtc_mips_get_time();
+}
+
 void __init time_init(void)
 {
        if (!rtc_mips_set_mmss)
                rtc_mips_set_mmss = rtc_mips_set_time;
 
-       xtime.tv_sec = rtc_mips_get_time();
-       xtime.tv_nsec = 0;
-
-       set_normalized_timespec(&wall_to_monotonic,
-                               -xtime.tv_sec, -xtime.tv_nsec);
-
        /* Choose appropriate high precision timer routines.  */
        if (!cpu_has_counter && !clocksource_mips.read)
                /* No high precision timer -- sorry.  */
-- 
1.5.1.3


<Prev in Thread] Current Thread [Next in Thread>