summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/alpha/interrupt.c13
-rw-r--r--sys/alpha/alpha/pal.s21
-rw-r--r--sys/alpha/include/alpha_cpu.h3
3 files changed, 34 insertions, 3 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c
index 04d945cc1e4a..6010e745d8de 100644
--- a/sys/alpha/alpha/interrupt.c
+++ b/sys/alpha/alpha/interrupt.c
@@ -1,4 +1,4 @@
-/* $Id: interrupt.c,v 1.7 1998/11/18 23:51:40 dfr Exp $ */
+/* $Id: interrupt.c,v 1.8 1998/11/28 09:55:15 dfr Exp $ */
/* $NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $ */
/*
@@ -59,6 +59,15 @@ struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */
volatile int mc_expected, mc_received;
+static void
+dummy_perf(unsigned long vector, struct trapframe *framep)
+{
+ printf("performance interrupt!\n");
+}
+
+void (*perf_irq)(unsigned long, struct trapframe *) = dummy_perf;
+
+
void
interrupt(a0, a1, a2, framep)
unsigned long a0, a1, a2;
@@ -106,7 +115,7 @@ interrupt(a0, a1, a2, framep)
break;
case ALPHA_INTR_PERF: /* interprocessor interrupt */
- printf("performance interrupt!\n");
+ perf_irq(a1, framep);
break;
case ALPHA_INTR_PASSIVE:
diff --git a/sys/alpha/alpha/pal.s b/sys/alpha/alpha/pal.s
index 36ecdfb22e1c..3d179a53042a 100644
--- a/sys/alpha/alpha/pal.s
+++ b/sys/alpha/alpha/pal.s
@@ -348,3 +348,24 @@ LEAF(alpha_pal_swpctx,1)
call_pal PAL_OSF1_swpctx
RET
END(alpha_pal_swpctx)
+
+
+/*
+ * alpha_pal_wrperfmon: Write perf monitor [PRIVILEGED]
+ *
+ * Enables / disables performance monitoring hardware
+ *
+ * Arguments:
+ * a0 function type
+ *
+ * a1 function parameter
+ *
+ * Returns:
+ * v0 0 (failure) or 1 (success)
+ */
+LEAF(alpha_pal_wrperfmon,2)
+ call_pal PAL_OSF1_wrperfmon
+ RET
+ END(alpha_pal_wrperfmon)
+
+
diff --git a/sys/alpha/include/alpha_cpu.h b/sys/alpha/include/alpha_cpu.h
index 4bd105066045..80eb3078a309 100644
--- a/sys/alpha/include/alpha_cpu.h
+++ b/sys/alpha/include/alpha_cpu.h
@@ -1,4 +1,4 @@
-/* $Id: alpha_cpu.h,v 1.3 1998/06/14 13:45:10 dfr Exp $ */
+/* $Id: alpha_cpu.h,v 1.4 1998/12/23 11:50:50 dfr Exp $ */
/* From: NetBSD: alpha_cpu.h,v 1.15 1997/09/20 19:02:34 mjacob Exp */
/*
@@ -326,5 +326,6 @@ void alpha_pal_wrusp __P((unsigned long));
void alpha_pal_wrvptptr __P((unsigned long));
void alpha_pal_wrmces __P((unsigned long));
void alpha_pal_wrval __P((unsigned long));
+unsigned long alpha_pal_wrperfmon __P((unsigned long, unsigned long));
#endif /* __ALPHA_ALPHA_CPU_H__ */