Subject: syscall trap patch review
To: None <port-powerpc@netbsd.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: port-powerpc
Date: 11/26/2002 18:51:45
I plan to commit this in order to greatly improve COMPAT_MACH
performance on the PowerPC. Someone can review it to make sure it is
okay?
The goal is to quickly return from two system calls, returning no error.
Index: trap_subr.S
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/powerpc/powerpc/trap_subr.S,v
retrieving revision 1.29
diff -r1.29 trap_subr.S
40a41
> #include "opt_compat_mach.h"
720a722,726
> #ifdef COMPAT_MACH
> /* Handle Mach fast traps: Do nothing but do it quickly */
> cmpwi 5,0,0x7ff2 # cthread_info
> cmpwi 6,0,0x7ff1 # cthread_set_self
> #endif
723a730,733
> #ifdef COMPAT_MACH
> beq 5,2f
> beq 6,2f
> #endif
747a758,768
> #ifdef COMPAT_MACH
> 2:
> FRAME_LEAVE(tempsave)
> mfcr 3
> lis 4,0x1000
> ori 3,3,4
> mtcr 3
> li 3,0
> li 4,0
> rfi
> #endif
--
Emmanuel Dreyfus
manu@netbsd.org