aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-11 01:22:32 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 11:29:33 -0400
commit2ea5bc5e5bb51492f189bba44045e0de7decf4a0 (patch)
tree3451944d97b58989fcc4c06ec70d9f43aaaf3b0a /arch/um
parente1a79c400a86f2f6a6735480e31f6ee159e76fa2 (diff)
uml: tidy IRQ code
Some tidying of the irq code before introducing irq stacks. Mostly style fixes, but the timer handler calls the timer code directly rather than going through the generic sig_handler_common_skas. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> 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/kernel/init_task.c11
-rw-r--r--arch/um/kernel/irq.c4
-rw-r--r--arch/um/os-Linux/signal.c10
-rw-r--r--arch/um/os-Linux/skas/process.c6
4 files changed, 13 insertions, 18 deletions
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index 4506c7f32bac..f5385a3799bb 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -46,14 +46,3 @@ void unprotect_stack(unsigned long stack)
46{ 46{
47 os_protect_memory((void *) stack, THREAD_SIZE, 1, 1, 0); 47 os_protect_memory((void *) stack, THREAD_SIZE, 1, 1, 0);
48} 48}
49
50/*
51 * Overrides for Emacs so that we follow Linus's tabbing style.
52 * Emacs will notice this stuff at the end of the file and automatically
53 * adjust the settings for this buffer only. This must remain at the end
54 * of the file.
55 * ---------------------------------------------------------------------------
56 * Local variables:
57 * c-file-style: "linux"
58 * End:
59 */
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 8f2ed3690315..a9651a175eb5 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 * Derived (i.e. mostly copied) from arch/i386/kernel/irq.c: 4 * Derived (i.e. mostly copied) from arch/i386/kernel/irq.c:
@@ -53,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v)
53 if (i < NR_IRQS) { 53 if (i < NR_IRQS) {
54 spin_lock_irqsave(&irq_desc[i].lock, flags); 54 spin_lock_irqsave(&irq_desc[i].lock, flags);
55 action = irq_desc[i].action; 55 action = irq_desc[i].action;
56 if (!action) 56 if (!action)
57 goto skip; 57 goto skip;
58 seq_printf(p, "%3d: ",i); 58 seq_printf(p, "%3d: ",i);
59#ifndef CONFIG_SMP 59#ifndef CONFIG_SMP
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c
index 48d493415301..420ee86d0d1a 100644
--- a/arch/um/os-Linux/signal.c
+++ b/arch/um/os-Linux/signal.c
@@ -61,15 +61,19 @@ void sig_handler(int sig, struct sigcontext *sc)
61 61
62static void real_alarm_handler(int sig, struct sigcontext *sc) 62static void real_alarm_handler(int sig, struct sigcontext *sc)
63{ 63{
64 union uml_pt_regs regs;
65
64 if(sig == SIGALRM) 66 if(sig == SIGALRM)
65 switch_timers(0); 67 switch_timers(0);
66 68
67 CHOOSE_MODE_PROC(sig_handler_common_tt, sig_handler_common_skas, 69 if(sc != NULL)
68 sig, sc); 70 copy_sc(&regs, sc);
71 regs.skas.is_user = 0;
72 unblock_signals();
73 timer_handler(sig, &regs);
69 74
70 if(sig == SIGALRM) 75 if(sig == SIGALRM)
71 switch_timers(1); 76 switch_timers(1);
72
73} 77}
74 78
75void alarm_handler(int sig, struct sigcontext *sc) 79void alarm_handler(int sig, struct sigcontext *sc)
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 3492886223e1..f9d2f8545afe 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -288,7 +288,8 @@ int start_userspace(unsigned long stub_stack)
288void userspace(union uml_pt_regs *regs) 288void userspace(union uml_pt_regs *regs)
289{ 289{
290 int err, status, op, pid = userspace_pid[0]; 290 int err, status, op, pid = userspace_pid[0];
291 int local_using_sysemu; /*To prevent races if using_sysemu changes under us.*/ 291 /* To prevent races if using_sysemu changes under us.*/
292 int local_using_sysemu;
292 293
293 while(1){ 294 while(1){
294 restore_registers(pid, regs); 295 restore_registers(pid, regs);
@@ -296,7 +297,8 @@ void userspace(union uml_pt_regs *regs)
296 /* Now we set local_using_sysemu to be used for one loop */ 297 /* Now we set local_using_sysemu to be used for one loop */
297 local_using_sysemu = get_using_sysemu(); 298 local_using_sysemu = get_using_sysemu();
298 299
299 op = SELECT_PTRACE_OPERATION(local_using_sysemu, singlestepping(NULL)); 300 op = SELECT_PTRACE_OPERATION(local_using_sysemu,
301 singlestepping(NULL));
300 302
301 err = ptrace(op, pid, 0, 0); 303 err = ptrace(op, pid, 0, 0);
302 if(err) 304 if(err)