From 736a57c93725e4f3f68f7184c4dc8270d403774d Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Mon, 28 Jun 2004 02:49:11 +0000 Subject: Use new event counter API for interrupt counting on macppc. drahn@ ok --- sys/arch/powerpc/include/intr.h | 20 +++++++++++--------- sys/arch/powerpc/include/types.h | 4 +++- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'sys/arch/powerpc') 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 #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_ */ -- cgit v1.2.3