From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Subject: Re: [PATCH] atomic: add *_dec_not_zero Date: Sun, 8 May 2011 22:38:43 -0400 Message-ID: References: <1304458235-28473-1-git-send-email-sven@narfation.org> <20110508092403.GB27807@n2100.arm.linux.org.uk> <201105081133.50824.sven@narfation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <201105081133.50824.sven@narfation.org> Sender: linux-alpha-owner@vger.kernel.org To: Sven Eckelmann Cc: Russell King - ARM Linux , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mips@linux-mips.org, linux-m32r@ml.linux-m32r.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linux-cris-kernel@axis.com, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, x86@kernel.org, Chris Metcalf , David Howells , linux-m68k@lists.linux-m68k.org, linux-am33-list@redhat.com, linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, uclinux-dist-devel@blackfin.uclinux.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org On Sun, May 8, 2011 at 05:33, Sven Eckelmann wrote: > Russell King - ARM Linux wrote: > [...] >> Do we need atomic_dec_not_zero() et.al. in every arch header - is th= ere no >> generic header which it could be added to? > > Mike Frysinger already tried to answer it in > : >> that's what asm-generic is for. =C2=A0if the arch isnt using it, it'= s >> either because the arch needs to convert to it, or they're using SMP >> and asm-generic doesnt yet support that for atomic.h. >> >> for example, the Blackfin port only needed updating for the SMP case= =2E >> in the non-SMP case, we're getting the def from asm-generic/atomic.h= =2E > > Feel free to change that but I just followed the style used by all ot= her > macros and will not redesign the complete atomic*.h idea. what you're doing is currently correct. i think merging SMP support into asm-generic for atomic* will take a bit of pondering first. -mike -- To unsubscribe from this list: send the line "unsubscribe linux-alpha" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f46.google.com ([209.85.213.46]:49040 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756670Ab1EICjF convert rfc822-to-8bit (ORCPT ); Sun, 8 May 2011 22:39:05 -0400 MIME-Version: 1.0 In-Reply-To: <201105081133.50824.sven@narfation.org> References: <1304458235-28473-1-git-send-email-sven@narfation.org> <20110508092403.GB27807@n2100.arm.linux.org.uk> <201105081133.50824.sven@narfation.org> From: Mike Frysinger Date: Sun, 8 May 2011 22:38:43 -0400 Message-ID: Subject: Re: [PATCH] atomic: add *_dec_not_zero Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-arch-owner@vger.kernel.org List-ID: To: Sven Eckelmann Cc: Russell King - ARM Linux , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mips@linux-mips.org, linux-m32r@ml.linux-m32r.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linux-cris-kernel@axis.com, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, x86@kernel.org, Chris Metcalf , David Howells , linux-m68k@lists.linux-m68k.org, linux-am33-list@redhat.com, linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, uclinux-dist-devel@blackfin.uclinux.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Message-ID: <20110509023843.wfLIMeEkYcxtlo_moLpLhcU834QEHVApdLzcyQol9qg@z> On Sun, May 8, 2011 at 05:33, Sven Eckelmann wrote: > Russell King - ARM Linux wrote: > [...] >> Do we need atomic_dec_not_zero() et.al. in every arch header - is there no >> generic header which it could be added to? > > Mike Frysinger already tried to answer it in > : >> that's what asm-generic is for.  if the arch isnt using it, it's >> either because the arch needs to convert to it, or they're using SMP >> and asm-generic doesnt yet support that for atomic.h. >> >> for example, the Blackfin port only needed updating for the SMP case. >> in the non-SMP case, we're getting the def from asm-generic/atomic.h. > > Feel free to change that but I just followed the style used by all other > macros and will not redesign the complete atomic*.h idea. what you're doing is currently correct. i think merging SMP support into asm-generic for atomic* will take a bit of pondering first. -mike