From: Harvey Harrison <harvey.harrison@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 3/4] x86: Unify local_{32|64}.h
Date: Sun, 16 Dec 2007 11:45:01 -0800 [thread overview]
Message-ID: <1197834301.3749.69.camel@brick> (raw)
In-Reply-To: <47656C00.6000501@zytor.com>
On Sun, 2007-12-16 at 10:18 -0800, H. Peter Anvin wrote:
> Harvey Harrison wrote:
> > Introduce macros to deal with X86_32 using longs and X86_64
> > using quads. Small comment fixes to make files match.
> >
> > #define local_read(l) atomic_long_read(&(l)->a)
> > #define local_set(l,i) atomic_long_set(&(l)->a, (i))
> > +/*
> > + * X86_32 uses longs
> > + * X86_64 uses quads
> > + */
> > +#ifdef CONFIG_X86_32
> > +# define ASM_INC incl
> > +# define ASM_DEC decl
> > +# define ASM_ADD addl
> > +# define ASM_SUB subl
> > +# define ASM_XADD xaddl
> > +#else
> > +# define ASM_INC incq
> > +# define ASM_DEC decq
> > +# define ASM_ADD addq
> > +# define ASM_SUB subq
> > +# define ASM_XADD xaddq
> > +#endif
> >
>
> Please put these in <asm/asm.h> using the _ASM_* namespace and include
> the quotation marks.
Will revise.
>
> > #ifdef CONFIG_X86_32
> > # include "local_32.h"
> > diff --git a/include/asm-x86/local_32.h b/include/asm-x86/local_32.h
> > index f3bc4d9..ff6d1d2 100644
> > --- a/include/asm-x86/local_32.h
> > +++ b/include/asm-x86/local_32.h
> > @@ -4,21 +4,21 @@
> > static inline void local_inc(local_t *l)
> > {
> > __asm__ __volatile__(
> > - "incl %0"
> > + "ASM_INC %0"
> > :"+m" (l->a.counter));
>
> You're substituting a macro *inside* a string here.
>
*ahem*, oops. Will fix.
Harvey
prev parent reply other threads:[~2007-12-16 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-16 12:04 [PATCH 3/4] x86: Unify local_{32|64}.h Harvey Harrison
2007-12-16 18:18 ` H. Peter Anvin
2007-12-16 19:45 ` Harvey Harrison [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=1197834301.3749.69.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.