Re: Linux-2.6.5-1.358 SMP

From: Roland Dreier
Date: Tue Oct 05 2004 - 18:48:34 EST


Richard> I need to make some modules that have lots of assembly
Richard> code. This assembly uses the UNIX calling convention and
Richard> can't be re-written (it would take many months). The new
Richard> kernel is compiled with "-mregparam=2". I can't find
Richard> where that's defined. I need to remove it because I
Richard> cannot pass parameters to the assembly stuff in
Richard> registers.

You should be able to use CONFIG_REGPARM to control this. Another
option is just to mark the functions in your source as "asmlinkage"
(which is defined to "__attribute__((regparm(0)))" in
asm-i386/linkage.h). The advantage of using asmlinkage is that your
code will work with anyone's kernel.

- Roland

-
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/