diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-24 14:22:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-24 14:22:50 +0000 |
commit | 6e2ea7ce732c94456d0c49db94ed26c8576c51d7 (patch) | |
tree | c02ae173cf40402ad1b514a0bf2501fda214f133 /sys/arch/sgi | |
parent | d52df26f7c3c2366a760882d1c325cf28a961381 (diff) |
new style interrupt counters; pefo ok
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/include/intr.h | 6 | ||||
-rw-r--r-- | sys/arch/sgi/localbus/macebus.c | 9 | ||||
-rw-r--r-- | sys/arch/sgi/pci/macepcibridge.c | 4 |
3 files changed, 11 insertions, 8 deletions
diff --git a/sys/arch/sgi/include/intr.h b/sys/arch/sgi/include/intr.h index 28822126337..7e9a3a847f1 100644 --- a/sys/arch/sgi/include/intr.h +++ b/sys/arch/sgi/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.7 2004/09/21 05:51:15 miod Exp $ */ +/* $OpenBSD: intr.h,v 1.8 2004/09/24 14:22:48 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -213,15 +213,17 @@ void set_sint(int pending); * to hold interrupt handler info. */ +#include <sys/evcount.h> + struct intrhand { struct intrhand *ih_next; int (*ih_fun)(void *); void *ih_arg; - u_long ih_count; int ih_level; int ih_irq; char *ih_what; void *frame; + struct evcount ih_count; }; extern struct intrhand *intrhand[INTMASKSIZE]; diff --git a/sys/arch/sgi/localbus/macebus.c b/sys/arch/sgi/localbus/macebus.c index 7bd0bbcdf08..b4686226f0e 100644 --- a/sys/arch/sgi/localbus/macebus.c +++ b/sys/arch/sgi/localbus/macebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macebus.c,v 1.8 2004/09/21 05:51:15 miod Exp $ */ +/* $OpenBSD: macebus.c,v 1.9 2004/09/24 14:22:49 deraadt Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) @@ -516,11 +516,12 @@ macebus_intr_establish(void *icp, u_long irq, int type, int level, */ ih->ih_fun = ih_fun; ih->ih_arg = ih_arg; - ih->ih_count = 0; ih->ih_next = NULL; ih->ih_level = level; ih->ih_irq = irq; ih->ih_what = ih_what; + evcount_attach(&ih->ih_count, ih_what, (void *)&ih->ih_irq, + &evcount_intr); *p = ih; return (ih); @@ -628,7 +629,7 @@ macebus_do_pending_int(void) while (ih) { ih->frame = &cf; if ((*ih->ih_fun)(ih->ih_arg)) { - ih->ih_count++; + ih->ih_count.ec_count++; } ih = ih->ih_next; } @@ -697,7 +698,7 @@ crimestat=intstat; ih->frame = cf; if ((*ih->ih_fun)(ih->ih_arg)) { catched |= vm; - ih->ih_count++; + ih->ih_count.ec_count++; } ih = ih->ih_next; } diff --git a/sys/arch/sgi/pci/macepcibridge.c b/sys/arch/sgi/pci/macepcibridge.c index 6a478c843a2..85e68bbe962 100644 --- a/sys/arch/sgi/pci/macepcibridge.c +++ b/sys/arch/sgi/pci/macepcibridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macepcibridge.c,v 1.4 2004/09/20 10:31:16 pefo Exp $ */ +/* $OpenBSD: macepcibridge.c,v 1.5 2004/09/24 14:22:49 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se) @@ -426,7 +426,7 @@ pcibr_intr_string(lcv, ih) void *lcv; pci_intr_handle_t ih; { -static char str[16]; + static char str[16]; snprintf(str, sizeof(str), "irq %d", ih); return(str); |