[patch] powerpc: native atomic_add_unless
Nick Piggin
npiggin at suse.de
Mon Jan 23 17:41:46 EST 2006
On Sat, Jan 21, 2006 at 12:25:36PM +0100, Nick Piggin wrote:
> Hi list,
>
> atomic_add_unless (atomic_inc_not_zero) is used in several hot paths in the
> vfs and I'm planning some uses in the memory manager, so it should be as
> small and fast as possible.
>
> Joel had a good suggestion to save a register but all bugs are mine.
>
> Comments?
>
Sorry, this probably doesn't compile without also the following patch
--
Index: linux-2.6/include/asm-powerpc/synch.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/synch.h
+++ linux-2.6/include/asm-powerpc/synch.h
@@ -15,7 +15,7 @@
#endif
#ifdef CONFIG_SMP
-#define ISYNC_ON_SMP "\n\tisync"
+#define ISYNC_ON_SMP "\n\tisync\n"
#define LWSYNC_ON_SMP __stringify(LWSYNC) "\n"
#else
#define ISYNC_ON_SMP
More information about the Linuxppc64-dev
mailing list