[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47656C00.6000501@zytor.com>
Date: Sun, 16 Dec 2007 10:18:40 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Harvey Harrison <harvey.harrison@...il.com>
CC: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 3/4] x86: Unify local_{32|64}.h
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.
> #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.
-hpa
--
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