From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965064AbWH2Q20 (ORCPT ); Tue, 29 Aug 2006 12:28:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965065AbWH2Q20 (ORCPT ); Tue, 29 Aug 2006 12:28:26 -0400 Received: from omx1-ext.sgi.com ([192.48.179.11]:38546 "EHLO omx1.americas.sgi.com") by vger.kernel.org with ESMTP id S965064AbWH2Q2Z (ORCPT ); Tue, 29 Aug 2006 12:28:25 -0400 Date: Tue, 29 Aug 2006 09:28:08 -0700 (PDT) From: Christoph Lameter To: David Howells cc: Ralf Baechle , Nick Piggin , Arjan van de Ven , Dong Feng , ak@suse.de, Paul Mackerras , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: Why Semaphore Hardware-Dependent? In-Reply-To: <5878.1156868702@warthog.cambridge.redhat.com> Message-ID: References: <20060829162055.GA31159@linux-mips.org> <44F395DE.10804@yahoo.com.au> <1156750249.3034.155.camel@laptopd505.fenrus.org> <11861.1156845927@warthog.cambridge.redhat.com> <5878.1156868702@warthog.cambridge.redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Aug 2006, David Howells wrote: > Ralf Baechle wrote: > > > > Which arches do not support cmpxchg? > > > > MIPS, Alpha - probably any pure RISC load/store architecture. > > Some of these have LL/SC or equivalent instead, but ARM5 and before, FRV, M68K > before 68020 to name but a few. This is all pretty ancient hardware, right? And they are mostly single processor so no need to worry about concurrency. Just disable interrupts. > And anything that implements CMPXCHG with spinlocks is a really bad candidate > for CMPXCHG-based rwsems. Those will optimize out if it is a single processor configuration.