From: Peter Zijlstra Date: Wed, 9 Apr 2014 19:51:29 +0000 (+0200) Subject: locking,arch,avr32: Fold atomic_ops X-Git-Tag: fixes-against-v3.18-rc2~102^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d325209b6000dcd13404ee946d2292e15a56718c;p=pandora-kernel.git locking,arch,avr32: Fold atomic_ops Many of the atomic op implementations are the same except for one instruction; fold the lot into a few CPP macros and reduce LoC. This also prepares for easy addition of new ops. Requires the asm_op because of eor. AVR32 is a bit special in that its ADD/SUB instructions are not symmetric. Its SUB instruction allows for an 21bit immediate. Signed-off-by: Peter Zijlstra Cc: Hans-Christian Egtvedt Cc: Haavard Skinnemoen Cc: Hans-Christian Egtvedt Cc: Linus Torvalds Cc: Paul E. McKenney Link: http://lkml.kernel.org/r/20140531141445.GD16155@laptop.programming.kicks-ass.net Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed