diff options
author | Richard Weinberger <richard@nod.at> | 2010-10-26 14:21:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-21 12:43:45 -0700 |
commit | 6295a5d0fa59cda35b9bcca230524a7397923663 (patch) | |
tree | 4467f6cbc4f4d0f3579533e92c17f7d015a908a7 | |
parent | 417bcaef1160833d07668a3394d292617c25d5f5 (diff) | |
download | kernel-common-6295a5d0fa59cda35b9bcca230524a7397923663.tar.gz kernel-common-6295a5d0fa59cda35b9bcca230524a7397923663.tar.bz2 kernel-common-6295a5d0fa59cda35b9bcca230524a7397923663.zip |
um: fix global timer issue when using CONFIG_NO_HZ
commit 482db6df1746c4fa7d64a2441d4cb2610249c679 upstream.
This fixes a issue which was introduced by fe2cc53e ("uml: track and make
up lost ticks").
timeval_to_ns() returns long long and not int. Due to that UML's timer
did not work properlt and caused timer freezes.
Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | arch/um/os-Linux/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index dec5678fc17f..6e3359d6a839 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c @@ -60,7 +60,7 @@ static inline long long timeval_to_ns(const struct timeval *tv) long long disable_timer(void) { struct itimerval time = ((struct itimerval) { { 0, 0 }, { 0, 0 } }); - int remain, max = UM_NSEC_PER_SEC / UM_HZ; + long long remain, max = UM_NSEC_PER_SEC / UM_HZ; if (setitimer(ITIMER_VIRTUAL, &time, &time) < 0) printk(UM_KERN_ERR "disable_timer - setitimer failed, " |