diff options
author | jmg <jmg@FreeBSD.org> | 2003-07-16 00:08:43 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2003-07-16 00:08:43 +0000 |
commit | a54595f215d4214fd4bf8611ab2de5ebb1cc5f69 (patch) | |
tree | 19d7e5f94f5d81ed8d6b0f598793c553264f1e27 /sys/sparc64/include | |
parent | b103245463e76b8f23e542dab167cca640c53b0b (diff) | |
download | FreeBSD-src-a54595f215d4214fd4bf8611ab2de5ebb1cc5f69.zip FreeBSD-src-a54595f215d4214fd4bf8611ab2de5ebb1cc5f69.tar.gz |
add support for interrupt counting on sparc64. This copies part of the
code from i386. The code has a slight bogon that interrupts are counted
twice. Once on the ithread dispatch and once on the dispatch for the vector
vmstat -i and systat -vm now contains interrupt counts.
Reviewed by: jake
Diffstat (limited to 'sys/sparc64/include')
-rw-r--r-- | sys/sparc64/include/asmacros.h | 11 | ||||
-rw-r--r-- | sys/sparc64/include/intr_machdep.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sys/sparc64/include/asmacros.h b/sys/sparc64/include/asmacros.h index 2fd5143..a0e317b 100644 --- a/sys/sparc64/include/asmacros.h +++ b/sys/sparc64/include/asmacros.h @@ -69,6 +69,17 @@ mov r3, r2 /* + * Atomically increment an u_long in memory. + */ +#define ATOMIC_INC_ULONG(r1, r2, r3) \ + ldx [r1], r2 ; \ +9: add r2, 1, r3 ; \ + casxa [r1] ASI_N, r2, r3 ; \ + cmp r2, r3 ; \ + bne,pn %icc, 9b ; \ + mov r3, r2 + +/* * Atomically clear a number of bits of an integer in memory. */ #define ATOMIC_CLEAR_INT(r1, r2, r3, bits) \ diff --git a/sys/sparc64/include/intr_machdep.h b/sys/sparc64/include/intr_machdep.h index 2f9c1ef..9d29730 100644 --- a/sys/sparc64/include/intr_machdep.h +++ b/sys/sparc64/include/intr_machdep.h @@ -33,6 +33,7 @@ #define PIL_MAX (1 << 4) #define IV_MAX (1 << 11) +#define IV_NAMLEN 1024 #define IR_FREE (PIL_MAX * 2) |