Re: Linux-2.6.5-1.358 SMP

Roland Dreier
2004-10-05T23:47:29Z

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