From: Ingo Molnar <mingo@elte.hu>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] atomic: fix atomic_long_cmpxchg/xchg for 64 bit architectures
Date: Thu, 30 Apr 2009 10:31:02 +0200 [thread overview]
Message-ID: <20090430083102.GB21699@elte.hu> (raw)
In-Reply-To: <20090429143601.1a79ab8f@osiris.boeblingen.de.ibm.com>
* Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> From: Heiko Carstens <heiko.carstens@de.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@polymtl.ca>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.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@elte.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
prev parent reply other threads:[~2009-04-30 8:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 12:36 Heiko Carstens
2009-04-29 12:48 ` Mathieu Desnoyers
2009-04-30 8:31 ` Ingo Molnar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090430083102.GB21699@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®