diff options
author | marius <marius@FreeBSD.org> | 2009-12-23 20:23:04 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2009-12-23 20:23:04 +0000 |
commit | c9629c4c1a5671f6b2aa7bf025bf9b3d0e28eac9 (patch) | |
tree | a92a79bc758c6ee214348ee967cb30222ccfce4f /sys/sparc64 | |
parent | f417257f2a0c3ff8d545586df6f3dd69f77525c8 (diff) | |
download | FreeBSD-src-c9629c4c1a5671f6b2aa7bf025bf9b3d0e28eac9.zip FreeBSD-src-c9629c4c1a5671f6b2aa7bf025bf9b3d0e28eac9.tar.gz |
Don't use an out register to hold the vector number across the call
of the interrupt handler in intr_fast() as the handler might clobber
it (no in-tree handler currently does but an upcoming one will).
While at it, tidy the register usage in the interrupt counting code.
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/interrupt.S | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/sparc64/sparc64/interrupt.S b/sys/sparc64/sparc64/interrupt.S index ca4456f..75a9727 100644 --- a/sys/sparc64/sparc64/interrupt.S +++ b/sys/sparc64/sparc64/interrupt.S @@ -176,7 +176,7 @@ ENTRY(intr_fast) 3: ldx [%l0 + IR_FUNC], %o0 ldx [%l0 + IR_ARG], %o1 - lduw [%l0 + IR_VEC], %o2 + lduw [%l0 + IR_VEC], %l2 ldx [PCPU(IRFREE)], %l1 stx %l1, [%l0 + IR_NEXT] @@ -188,17 +188,17 @@ ENTRY(intr_fast) call %o0 mov %o1, %o0 - /* intrcnt[intr_countp[%o2]]++ */ - SET(intrcnt, %l7, %l2) /* %l2 = intrcnt */ - prefetcha [%l2] ASI_N, 1 - SET(intr_countp, %l7, %l3) /* %l3 = intr_countp */ - sllx %o2, 1, %l4 /* %l4 = vec << 1 */ - lduh [%l4 + %l3], %l5 /* %l5 = intr_countp[%o2] */ - sllx %l5, 3, %l6 /* %l6 = intr_countp[%o2] << 3 */ - add %l6, %l2, %l7 /* %l7 = intrcnt[intr_countp[%o2]] */ - ldx [%l7], %l2 + /* intrcnt[intr_countp[%l2]]++ */ + SET(intrcnt, %l7, %l3) /* %l3 = intrcnt */ + prefetcha [%l3] ASI_N, 1 + SET(intr_countp, %l7, %l4) /* %l4 = intr_countp */ + sllx %l2, 1, %l2 /* %l2 = vec << 1 */ + lduh [%l4 + %l2], %l4 /* %l4 = intr_countp[%l2] */ + sllx %l4, 3, %l4 /* %l4 = intr_countp[%l2] << 3 */ + add %l4, %l3, %l4 /* %l4 = intrcnt[intr_countp[%l2]] */ + ldx [%l4], %l2 inc %l2 - stx %l2, [%l7] + stx %l2, [%l4] ba,a %xcc, 1b nop |