[AVR32] Fix atomic_add_unless() and atomic_sub_unless()
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 18 Jul 2007 18:06:04 +0000 (20:06 +0200)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 18 Jul 2007 18:47:04 +0000 (20:47 +0200)
commit3da86ee4f1884c70edbf76f61bfbbe028d2d1685
treebe4216a6846b45cde1418706b357fca678a9f966
parentf3e26984f1794f3472a50f330c5561766faa477b
[AVR32] Fix atomic_add_unless() and atomic_sub_unless()

These functions depend on "result" being initalized to 0, but "result"
is not included as an input constraint to the inline assembly block
following its initialization, only as an output constraint. Thus gcc
thinks it doesn't need to initialize it, so result ends up undefined
if the "unless" condition is true.

This fixes an oops in sunrpc where the faulty atomics caused
rpciod_up() to not start the workqueue as it should.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
include/asm-avr32/atomic.h