From d83571ea08a9764201330c768cbee094eeec67a3 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 16 Aug 1998 02:01:16 +0000 Subject: [PATCH] Enabled interrupts as soon as it possible in syscall(), before any of the diagnostic checks. --- sys/arch/arm32/arm32/syscall.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/sys/arch/arm32/arm32/syscall.c b/sys/arch/arm32/arm32/syscall.c index 8dfa06d7fc04..9ea5e4d05ca8 100644 --- a/sys/arch/arm32/arm32/syscall.c +++ b/sys/arch/arm32/arm32/syscall.c @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.17 1998/07/07 17:51:55 mark Exp $ */ +/* $NetBSD: syscall.c,v 1.18 1998/08/16 02:01:16 mark Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -126,6 +126,14 @@ syscall(frame, code) u_quad_t sticks; int regparams; + /* + * Enable interrupts if they were enabled before the exception. + * Since all syscalls *should* come from user mode it will always + * be safe to enable them, but check anyway. + */ + if (!(frame->tf_spsr & I32_bit)) + enable_interrupts(I32_bit); + #if defined(UVM) uvmexp.syscalls++; #else @@ -143,15 +151,11 @@ syscall(frame, code) #ifdef DIAGNOSTIC if ((frame->tf_spsr & PSR_MODE) != PSR_USR32_MODE) { - u_int s; - - s = splhigh(); printf("syscall: swi 0x%x from non USR32 mode\n", code); - printf("syscall: trapframe=0x%08x\n", (u_int)frame); + printf("syscall: trapframe=%p\n", frame); #ifdef CONTINUE_AFTER_NONUSR_SYSCALL printf("syscall: The system should now be considered very unstable :-(\n"); - (void)splx(s); sigexit(curproc, SIGILL); /* Not reached */ @@ -214,14 +218,6 @@ syscall(frame, code) panic("syscall: Not in SVC32 mode\n"); #endif /* DIAGNOSTIC */ - /* - * Enable interrupts if they were enabled before the exception. - * Since all syscalls *should* come from user mode it will always - * be safe to enable them, but check anyway. - */ - if (!(frame->tf_spsr & I32_bit)) - enable_interrupts(I32_bit); - p = curproc; sticks = p->p_sticks; p->p_md.md_regs = frame;