summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2004-06-28 02:49:11 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2004-06-28 02:49:11 +0000
commit736a57c93725e4f3f68f7184c4dc8270d403774d (patch)
tree8d4ac5c38d462dcae3655b6b8a66efd832795bce /sys/arch/powerpc
parent0d2be8ad3b143cf87a05074745df2c21da97aaa7 (diff)
Use new event counter API for interrupt counting on macppc. drahn@ ok
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r--sys/arch/powerpc/include/intr.h20
-rw-r--r--sys/arch/powerpc/include/types.h4
2 files changed, 14 insertions, 10 deletions
diff --git a/sys/arch/powerpc/include/intr.h b/sys/arch/powerpc/include/intr.h
index eb01f4de93e..ef503b63a68 100644
--- a/sys/arch/powerpc/include/intr.h
+++ b/sys/arch/powerpc/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.25 2003/10/31 03:04:16 drahn Exp $ */
+/* $OpenBSD: intr.h,v 1.26 2004/06/28 02:49:10 aaron Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA.
@@ -50,7 +50,9 @@
#define IST_EDGE 2
#define IST_LEVEL 3
-#ifndef _LOCORE
+#if defined(_KERNEL) && !defined(_LOCORE)
+
+#include <sys/evcount.h>
#define PPC_NIRQ 66
#define PPC_CLK_IRQ 64
@@ -158,13 +160,13 @@ set_sint(int pending)
*/
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;
+ struct intrhand *ih_next;
+ int (*ih_fun)(void *);
+ void *ih_arg;
+ struct evcount ih_count;
+ int ih_level;
+ int ih_irq;
+ char *ih_what;
};
extern int ppc_configed_intr_cnt;
#define MAX_PRECONF_INTR 16
diff --git a/sys/arch/powerpc/include/types.h b/sys/arch/powerpc/include/types.h
index 73f270b6aa2..d92e17ddbe3 100644
--- a/sys/arch/powerpc/include/types.h
+++ b/sys/arch/powerpc/include/types.h
@@ -1,5 +1,5 @@
/* $NetBSD: types.h,v 1.1 1996/09/30 16:34:36 ws Exp $ */
-/* $OpenBSD: types.h,v 1.12 2002/09/15 09:01:59 deraadt Exp $ */
+/* $OpenBSD: types.h,v 1.13 2004/06/28 02:49:10 aaron Exp $ */
/*-
* Copyright (C) 1995 Wolfgang Solfrank.
@@ -67,4 +67,6 @@ typedef struct label_t {
#define __BROKEN_INDIRECT_CONFIG
+#define __HAVE_EVCOUNT
+
#endif /* _POWERPC_TYPES_H_ */