summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include/intr.h
diff options
context:
space:
mode:
authorbenno <benno@FreeBSD.org>2001-06-27 12:17:23 +0000
committerbenno <benno@FreeBSD.org>2001-06-27 12:17:23 +0000
commita304a71cd25c73930405725cfd4fb9ef20765095 (patch)
treef092fa9d1f56dd5b5b191d0706160d1bf47e696e /sys/powerpc/include/intr.h
parentc92b4bbf4fb01530ddb811f7dc6ef6bbf0920d09 (diff)
downloadFreeBSD-src-a304a71cd25c73930405725cfd4fb9ef20765095.zip
FreeBSD-src-a304a71cd25c73930405725cfd4fb9ef20765095.tar.gz
Fix the atomic_*_32 operations. These were written before I had the ability
to test them properly and before I had a working knowledge of GCC asm constraints.
Diffstat (limited to 'sys/powerpc/include/intr.h')
-rw-r--r--sys/powerpc/include/intr.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/powerpc/include/intr.h b/sys/powerpc/include/intr.h
index dac84ec..a723bd4 100644
--- a/sys/powerpc/include/intr.h
+++ b/sys/powerpc/include/intr.h
@@ -93,15 +93,16 @@ extern int imask[];
/* Following code should be implemented with lwarx/stwcx to avoid
* the disable/enable. i need to read the manual once more.... */
static __inline void
-softintr(ipl)
- int ipl;
+softintr(int ipl)
{
- int msrsave;
+ unsigned int msrsave;
+
+ msrsave = mfmsr();
+ mtmsr(msrsave & ~PSL_EE);
- __asm__ volatile("mfmsr %0" : "=r"(msrsave));
- __asm__ volatile("mtmsr %0" :: "r"(msrsave & ~PSL_EE));
ipending |= 1 << ipl;
- __asm__ volatile("mtmsr %0" :: "r"(msrsave));
+
+ mtmsr(msrsave);
}
#define ICU_LEN 64
OpenPOWER on IntegriCloud