unresolved symbol litodp,dptoli,dpmul - floating point operations in kernel
hello,
I am using a mips cross compiler (mips-linux-gcc, version 2.95.3) to build my driver
I am using some floating point operations in a wireless lan driver for a mips platform in ucLinux, When i load the driver I am getting unresolved symbols
Quoted 4 lines
insmod: unresolved symbol dptoli
insmod: unresolved symbol dpmul
insmod: unresolved symbol litodp
And somebody told me that we cannot use floating point operations in kernel code, but i desperately need to use floating point operations. please tell me how to use floating point operations in kernel code.
thanks & regards
durai
Quoted 10 lines · durai
I am using a mips cross compiler (mips-linux-gcc, version 2.95.3) to build my driver
I am using some floating point operations in a wireless lan driver for a mips platform in ucLinux, When i load the driver I am getting unresolved symbolsQuoted 4 lines
insmod: unresolved symbol dptoli
insmod: unresolved symbol dpmul
insmod: unresolved symbol litodpAnd somebody told me that we cannot use floating point operations in kernel code, but i desperately need to use floating point operations. please tell me how to use floating point operations in kernel code.
Do not use floating point operations in kernel code. Re-implement using fixed point or something like that.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 9 lines · Geert Uytterhoeven
Quoted 8 lines · durai
I am using a mips cross compiler (mips-linux-gcc, version 2.95.3) to build my driver
I am using some floating point operations in a wireless lan driver for a mips platform in ucLinux, When i load the driver I am getting unresolved symbolsQuoted 4 lines
insmod: unresolved symbol dptoli
insmod: unresolved symbol dpmul
insmod: unresolved symbol litodp
Quoted 6 lines
Quoted 2 lines
And somebody told me that we cannot use floating point operations in kernel code, but i desperately need to use floating point operations. please tell me how to use floating point operations in kernel code.
Do not use floating point operations in kernel code. Re-implement using fixed point or something like that.
If you are really really desparate, something like the following might work.
void use_fpu(void)
{
if (is_fpu_owner()) {
save_fp(current);
loose_fpu();
enable_fpu();
}
local_irq_save(flags);
/* now use fpu and store the results */
local_irq_restore(flags);
}I like to emphsize this is just a hack and I am not even sure if it will work at all. If compiler complains you might have to change the
CC flag for that file or use fpu with inline assembly.
Jun
Quoted 21 lines · Jun Sun
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
insmod: unresolved symbol dptoli
insmod: unresolved symbol dpmul
insmod: unresolved symbol litodpIf you are really really desparate, something like the following might work.
void
use_fpu(void){ if (is_fpu_owner()) { save_fp(current); loose_fpu(); enable_fpu(); } local_irq_save(flags); /* now use fpu and store the results */ local_irq_restore(flags); }
Quoted 3 lines
I like to emphsize this is just a hack and I am not even sure if it will work at all. If compiler complains you might have to change the
CC flag for that file or use fpu with inline assembly.
The symbols he was missing are used for software floating point. Software floating point in kernel space is perfectly ok since it doesn't use the FPU so your hack isn't even needed.
Ralf