Skip to content

Commit 2ea5bc5

Browse files
cfd-36Linus Torvalds
authored andcommitted
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>
1 parent e1a79c4 commit 2ea5bc5

4 files changed

Lines changed: 13 additions & 18 deletions

File tree

‎arch/um/kernel/init_task.c‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,3 @@ void unprotect_stack(unsigned long stack)
4646
{
4747
os_protect_memory((void *) stack, THREAD_SIZE, 1, 1, 0);
4848
}
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-
*/

‎arch/um/kernel/irq.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
33
* Licensed under the GPL
44
* Derived (i.e. mostly copied) from arch/i386/kernel/irq.c:
@@ -53,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v)
5353
if (i < NR_IRQS) {
5454
spin_lock_irqsave(&irq_desc[i].lock, flags);
5555
action = irq_desc[i].action;
56-
if (!action)
56+
if (!action)
5757
goto skip;
5858
seq_printf(p, "%3d: ",i);
5959
#ifndef CONFIG_SMP

‎arch/um/os-Linux/signal.c‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,19 @@ void sig_handler(int sig, struct sigcontext *sc)
6161

6262
static void real_alarm_handler(int sig, struct sigcontext *sc)
6363
{
64+
union uml_pt_regs regs;
65+
6466
if(sig == SIGALRM)
6567
switch_timers(0);
6668

67-
CHOOSE_MODE_PROC(sig_handler_common_tt, sig_handler_common_skas,
68-
sig, sc);
69+
if(sc != NULL)
70+
copy_sc(&regs, sc);
71+
regs.skas.is_user = 0;
72+
unblock_signals();
73+
timer_handler(sig, &regs);
6974

7075
if(sig == SIGALRM)
7176
switch_timers(1);
72-
7377
}
7478

7579
void alarm_handler(int sig, struct sigcontext *sc)

‎arch/um/os-Linux/skas/process.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,17 @@ int start_userspace(unsigned long stub_stack)
288288
void userspace(union uml_pt_regs *regs)
289289
{
290290
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;
292293

293294
while(1){
294295
restore_registers(pid, regs);
295296

296297
/* Now we set local_using_sysemu to be used for one loop */
297298
local_using_sysemu = get_using_sysemu();
298299

299-
op = SELECT_PTRACE_OPERATION(local_using_sysemu, singlestepping(NULL));
300+
op = SELECT_PTRACE_OPERATION(local_using_sysemu,
301+
singlestepping(NULL));
300302

301303
err = ptrace(op, pid, 0, 0);
302304
if(err)

0 commit comments

Comments
 (0)