From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262204AbUJ2Two (ORCPT ); Fri, 29 Oct 2004 15:52:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263504AbUJ2Tve (ORCPT ); Fri, 29 Oct 2004 15:51:34 -0400 Received: from fw.osdl.org ([65.172.181.6]:49883 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S262045AbUJ2T1A (ORCPT ); Fri, 29 Oct 2004 15:27:00 -0400 Date: Fri, 29 Oct 2004 12:26:51 -0700 (PDT) From: Linus Torvalds To: linux-os@analogic.com cc: Kernel Mailing List , Richard Henderson , Andi Kleen , Andrew Morton , Jan Hubicka Subject: Re: Semaphore assembly-code bug In-Reply-To: Message-ID: References: <417550FB.8020404@drdos.com> <1098218286.8675.82.camel@mentorng.gurulabs.com> <41757478.4090402@drdos.com> <20041020034524.GD10638@michonline.com> <1098245904.23628.84.camel@krustophenia.net> <1098247307.23628.91.camel@krustophenia.net> 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 Fri, 29 Oct 2004, Linus Torvalds wrote: > > > Here's a totally untested patch to make the semaphores use "fastcall" > instead of "asmlinkage", and thus pass the argument in %eax instead of on > the stack. Does it work? I have no idea. If it does, it should fix the > particular bug that started this thread.. Oh, sorry, please remove this part, it was totally unintentional (I _told_ you this wasn't tested): > --- 1.4/include/asm-i386/linkage.h 2004-10-16 18:24:37 -07:00 > +++ edited/include/asm-i386/linkage.h 2004-10-29 11:32:18 -07:00 > @@ -1,7 +1,7 @@ > #ifndef __ASM_LINKAGE_H > #define __ASM_LINKAGE_H > > -#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0))) > +#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(3))) > #define FASTCALL(x) x __attribute__((regparm(3))) > #define fastcall __attribute__((regparm(3))) > We're not making all asmlinkage things fastcalls here, we're only doing the semaphores.. Linus