Conceivably this could force all STREAMS driver writers to compile their drivers with "-mregparm=3" in order to be able to run on SuSE 9.1.
If LiS is compiled with that option then STREAMS drivers must be as well since they call functions within LiS and must follow the subroutine calling convention.
The most desirable outcome would be for LiS to provide wrapper functions for the kernel routines, as it now does via osif, lismem, lislocks and lispci, and make these wrapper functions callable with stack parameters as in the past, but with the calls to the kernel functions able to use register passing.
But here's the problem. Consider:
int lis_foo(args)
{
}
How do you get lis_foo to compile for stack arguments and kernel_foo to compile for register arguments? Not just by setting "-mregparm=3" on the compiler command line.
Does anyone know of GNU C pragmas or the like to do this? If so, please let me know.
It could be done with assembler code but there goes the portability to other architectures.
-- Dave
At 02:52 PM 5/27/2004, Steffen Hieber wrote:
Anyway, the crash which led to patch2.LiS had nothing to do with the missing or wrong format arguments, the reason for the crash is the CONFIG_REGPARM option SuSE enabled when building the default kernel. With CONFIG_REGPARM=y the kernel and the kernel modules are compiled with the compiler option "-mregparm=3", with which the first three arguments of a function call are passed in registers. With this option set in the kernel, LiS needs to be compiled with the same compiler option (kernel space only, not the user space utilities).
