uml: tidy IRQ code
authorJeff Dike <jdike@addtoit.com>
Fri, 11 May 2007 05:22:32 +0000 (22:22 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 11 May 2007 15:29:33 +0000 (08:29 -0700)
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>
arch/um/kernel/init_task.c
arch/um/kernel/irq.c
arch/um/os-Linux/signal.c
arch/um/os-Linux/skas/process.c

index 4506c7f32bac6eaf57e055fbc49b8e9fd24f51ed..f5385a3799bb70ac868c676d15b62ceb84553331 100644 (file)
@@ -46,14 +46,3 @@ void unprotect_stack(unsigned long stack)
 {
        os_protect_memory((void *) stack, THREAD_SIZE, 1, 1, 0);
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 8f2ed369031507c8aa01992d46dbaea62b3721ca..a9651a175eb54bad75b15a4721e9d94f0ae6e221 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  * Derived (i.e. mostly copied) from arch/i386/kernel/irq.c:
@@ -53,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v)
        if (i < NR_IRQS) {
                spin_lock_irqsave(&irq_desc[i].lock, flags);
                action = irq_desc[i].action;
-               if (!action) 
+               if (!action)
                        goto skip;
                seq_printf(p, "%3d: ",i);
 #ifndef CONFIG_SMP
index 48d49341530121e004a9efadf4a0637504e3d5ba..420ee86d0d1af37199440b851ac11e87d1cacb59 100644 (file)
@@ -61,15 +61,19 @@ void sig_handler(int sig, struct sigcontext *sc)
 
 static void real_alarm_handler(int sig, struct sigcontext *sc)
 {
+       union uml_pt_regs regs;
+
        if(sig == SIGALRM)
                switch_timers(0);
 
-       CHOOSE_MODE_PROC(sig_handler_common_tt, sig_handler_common_skas,
-                        sig, sc);
+       if(sc != NULL)
+               copy_sc(&regs, sc);
+       regs.skas.is_user = 0;
+       unblock_signals();
+       timer_handler(sig, &regs);
 
        if(sig == SIGALRM)
                switch_timers(1);
-
 }
 
 void alarm_handler(int sig, struct sigcontext *sc)
index 3492886223e1fcaa0a06a15b8f921344b83707fa..f9d2f8545afedd12f06a2e3a216eea2757759999 100644 (file)
@@ -288,7 +288,8 @@ int start_userspace(unsigned long stub_stack)
 void userspace(union uml_pt_regs *regs)
 {
        int err, status, op, pid = userspace_pid[0];
-       int local_using_sysemu; /*To prevent races if using_sysemu changes under us.*/
+       /* To prevent races if using_sysemu changes under us.*/
+       int local_using_sysemu;
 
        while(1){
                restore_registers(pid, regs);
@@ -296,7 +297,8 @@ void userspace(union uml_pt_regs *regs)
                /* Now we set local_using_sysemu to be used for one loop */
                local_using_sysemu = get_using_sysemu();
 
-               op = SELECT_PTRACE_OPERATION(local_using_sysemu, singlestepping(NULL));
+               op = SELECT_PTRACE_OPERATION(local_using_sysemu,
+                                            singlestepping(NULL));
 
                err = ptrace(op, pid, 0, 0);
                if(err)