diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-11-24 10:55:50 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-11-24 10:55:50 +0000 |
commit | b999bee7415660762e25b184a67692aebfae7ab3 (patch) | |
tree | 3f3fb7b4cb118272eaa9cac7b81fdf267c048d1f /sys | |
parent | dd8f256961d63a83bd9b2ed002c9a8c1e0af901b (diff) |
On sun4v, interpret the first data word of a device interrupt message as a
pointer to "struct intrhand" if it is larger than MAXINTNUM. To be used
with the cookie based "vintr" scheme.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc64/sparc64/locore.s | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s index 955d65f7f14..f0d35a494b2 100644 --- a/sys/arch/sparc64/sparc64/locore.s +++ b/sys/arch/sparc64/sparc64/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.177 2014/11/20 08:47:00 kettenis Exp $ */ +/* $OpenBSD: locore.s,v 1.178 2014/11/24 10:55:49 kettenis Exp $ */ /* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */ /* @@ -3998,19 +3998,21 @@ sun4v_dev_mondo: GET_CPUINFO_PA(%g3) add %g3, CI_DEVMQ, %g3 ldxa [%g3] ASI_PHYS_CACHED, %g3 - ldxa [%g3 + %g2] ASI_PHYS_CACHED, %g4 + ldxa [%g3 + %g2] ASI_PHYS_CACHED, %g5 add %g2, 64, %g2 and %g2, 0x7ff, %g2 stxa %g2, [%g1] ASI_QUEUE membar #Sync - and %g4, 0x7ff, %g4 - sllx %g4, 3, %g5 + cmp %g5, MAXINTNUM + bgeu,pt %xcc, 1f + nop sethi %hi(_C_LABEL(intrlev)), %g3 or %g3, %lo(_C_LABEL(intrlev)), %g3 + sllx %g5, 3, %g5 ! Calculate entry number ldx [%g3 + %g5], %g5 ! We have a pointer to the handler - +1: brnz,pt %g5, setup_sparcintr nop |