[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090430083102.GB21699@elte.hu>
Date: Thu, 30 Apr 2009 10:31:02 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] atomic: fix atomic_long_cmpxchg/xchg for 64 bit
architectures
* Heiko Carstens <heiko.carstens@...ibm.com> wrote:
> From: Heiko Carstens <heiko.carstens@...ibm.com>
>
> On a linux-next allyesconfig build:
>
> kernel/trace/ring_buffer.c:1726:
> warning: passing argument 1 of 'atomic_cmpxchg' from incompatible pointer type
> linux-next/arch/s390/include/asm/atomic.h:112:
> note: expected 'struct atomic_t *' but argument is of type 'struct atomic64_t *'
>
> atomic_long_cmpxchg and atomic_long_xchg are incorrectly defined for
> 64 bit architectures. They should be mapped to the atomic64_* variants.
>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
> Signed-off-by: Heiko Carstens <heiko.carstens@...ibm.com>
> ---
> include/asm-generic/atomic.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux-next/include/asm-generic/atomic.h
> ===================================================================
> --- linux-next.orig/include/asm-generic/atomic.h
> +++ linux-next/include/asm-generic/atomic.h
> @@ -132,9 +132,9 @@ static inline long atomic_long_add_unles
> #define atomic_long_inc_not_zero(l) atomic64_inc_not_zero((atomic64_t *)(l))
>
> #define atomic_long_cmpxchg(l, old, new) \
> - (atomic_cmpxchg((atomic64_t *)(l), (old), (new)))
> + (atomic64_cmpxchg((atomic64_t *)(l), (old), (new)))
> #define atomic_long_xchg(v, new) \
> - (atomic_xchg((atomic64_t *)(l), (new)))
> + (atomic64_xchg((atomic64_t *)(l), (new)))
Acked-by: Ingo Molnar <mingo@...e.hu>
That's due to the local_cmpchg() use the tracing tree grew recently,
right? It appears it was never used in generic code before.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists