nios2: Switch to generic __xchg()

The generic __xchg() implementation present in asm-generic/cmpxchg.h is
correct on nios2 and even generates the same code. Switch to this generic
implementation to trim down the amount of ad-hoc copies of the code.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Ley Foon Tan <lftan@altera.com>
This commit is contained in:
Marek Vasut 2015-09-30 22:08:00 +08:00 • committed by Ley Foon Tan
commit 713e9b802e