diff options
author | attilio <attilio@FreeBSD.org> | 2011-07-18 15:19:40 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-07-18 15:19:40 +0000 |
commit | 9a6ff5ad378cfaaa99c5162e2b0f6e4cb6a3c796 (patch) | |
tree | 3d2deee4220ced3fd75b40dbd48afd2ed84428f6 /sys/kern/kern_intr.c | |
parent | 838b39dd924348287b3ed188b8a6b642390c9429 (diff) | |
download | FreeBSD-src-9a6ff5ad378cfaaa99c5162e2b0f6e4cb6a3c796.zip FreeBSD-src-9a6ff5ad378cfaaa99c5162e2b0f6e4cb6a3c796.tar.gz |
- Remove the eintrcnt/eintrnames usage and introduce the concept of
sintrcnt/sintrnames which are symbols containing the size of the 2
tables.
- For amd64/i386 remove the storage of intr* stuff from assembly files.
This area can be widely improved by applying the same to other
architectures and likely finding an unified approach among them and
move the whole code to be MI. More work in this area is expected to
happen fairly soon.
No MFC is previewed for this patch.
Tested by: pluknet
Reviewed by: jhb
Approved by: re (kib)
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r-- | sys/kern/kern_intr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 9cde590..b9ed881 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -1869,8 +1869,7 @@ SYSINIT(start_softintr, SI_SUB_SOFTINTR, SI_ORDER_FIRST, start_softintr, static int sysctl_intrnames(SYSCTL_HANDLER_ARGS) { - return (sysctl_handle_opaque(oidp, intrnames, eintrnames - intrnames, - req)); + return (sysctl_handle_opaque(oidp, intrnames, sintrnames, req)); } SYSCTL_PROC(_hw, OID_AUTO, intrnames, CTLTYPE_OPAQUE | CTLFLAG_RD, @@ -1879,8 +1878,7 @@ SYSCTL_PROC(_hw, OID_AUTO, intrnames, CTLTYPE_OPAQUE | CTLFLAG_RD, static int sysctl_intrcnt(SYSCTL_HANDLER_ARGS) { - return (sysctl_handle_opaque(oidp, intrcnt, - (char *)eintrcnt - (char *)intrcnt, req)); + return (sysctl_handle_opaque(oidp, intrcnt, sintrcnt, req)); } SYSCTL_PROC(_hw, OID_AUTO, intrcnt, CTLTYPE_OPAQUE | CTLFLAG_RD, @@ -1894,9 +1892,12 @@ DB_SHOW_COMMAND(intrcnt, db_show_intrcnt) { u_long *i; char *cp; + u_int j; cp = intrnames; - for (i = intrcnt; i != eintrcnt && !db_pager_quit; i++) { + j = 0; + for (i = intrcnt; j < (sintrcnt / sizeof(u_long)) && !db_pager_quit; + i++, j++) { if (*cp == '\0') break; if (*i != 0) |