lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-9f31f5774961a735687fee17953ab505b3df3abf@git.kernel.org>
Date:	Tue, 27 Jul 2010 10:47:47 GMT
From:	tip-bot for John Stultz <johnstul@...ibm.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, jdike@...toit.com, hpa@...or.com,
	mingo@...hat.com, johnstul@...ibm.com, tglx@...utronix.de
Subject: [tip:timers/clocksource] um: Convert to use read_persistent_clock

Commit-ID:  9f31f5774961a735687fee17953ab505b3df3abf
Gitweb:     http://git.kernel.org/tip/9f31f5774961a735687fee17953ab505b3df3abf
Author:     John Stultz <johnstul@...ibm.com>
AuthorDate: Tue, 13 Jul 2010 17:56:24 -0700
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 27 Jul 2010 12:40:55 +0200

um: Convert to use read_persistent_clock

This patch converts the um arch to use read_persistent_clock().
This allows it to avoid accessing xtime and wall_to_monotonic
directly.

Signed-off-by: John Stultz <johnstul@...ibm.com>
Cc: Jeff Dike <jdike@...toit.com>
LKML-Reference: <1279068988-21864-8-git-send-email-johnstul@...ibm.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 arch/um/kernel/time.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index c8b9c46..2b8b262 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -102,16 +102,17 @@ static void __init setup_itimer(void)
 	clockevents_register_device(&itimer_clockevent);
 }
 
+void read_persistent_clock(struct timespec *ts)
+{
+	nsecs = os_nsecs();
+	set_normalized_timespec(ts, nsecs / NSEC_PER_SEC,
+				nsecs % NSEC_PER_SEC);
+}
+
 void __init time_init(void)
 {
 	long long nsecs;
 
 	timer_init();
-
-	nsecs = os_nsecs();
-	set_normalized_timespec(&wall_to_monotonic, -nsecs / NSEC_PER_SEC,
-				-nsecs % NSEC_PER_SEC);
-	set_normalized_timespec(&xtime, nsecs / NSEC_PER_SEC,
-				nsecs % NSEC_PER_SEC);
 	late_time_init = setup_itimer;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ