]>
Commit | Line | Data |
---|---|---|
9f934a63 GKH |
1 | From 482db6df1746c4fa7d64a2441d4cb2610249c679 Mon Sep 17 00:00:00 2001 |
2 | From: Richard Weinberger <richard@nod.at> | |
3 | Date: Tue, 26 Oct 2010 14:21:13 -0700 | |
4 | Subject: um: fix global timer issue when using CONFIG_NO_HZ | |
5 | ||
6 | From: Richard Weinberger <richard@nod.at> | |
7 | ||
8 | commit 482db6df1746c4fa7d64a2441d4cb2610249c679 upstream. | |
9 | ||
10 | This fixes a issue which was introduced by fe2cc53e ("uml: track and make | |
11 | up lost ticks"). | |
12 | ||
13 | timeval_to_ns() returns long long and not int. Due to that UML's timer | |
14 | did not work properlt and caused timer freezes. | |
15 | ||
16 | Signed-off-by: Richard Weinberger <richard@nod.at> | |
17 | Acked-by: Pekka Enberg <penberg@kernel.org> | |
18 | Cc: Jeff Dike <jdike@addtoit.com> | |
19 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | |
20 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
22 | ||
23 | --- | |
24 | arch/um/os-Linux/time.c | 2 +- | |
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
26 | ||
27 | --- a/arch/um/os-Linux/time.c | |
28 | +++ b/arch/um/os-Linux/time.c | |
29 | @@ -60,7 +60,7 @@ static inline long long timeval_to_ns(co | |
30 | long long disable_timer(void) | |
31 | { | |
32 | struct itimerval time = ((struct itimerval) { { 0, 0 }, { 0, 0 } }); | |
33 | - int remain, max = UM_NSEC_PER_SEC / UM_HZ; | |
34 | + long long remain, max = UM_NSEC_PER_SEC / UM_HZ; | |
35 | ||
36 | if (setitimer(ITIMER_VIRTUAL, &time, &time) < 0) | |
37 | printk(UM_KERN_ERR "disable_timer - setitimer failed, " |