lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 9 May 2014 11:08:37 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Linux-Arch <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	Will Deacon <will.deacon@....com>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH 11/20] arch,m68k: Fold atomic_ops

Hi Peter,

On Thu, May 8, 2014 at 3:58 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> +#ifdef CONFIG_RMW_INSNS
>
> -static inline void atomic_sub(int i, atomic_t *v)
> -{
> -       __asm__ __volatile__("subl %1,%0" : "+m" (*v) : ASM_DI (i));
> -}
> +#define ATOMIC_OP(op, c_op, asm_op)                                    \
> +static inline void atomic_##op(int i, atomic_t *v)                     \
> +{                                                                      \
> +       __asm__ __volatile__(#asm_op "l %1,%0" : "+m" (*v) : ASM_DI (i));\
> +}                                                                      \

> +#else
> +
> +#define ATOMIC_OP(op, c_op, asm_op)                                    \
> +static inline void atomic_##op(int i, atomic_t *v)                     \
> +{                                                                      \
> +       __asm__ __volatile__(#asm_op "l %1,%0" : "+m" (*v) : ASM_DI (i));\
> +}                                                                      \

These two chunks are identical, so please move them out of the #ifdef.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ