Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755168Ab1C3Mug (ORCPT ); Wed, 30 Mar 2011 08:50:36 -0400 Received: from www.linutronix.de ([62.245.132.108]:38463 "EHLO linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752854Ab1C3Mue (ORCPT ); Wed, 30 Mar 2011 08:50:34 -0400 Date: Wed, 30 Mar 2011 14:50:29 +0200 (CEST) From: Thomas Gleixner To: Arnd Bergmann cc: Guan Xuetao , Paul Mundt , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH] unicore32 fix: remove arch-specific futex support In-Reply-To: <201103301440.03479.arnd@arndb.de> Message-ID: References: <01eb01cbeeb7$30390460$90ab0d20$@mprc.pku.edu.cn> <201103301417.20027.arnd@arndb.de> <201103301440.03479.arnd@arndb.de> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1057 Lines: 31 On Wed, 30 Mar 2011, Arnd Bergmann wrote: > On Wednesday 30 March 2011, Thomas Gleixner wrote: > > The problem is that you need cmpxchg in user space as well. > > > > ARM does this with some syscall magic for machines which do not have > > cmpxchg. > > Ah, right. I wonder how sh does it. > > I also remember that the original unicore32 ABI had support for a cmpxchg > system call, but that was removed with the move to the generic syscall > table. > > It is of course possible to add it back using the __NR_arch_specific_syscall > entry point. Either that or you take a trap. None of them is pretty. If the only purpose is futex support, then we can add an extra flag to the futex ops and handle it there via asm-generic/futex.h. That would avoid an extra syscall in the contended case. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/