Module Name: src
Committed By: nakayama
Date: Wed Jul 27 20:07:50 UTC 2011
Modified Files:
src/sys/arch/sparc64/sparc64: locore.s
Log Message:
ivec is assigned to hardware, so count its event counter up in
interrupt_vector, not in softint, and do some optimization.
To generate a diff of this commit:
cvs rdiff -u -r1.336 -r1.337 src/sys/arch/sparc64/sparc64/locore.s
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.336 src/sys/arch/sparc64/sparc64/locore.s:1.337
--- src/sys/arch/sparc64/sparc64/locore.s:1.336 Wed Jul 20 12:06:00 2011
+++ src/sys/arch/sparc64/sparc64/locore.s Wed Jul 27 20:07:49 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.336 2011/07/20 12:06:00 macallan Exp $ */
+/* $NetBSD: locore.s,v 1.337 2011/07/27 20:07:49 nakayama Exp $ */
/*
* Copyright (c) 2006-2010 Matthew R. Green
@@ -3118,13 +3118,18 @@
Lsoftint_regular:
stxa %g0, [%g0] ASI_IRSR ! Ack IRQ
membar #Sync ! Should not be needed due to retry
- sllx %g7, PTRSHFT, %g5 ! Calculate entry number
sethi %hi(_C_LABEL(intrlev)), %g3
+ sllx %g7, PTRSHFT, %g5 ! Calculate entry number
or %g3, %lo(_C_LABEL(intrlev)), %g3
LDPTR [%g3 + %g5], %g5 ! We have a pointer to the handler
brz,pn %g5, 3f ! NULL means it isn't registered yet. Skip it.
nop
+ ! increment per-ivec counter
+ ldx [%g5 + IH_CNT], %g1
+ inc %g1
+ stx %g1, [%g5 + IH_CNT]
+
setup_sparcintr:
LDPTR [%g5+IH_PEND], %g6 ! Read pending flag
brnz,pn %g6, ret_from_intr_vector ! Skip it if it's running
@@ -3452,11 +3457,6 @@
add %l5, %o0, %l5
stx %g0, [%l1] ! Clear intr source
membar #Sync ! Should not be needed
-
- ! increment per-ivec counter
- ldx [%l2 + IH_CNT], %l1
- add %l1, 1, %l1
- stx %l1, [%l2 + IH_CNT]
0:
cmp %l7, -1
bne,pn CCCR, 2b ! 'Nother?