summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2013-08-06 08:19:53 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2013-08-06 08:19:53 +0000
commit52b25c22978760637c8252452fa8b5d38a9ae81e (patch)
tree5879350f79a9028ae7d955056ccb43212e767a03
parent9eb02aa080e0343dccbb2e615d010e7ba90af46b (diff)
The atomic_setbits_int() and atomic_clearbits_int() functions touch the
condition code register so mark it s clobbered. Fixes uvm_page_physload() and who knows what else. ok jsg@, mpi@
-rw-r--r--sys/arch/powerpc/include/atomic.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/powerpc/include/atomic.h b/sys/arch/powerpc/include/atomic.h
index 152d4d4a29d..1cc9e487300 100644
--- a/sys/arch/powerpc/include/atomic.h
+++ b/sys/arch/powerpc/include/atomic.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomic.h,v 1.4 2011/03/23 16:54:36 pirofti Exp $ */
+/* $OpenBSD: atomic.h,v 1.5 2013/08/06 08:19:52 kettenis Exp $ */
/* Public Domain */
@@ -17,7 +17,7 @@ atomic_setbits_int(__volatile unsigned int *uip, unsigned int v)
" or %0, %1, %0 \n"
" stwcx. %0, 0, %2 \n"
" bne- 1b \n"
- " sync" : "=&r" (tmp) : "r" (v), "r" (uip) : "memory");
+ " sync" : "=&r" (tmp) : "r" (v), "r" (uip) : "cc", "memory");
}
static __inline void
@@ -30,7 +30,7 @@ atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v)
" andc %0, %0, %1 \n"
" stwcx. %0, 0, %2 \n"
" bne- 1b \n"
- " sync" : "=&r" (tmp) : "r" (v), "r" (uip) : "memory");
+ " sync" : "=&r" (tmp) : "r" (v), "r" (uip) : "cc", "memory");
}
#endif /* defined(_KERNEL) */