Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hppa/include Provide hppa_{enable, disable}_irq



details:   https://anonhg.NetBSD.org/src/rev/010bc44fe8a0
branches:  trunk
changeset: 779344:010bc44fe8a0
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon May 21 07:42:51 2012 +0000

description:
Provide hppa_{enable,disable}_irq

diffstat:

 sys/arch/hppa/include/cpufunc.h |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 276a5b4228f1 -r 010bc44fe8a0 sys/arch/hppa/include/cpufunc.h
--- a/sys/arch/hppa/include/cpufunc.h   Mon May 21 06:30:18 2012 +0000
+++ b/sys/arch/hppa/include/cpufunc.h   Mon May 21 07:42:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.h,v 1.16 2012/04/03 12:07:26 skrll Exp $       */
+/*     $NetBSD: cpufunc.h,v 1.17 2012/05/21 07:42:51 skrll Exp $       */
 
 /*     $OpenBSD: cpufunc.h,v 1.17 2000/05/15 17:22:40 mickey Exp $     */
 
@@ -172,6 +172,18 @@
        __asm volatile("pdtlbe %%r0(%%sr1, %0)":: "r" (va));
 }
 
+static __inline void
+hppa_disable_irq(void)
+{
+        __asm volatile("rsm %0, %%r0" :: "i" (PSW_I) : "memory");
+}
+
+static __inline void
+hppa_enable_irq(void)
+{
+        __asm volatile("ssm %0, %%r0" :: "i" (PSW_I) : "memory");
+}
+
 #ifdef _KERNEL
 extern int (*cpu_hpt_init)(vaddr_t, vsize_t);
 



Home | Main Index | Thread Index | Old Index