From c583175773bf6e82b8448afcdfb28405e349961a Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 2 Feb 2012 18:31:41 +0000 Subject: [PATCH] In the syscall vector, deal with SYS_lwp_getprivate quickly. XXX what about non-NetBSD syscall tables. --- sys/arch/vax/vax/genassym.cf | 3 ++- sys/arch/vax/vax/intvec.S | 26 +++++++++++--------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/sys/arch/vax/vax/genassym.cf b/sys/arch/vax/vax/genassym.cf index eca2c4a0cb9a..8af0d6df1ad3 100644 --- a/sys/arch/vax/vax/genassym.cf +++ b/sys/arch/vax/vax/genassym.cf @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.50 2011/04/14 08:17:42 matt Exp $ +# $NetBSD: genassym.cf,v 1.51 2012/02/02 18:31:41 matt Exp $ # # Copyright (c) 1997 Ludd, University of Lule}, Sweden. # All rights reserved. @@ -150,6 +150,7 @@ define EV_COUNT offsetof(struct evcnt, ev_count) define SYS_compat_16___sigreturn14 SYS_compat_16___sigreturn14 define SYS_exit SYS_exit +define SYS__lwp_getprivate SYS__lwp_getprivate define VAX_TYP_UV2 VAX_TYP_UV2 define VAX_TYP_8SS VAX_TYP_8SS diff --git a/sys/arch/vax/vax/intvec.S b/sys/arch/vax/vax/intvec.S index 49e196a2fb02..88bead3ba037 100644 --- a/sys/arch/vax/vax/intvec.S +++ b/sys/arch/vax/vax/intvec.S @@ -1,4 +1,4 @@ -/* $NetBSD: intvec.S,v 1.20 2011/04/12 18:07:57 matt Exp $ */ +/* $NetBSD: intvec.S,v 1.21 2012/02/02 18:31:41 matt Exp $ */ /* * Copyright (c) 1994, 1997 Ludd, University of Lule}, Sweden. @@ -107,7 +107,7 @@ _C_LABEL(rpb): INTVEC(syscall, KSTACK) # main syscall trap, chmk, 40 INTVEC(chmx, KSTACK) # chme, 44 INTVEC(chmx, KSTACK) # chms, 48 - INTVEC(chmu, KSTACK) # chmu, 4C + INTVEC(chmx, KSTACK) # chmu, 4C NOVEC; # System Backplane Exception/BIerror, 50 INTVEC(cmrerr, ISTACK) # Corrected Memory Read, 54 NOVEC; # System Backplane Alert/RXCD, 58 @@ -223,19 +223,6 @@ SCBENTRY(privinflt) # Privileged/unimplemented instruction TRAPCALL(resopflt, T_RESOPFLT) TRAPCALL(resadflt, T_RESADFLT) -/* - * Use chmu to implement a "fast" _lwp_getprivate. - */ -SCBENTRY(chmu) - cmpl (%sp), $1 - bneq 1f - mfpr $PR_SSP, %r0 # get curlwp - movl L_PRIVATE(%r0), %r0 # get l_private - addl2 %sp, 4 - rei -1: - brw Xchmx - /* * default handler for CHME and CHMS */ @@ -284,6 +271,15 @@ TRAPCALL(breakp, T_BPTFLT) TRAPARGC(arithflt, T_ARITHFLT) SCBENTRY(syscall) # Main system call +#if 1 + cmpl (%sp), $SYS__lwp_getprivate + bneq 1f + mfpr $PR_SSP, %r0 # get curlwp + movl L_PRIVATE(%r0), %r0 # get l_private + addl2 $4, %sp # eat the code + rei +1: +#endif pushl $T_SYSCALL pushr $0xfff mfpr $PR_USP, -(%sp)