Re: [patch 04/23] Add cmpxchg_local to avr32

From: Haavard Skinnemoen
Date: Mon Aug 13 2007 - 12:14:53 EST


On Sun, 12 Aug 2007 10:54:38 -0400
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx> wrote:

> Use the new generic cmpxchg_local (disables interrupt) for 8, 16 and
> 64 bits cmpxchg_local. Use the __cmpxchg_u32 primitive for 32 bits
> cmpxchg_local.
>
> Note that cmpxchg only uses the __cmpxchg_u32 or __cmpxchg_u64 and
> will cause a linker error if called with 8 or 16 bits argument.

Actually, you'll get a linker error if it's called with a 64-bit
argument too. But your patch doesn't use __cmpxchg_u64 so it's fine.

> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>

Looks good to me. I suppose we _could_ implement 8- and 16-bit cmpxchg
using stcond, but I really doubt it's worth it.

Acked-by: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/