Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc64/sparc64 ivec is assigned to hardware, so co...



details:   https://anonhg.NetBSD.org/src/rev/9b853dbbda61
branches:  trunk
changeset: 767691:9b853dbbda61
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Wed Jul 27 20:07:49 2011 +0000

description:
ivec is assigned to hardware, so count its event counter up in
interrupt_vector, not in softint, and do some optimization.

diffstat:

 sys/arch/sparc64/sparc64/locore.s |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (41 lines):

diff -r 7e954286f41a -r 9b853dbbda61 sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Wed Jul 27 15:08:42 2011 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Wed Jul 27 20:07:49 2011 +0000
@@ -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
+       sethi   %hi(_C_LABEL(intrlev)), %g3
        sllx    %g7, PTRSHFT, %g5       ! Calculate entry number
-       sethi   %hi(_C_LABEL(intrlev)), %g3
        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?



Home | Main Index | Thread Index | Old Index