Messages in this thread |  | | From | <> | Subject | Re: [PATCH] Fast Userspace Mutexes. | Date | Fri, 1 Mar 2002 01:46:19 +0100 |
| |
There seem to be a problem with PPC, you didn't put back the PPC405_ERR77 macro in your new implementation. That means you may hit a PPC 405gp CPU bugs and lose atomicity of lwarx/stwcx.
+#define __HAVE_ARCH_UPDATE_COUNT +static inline int __update_count(atomic_t *count, int incr) +{ + int old_count, tmp; + + __asm__ __volatile__("\n" +"1: lwarx %0,0,%3\n" +" srawi %1,%0,31\n" +" andc %1,%0,%1\n" +" add %1,%1,%4\n" ++ PPC405_ERR77(0,%3) +" stwcx. %1,0,%3\n" +" bne 1b" + : "=&r" (old_count), "=&r" (tmp), "=m" (*count) + : "r" (count), "r" (incr), "m" (*count) + : "cc");
Ben.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |