Re: Semaphore assembly-code bug

From: Linus Torvalds
Date: Fri Oct 29 2004 - 17:27:25 EST




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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/