summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/hppa/include/intr.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/arch/hppa/include/intr.h b/sys/arch/hppa/include/intr.h
index 8cca16943e8..ab94763bd2a 100644
--- a/sys/arch/hppa/include/intr.h
+++ b/sys/arch/hppa/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.27 2009/12/31 12:52:35 jsing Exp $ */
+/* $OpenBSD: intr.h,v 1.28 2009/12/31 13:22:02 jsing Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -106,6 +106,23 @@ splx(int ncpl)
(void)spllower(ncpl);
}
+static __inline register_t
+hppa_intr_disable(void)
+{
+ register_t eiem;
+
+ __asm __volatile("mfctl %%cr15, %0": "=r" (eiem));
+ __asm __volatile("mtctl %r0, %cr15");
+
+ return eiem;
+}
+
+static __inline void
+hppa_intr_enable(register_t eiem)
+{
+ __asm __volatile("mtctl %0, %%cr15":: "r" (eiem));
+}
+
#define splsoftclock() splraise(IPL_SOFTCLOCK)
#define splsoftnet() splraise(IPL_SOFTNET)
#define splbio() splraise(IPL_BIO)