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 first steps towards fujitsu SPARC64...



details:   https://anonhg.NetBSD.org/src/rev/24c4c1884086
branches:  trunk
changeset: 764926:24c4c1884086
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu May 12 05:43:54 2011 +0000

description:
first steps towards fujitsu SPARC64 support:

- SPARC64 systems have interrupts with upto 14 bits set, but we only look
  at the first 11 bits.  trim non IPI interrupts to 11 bits

diffstat:

 sys/arch/sparc64/sparc64/locore.s |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (39 lines):

diff -r d99315d9926e -r 24c4c1884086 sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Thu May 12 05:43:40 2011 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Thu May 12 05:43:54 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.332 2010/12/20 00:25:44 matt Exp $        */
+/*     $NetBSD: locore.s,v 1.333 2011/05/12 05:43:54 mrg Exp $ */
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -3086,8 +3086,8 @@
         sethi  %hi(KERNBASE), %g1
 
        cmp     %g7, %g1
-       bl,pt   %xcc, Lsoftint_regular  ! >= KERNBASE is a fast cross-call
-        cmp    %g7, MAXINTNUM
+       bl,a,pt %xcc, Lsoftint_regular  ! >= KERNBASE is a fast cross-call
+        and    %g7, (MAXINTNUM-1), %g7 ! XXX make sun4us work
 
        mov     IRDR_1H, %g2
        ldxa    [%g2] ASI_IRDR, %g2     ! Get IPI handler argument 1
@@ -3100,7 +3100,7 @@
        jmpl    %g7, %g0
         nop
 #else
-        cmp    %g7, MAXINTNUM
+       and     %g7, (MAXINTNUM-1), %g7 ! XXX make sun4us work
 #endif
 
 Lsoftint_regular:
@@ -3108,8 +3108,7 @@
        membar  #Sync                   ! Should not be needed due to retry
        sllx    %g7, PTRSHFT, %g5       ! Calculate entry number
        sethi   %hi(_C_LABEL(intrlev)), %g3
-       bgeu,pn %xcc, 3f
-        or     %g3, %lo(_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



Home | Main Index | Thread Index | Old Index