summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include/cpufunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/alpha/include/cpufunc.h')
-rw-r--r--sys/alpha/include/cpufunc.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/alpha/include/cpufunc.h b/sys/alpha/include/cpufunc.h
index e7d37f0..cabfe0f 100644
--- a/sys/alpha/include/cpufunc.h
+++ b/sys/alpha/include/cpufunc.h
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <machine/chipset.h>
+#include <machine/alpha_cpu.h>
#ifdef __GNUC__
@@ -44,6 +45,33 @@ breakpoint(void)
#endif
+/*
+ * Bogus interrupt manipulation
+ */
+static __inline void
+disable_intr(void)
+{
+ alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH);
+}
+
+static __inline void
+enable_intr(void)
+{
+ alpha_pal_swpipl(ALPHA_PSL_IPL_0);
+}
+
+static __inline u_int
+save_intr(void)
+{
+ return alpha_pal_rdps() & ALPHA_PSL_IPL_MASK;
+}
+
+static __inline void
+restore_intr(u_int ipl)
+{
+ alpha_pal_swpipl(ipl);
+}
+
#endif /* _KERNEL */
#endif /* !_MACHINE_CPUFUNC_H_ */
OpenPOWER on IntegriCloud