summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/ia64/include/cpufunc.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/ia64/include/cpufunc.h b/sys/ia64/include/cpufunc.h
index 932ca89..5de8341 100644
--- a/sys/ia64/include/cpufunc.h
+++ b/sys/ia64/include/cpufunc.h
@@ -193,13 +193,14 @@ intr_disable(void)
register_t psr;
__asm __volatile ("mov %0=psr;;" : "=r"(psr));
disable_intr();
- return (psr);
+ return ((psr & IA64_PSR_I) ? 1 : 0);
}
static __inline void
-intr_restore(critical_t psr)
+intr_restore(register_t ie)
{
- __asm __volatile ("mov psr.l=%0;; srlz.d" :: "r"(psr));
+ if (ie)
+ enable_intr();
}
#endif /* _KERNEL */
OpenPOWER on IntegriCloud