From ef04c2ddac946d28893636daf080888350aaae19 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 19 Sep 2006 00:15:47 +0000 Subject: [PATCH] rework interrupt_vector() slightly: - for the IPI case, avoid loading the address of intrlev into %g3 - remove some NOT_DEBUG code - load the interrupt argument #2 in the delay slot this removes 2 nops during interrupt processing for the normal case, and an additional 2 ALU instructions for IPIs --- sys/arch/sparc64/sparc64/locore.s | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s index 18f57f7b465b..b31b701a1332 100644 --- a/sys/arch/sparc64/sparc64/locore.s +++ b/sys/arch/sparc64/sparc64/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.221 2006/09/18 20:56:44 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.222 2006/09/19 00:15:47 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -3689,9 +3689,7 @@ interrupt_vector: 12: #endif - sethi %hi(_C_LABEL(intrlev)), %g3 btst IRSR_BUSY, %g1 - or %g3, %lo(_C_LABEL(intrlev)), %g3 bz,pn %icc, 3f ! spurious interrupt sllx %g2, PTRSHFT, %g5 ! Calculate entry number @@ -3700,34 +3698,17 @@ interrupt_vector: mov IRDR_1H, %g1 ldxa [%g1] ASI_IRDR, %g1 ! Get IPI handler address - mov IRDR_2H, %g2 - brz,pn %g1, ret_from_intr_vector - nop + mov IRDR_2H, %g2 jmpl %g1, %g0 ldxa [%g2] ASI_IRDR, %g2 ! Get IPI handler argument Lsoftint_regular: + sethi %hi(_C_LABEL(intrlev)), %g3 bgeu,pn %xcc, 3f - nop + or %g3, %lo(_C_LABEL(intrlev)), %g3 LDPTR [%g3 + %g5], %g5 ! We have a pointer to the handler -#if NOT_DEBUG - brnz,pt %g5, 1f - nop - STACKFRAME(-CC64FSZ) ! Get a clean register window - mov %g2, %o1 - - LOAD_ASCIZ(%o0, "interrupt_vector: vector %lx NULL\r\n") - GLOBTOLOC - call prom_printf - clr %g4 - LOCTOGLOB - restore - nop -1: -#endif - brz,pn %g5, 3f ! NULL means it isn't registered yet. Skip it. nop