]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.36.2/um-fix-global-timer-issue-when-using-config_no_hz.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.2 / um-fix-global-timer-issue-when-using-config_no_hz.patch
CommitLineData
9f934a63
GKH
1From 482db6df1746c4fa7d64a2441d4cb2610249c679 Mon Sep 17 00:00:00 2001
2From: Richard Weinberger <richard@nod.at>
3Date: Tue, 26 Oct 2010 14:21:13 -0700
4Subject: um: fix global timer issue when using CONFIG_NO_HZ
5
6From: Richard Weinberger <richard@nod.at>
7
8commit 482db6df1746c4fa7d64a2441d4cb2610249c679 upstream.
9
10This fixes a issue which was introduced by fe2cc53e ("uml: track and make
11up lost ticks").
12
13timeval_to_ns() returns long long and not int. Due to that UML's timer
14did not work properlt and caused timer freezes.
15
16Signed-off-by: Richard Weinberger <richard@nod.at>
17Acked-by: Pekka Enberg <penberg@kernel.org>
18Cc: Jeff Dike <jdike@addtoit.com>
19Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
20Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
21Signed-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, "