aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 04:27:22 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:08 -0400
commita2f018bf389422a55f1455ab8b9b5eedc5ea1803 (patch)
tree50f93a3c8892a89fbc981a7ac8d3566131f9fb84 /arch/um
parent181bde801afae4304843ce95c868d4419ae87310 (diff)
uml: simplify interval setting
set_interval took a timer type as an argument, but it always specified a virtual timer. So, it is not needed, and it is gone, and set_interval is simplified appropriately. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/include/os.h2
-rw-r--r--arch/um/kernel/time.c2
-rw-r--r--arch/um/os-Linux/skas/process.c2
-rw-r--r--arch/um/os-Linux/time.c5
4 files changed, 5 insertions, 6 deletions
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index 12de1ea68370..1897785fd571 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -252,7 +252,7 @@ extern void os_dump_core(void);
252 252
253extern int switch_timers(int to_real); 253extern int switch_timers(int to_real);
254extern void idle_sleep(int secs); 254extern void idle_sleep(int secs);
255extern int set_interval(int is_virtual); 255extern int set_interval(void);
256extern void disable_timer(void); 256extern void disable_timer(void);
257extern void uml_idle_timer(void); 257extern void uml_idle_timer(void);
258extern unsigned long long os_nsecs(void); 258extern unsigned long long os_nsecs(void);
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index 633b673d5778..2bda07dcd345 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -102,7 +102,7 @@ static void register_timer(void)
102 printk(KERN_ERR "register_timer : request_irq failed - " 102 printk(KERN_ERR "register_timer : request_irq failed - "
103 "errno = %d\n", -err); 103 "errno = %d\n", -err);
104 104
105 err = set_interval(1); 105 err = set_interval();
106 if (err != 0) 106 if (err != 0)
107 printk(KERN_ERR "register_timer : set_interval failed - " 107 printk(KERN_ERR "register_timer : set_interval failed - "
108 "errno = %d\n", -err); 108 "errno = %d\n", -err);
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 5462469f4ebf..0036164bb0fb 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -178,7 +178,7 @@ static int userspace_tramp(void *stack)
178 ptrace(PTRACE_TRACEME, 0, 0, 0); 178 ptrace(PTRACE_TRACEME, 0, 0, 0);
179 179
180 init_new_thread_signals(); 180 init_new_thread_signals();
181 err = set_interval(1); 181 err = set_interval();
182 if (err) 182 if (err)
183 panic("userspace_tramp - setting timer failed, errno = %d\n", 183 panic("userspace_tramp - setting timer failed, errno = %d\n",
184 err); 184 err);
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c
index a16a0f484edc..b156f03e1713 100644
--- a/arch/um/os-Linux/time.c
+++ b/arch/um/os-Linux/time.c
@@ -14,14 +14,13 @@
14 14
15static int is_real_timer = 0; 15static int is_real_timer = 0;
16 16
17int set_interval(int is_virtual) 17int set_interval(void)
18{ 18{
19 int usec = 1000000/UM_HZ; 19 int usec = 1000000/UM_HZ;
20 int timer_type = is_virtual ? ITIMER_VIRTUAL : ITIMER_REAL;
21 struct itimerval interval = ((struct itimerval) { { 0, usec }, 20 struct itimerval interval = ((struct itimerval) { { 0, usec },
22 { 0, usec } }); 21 { 0, usec } });
23 22
24 if (setitimer(timer_type, &interval, NULL) == -1) 23 if (setitimer(ITIMER_VIRTUAL, &interval, NULL) == -1)
25 return -errno; 24 return -errno;
26 25
27 return 0; 26 return 0;