summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc/include/intr.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/arch/powerpc/include/intr.h b/sys/arch/powerpc/include/intr.h
index aad653eeb87..a6999d357b1 100644
--- a/sys/arch/powerpc/include/intr.h
+++ b/sys/arch/powerpc/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.32 2007/03/20 20:59:53 kettenis Exp $ */
+/* $OpenBSD: intr.h,v 1.33 2007/05/19 10:20:57 miod Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA.
@@ -53,6 +53,7 @@
#if defined(_KERNEL) && !defined(_LOCORE)
#include <sys/evcount.h>
+#include <machine/atomic.h>
#define PPC_NIRQ 66
#define PPC_CLK_IRQ 64
@@ -67,7 +68,6 @@ int splsoftnet(void);
void do_pending_int(void);
-
extern int imask[IPL_NUM];
/* SPL asserts */
@@ -118,19 +118,7 @@ spllower(int newcpl)
return(oldcpl);
}
-/* Following code should be implemented with lwarx/stwcx to avoid
- * the disable/enable. i need to read the manual once more.... */
-static __inline void
-set_sint(int pending)
-{
- struct cpu_info *ci = curcpu();
- int msrsave;
-
- __asm__ ("mfmsr %0" : "=r"(msrsave));
- __asm__ volatile ("mtmsr %0" :: "r"(msrsave & ~PSL_EE));
- ci->ci_ipending |= pending;
- __asm__ volatile ("mtmsr %0" :: "r"(msrsave));
-}
+#define set_sint(p) atomic_setbits_int(&curcpu()->ci_ipending, p)
#define SINT_CLOCK 0x10000000
#define SINT_NET 0x20000000