+ uml-fix-wall_to_monotonic-initialization.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     uml: fix wall_to_monotonic initialization

has been added to the -mm tree.  Its filename is

     uml-fix-wall_to_monotonic-initialization.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: uml: fix wall_to_monotonic initialization
From: Jeff Dike <jdike@xxxxxxxxxxx>


Initialize wall_to_monotonic correctly.  This fixes a problem where sleeps
lasted about one secone less than they should.  This also called for a bit of
code restructuring, following a patch which Blaisorblade had been keeping.

Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/um/include/kern_util.h |   13 ++-----------
 arch/um/kernel/time_kern.c  |   10 ++++++++++
 arch/um/os-Linux/time.c     |   10 +---------
 3 files changed, 13 insertions(+), 20 deletions(-)

diff -puN arch/um/include/kern_util.h~uml-fix-wall_to_monotonic-initialization arch/um/include/kern_util.h
--- devel/arch/um/include/kern_util.h~uml-fix-wall_to_monotonic-initialization	2006-06-03 19:28:38.000000000 -0700
+++ devel-akpm/arch/um/include/kern_util.h	2006-06-03 19:28:38.000000000 -0700
@@ -120,20 +120,11 @@ extern int is_syscall(unsigned long addr
 extern void free_irq(unsigned int, void *);
 extern int cpu(void);
 
+extern void time_init_kern(void);
+
 /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */
 extern int __cant_sleep(void);
 extern void segv_handler(int sig, union uml_pt_regs *regs);
 extern void sigio_handler(int sig, union uml_pt_regs *regs);
 
 #endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff -puN arch/um/kernel/time_kern.c~uml-fix-wall_to_monotonic-initialization arch/um/kernel/time_kern.c
--- devel/arch/um/kernel/time_kern.c~uml-fix-wall_to_monotonic-initialization	2006-06-03 19:28:38.000000000 -0700
+++ devel-akpm/arch/um/kernel/time_kern.c	2006-06-03 19:28:38.000000000 -0700
@@ -84,6 +84,16 @@ void timer_irq(union uml_pt_regs *regs)
 	}
 }
 
+
+void time_init_kern(void)
+{
+	unsigned long long nsecs;
+
+	nsecs = os_nsecs();
+	set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION,
+				-nsecs % BILLION);
+}
+
 void do_boot_timer_handler(struct sigcontext * sc)
 {
 	struct pt_regs regs;
diff -puN arch/um/os-Linux/time.c~uml-fix-wall_to_monotonic-initialization arch/um/os-Linux/time.c
--- devel/arch/um/os-Linux/time.c~uml-fix-wall_to_monotonic-initialization	2006-06-03 19:28:38.000000000 -0700
+++ devel-akpm/arch/um/os-Linux/time.c	2006-06-03 19:28:38.000000000 -0700
@@ -81,20 +81,12 @@ void uml_idle_timer(void)
 	set_interval(ITIMER_REAL);
 }
 
-extern void ktime_get_ts(struct timespec *ts);
-#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
-
 void time_init(void)
 {
-	struct timespec now;
-
 	if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR)
 		panic("Couldn't set SIGVTALRM handler");
 	set_interval(ITIMER_VIRTUAL);
-
-	do_posix_clock_monotonic_gettime(&now);
-	wall_to_monotonic.tv_sec = -now.tv_sec;
-	wall_to_monotonic.tv_nsec = -now.tv_nsec;
+	time_init_kern();
 }
 
 unsigned long long os_nsecs(void)
_

Patches currently in -mm which might be from jdike@xxxxxxxxxxx are

uml-add-asm-irqflagsh.patch
uml-fix-wall_to_monotonic-initialization.patch
uml-fix-a-typo-in-do_uml_initcalls.patch
uml-__user-annotation-in-arch_prctl.patch
uml-more-__user-annotations.patch
uml-add-ffreestanding-to-cflags.patch
uml-make-copy__user-atomic.patch
uml-fix-not_dead_yet-when-directory-is-in-bad-state.patch
uml-rename-and-improve-actually_do_remove.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux