Module Name:    src
Committed By:   mrg
Date:           Thu May 12 05:43:54 UTC 2011

Modified Files:
        src/sys/arch/sparc64/sparc64: locore.s

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.332 -r1.333 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.332 src/sys/arch/sparc64/sparc64/locore.s:1.333
--- src/sys/arch/sparc64/sparc64/locore.s:1.332	Mon Dec 20 00:25:44 2010
+++ src/sys/arch/sparc64/sparc64/locore.s	Thu May 12 05:43:54 2011
@@ -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

Reply via email to