From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933163AbeEWOCw (ORCPT ); Wed, 23 May 2018 10:02:52 -0400 Received: from mail-vk0-f68.google.com ([209.85.213.68]:47084 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932342AbeEWOCt (ORCPT ); Wed, 23 May 2018 10:02:49 -0400 X-Google-Smtp-Source: AB8JxZpELT9aRo2aBczNVmPEUznVcgsXZtAlxMjPt4Vw5x9+wwgnC9/x9bVGgO02wgGvX79zjK72KHLYME70MQurSOQ= MIME-Version: 1.0 In-Reply-To: <20180523133533.1076-5-mark.rutland@arm.com> References: <20180523133533.1076-1-mark.rutland@arm.com> <20180523133533.1076-5-mark.rutland@arm.com> From: Geert Uytterhoeven Date: Wed, 23 May 2018 16:02:46 +0200 X-Google-Sender-Auth: 1pKloS_E6GBXADYQEIW0rFWdcik Message-ID: Subject: Re: [PATCH 04/13] atomics/treewide: make atomic_fetch_add_unless() optional To: Mark Rutland Cc: Linux Kernel Mailing List , Boqun Feng , Peter Zijlstra , Will Deacon , Vineet Gupta Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 23, 2018 at 3:35 PM, Mark Rutland wrote: > Several architectures these have a near-identical implementation based > on atomic_read() and atomic_cmpxchg() that we can instead define in > , so let's do so, using something close to the existing > x86 implementation with try_cmpxchg(). > > Where an architecture provides its own atomic_fetch_add_unless(), it > must define a preprocessor symbol for it. The instrumented atomics are > updated accordingly. > > Note that arch/arc's existing atomic_fetch_add_unless() had redundant > barriers, as these are already present in its atomic_cmpxchg() > implementation. > > There should be no functional change as a result of this patch. > > Signed-off-by: Mark Rutland > arch/m68k/include/asm/atomic.h | 15 --------------- > include/linux/atomic.h | 23 +++++++++++++++++++++++ For m68k: Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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