From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756593AbcIHST7 (ORCPT ); Thu, 8 Sep 2016 14:19:59 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:59276 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752867AbcIHSTy (ORCPT ); Thu, 8 Sep 2016 14:19:54 -0400 Date: Thu, 8 Sep 2016 20:19:05 +0200 From: Peter Zijlstra To: Vineet Gupta Cc: linux-kernel@vger.kernel.org, Alexey Brodkin , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Catalin Marinas , Will Deacon , Ralf Baechle , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Chris Metcalf , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andrew Morton , Zhaoxiu Zeng , Linus Walleij , Matthew Wilcox , Alexander Potapenko , Andrey Ryabinin , Herbert Xu , Ming Lin , Arnd Bergmann , Geert Uytterhoeven , Borislav Petkov , Andi Kleen , Boqun Feng , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arch@vger.kernel.org Subject: Re: [PATCH] atomic64: No need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE Message-ID: <20160908181905.GY10153@twins.programming.kicks-ass.net> References: <1473352098-5822-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1473352098-5822-1-git-send-email-vgupta@synopsys.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 08, 2016 at 09:28:18AM -0700, Vineet Gupta wrote: > This came to light when implementing native 64-bit atomics for ARCv2. > > The atomic64 self-test code uses CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE > to check whether atomic64_dec_if_positive() is available. > It seems it was needed when not every arch defined it. > However as of current code the Kconfig option seems needless > > - for CONFIG_GENERIC_ATOMIC64 it is auto-enabled in lib/Kconfig and a > generic definition of API is present lib/atomic64.c > - arches with native 64-bit atomics select it in arch/*/Kconfig and > define the API in their headers > > So I see no point in keeping the Kconfig option > > Compile tested for 2 representatives: > - blackfin (CONFIG_GENERIC_ATOMIC64) > - x86 (!CONFIG_GENERIC_ATOMIC64) > > Also logistics wise it seemed simpler to just do this in 1 patch vs. > splitting per arch - but I can break it up if maintainer feel that > is better to avoid conflicts. Works for me; you want me to take this, or do you need it for you ARCv2 patches?