Hi All...
I am trying to run an application compiled with gcc toolchain gcc--3.4.3 and glibc -2.3.4 on PPC 8325 board running Linux 2.6.11....but some how I am getting following error....
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
I was suspecting this error might be because the hardware is not supporting floating point operations and hence i tried a simple program in which I intentionally did some floating point operation but that program was running as expected. So i concluded that it is not a problem related to floating point operations....I even tried compiling the application with classic ppc compiler(Ver 3.4.3) with -msoft-float option enabled, but still the results were same......
After these errors i am not able to get control of the system. If anyone who faced this or any such related issue please help me out like what could be probable reason for this error and what all options i have to debug this issue.....
Thanks & Regards,
Malik
---------------------------------
Yahoo! India Answers Share what your know-how and wisdom
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
On onsdag 24 maj 2006 08.12, sandeep malik wrote:
Hi All...
I am trying to run an application compiled with gcc toolchain gcc--3.4.3
and glibc -2.3.4 on PPC 8325 board running Linux 2.6.11....but some how I
am getting following error....
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
I was suspecting this error might be because the hardware is not
supporting floating point operations and hence i tried a simple program in
which I intentionally did some floating point operation but that program
was running as expected.
No, the warning is more serious than that.
Linux does not save floating point registers when entering kernel.
It might even optimize not to store/reload when doing a context switch.
If your kernel module is using floating point in your kernel code.
It will probably work on a processor not having floating point but will
break in mysterious ways on one supporting hardware floating point.
Do not use floating point in kernel. If you still have to you must take
extremely care.
Turn off kernel preemption.
Save FP registers.
Do your stuff.
Reload FP registers.
Turn on preemption.
But the question is why would you have to?
Simple calculations can be done in fixed point, and complex calculations
does not belong in the kernel.
/RogerL
Roger Larsson wrote:
On onsdag 24 maj 2006 08.12, sandeep malik wrote:
quoted
Hi All...
I am trying to run an application compiled with gcc toolchain gcc--3.4.3
and glibc -2.3.4 on PPC 8325 board running Linux 2.6.11....but some how I
am getting following error....
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
floating point used in kernel (task=c0398410, pc=3184)
I was suspecting this error might be because the hardware is not
supporting floating point operations and hence i tried a simple program in
which I intentionally did some floating point operation but that program
was running as expected.
No, the warning is more serious than that.
Linux does not save floating point registers when entering kernel.
It might even optimize not to store/reload when doing a context switch.
If your kernel module is using floating point in your kernel code.
It will probably work on a processor not having floating point but will
break in mysterious ways on one supporting hardware floating point.
Do not use floating point in kernel. If you still have to you must take
extremely care.
Turn off kernel preemption.
Save FP registers.
Do your stuff.
Reload FP registers.
Turn on preemption.
But the question is why would you have to?
Simple calculations can be done in fixed point, and complex calculations
does not belong in the kernel.
/RogerL
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Hi Sandeep,
I had the same problem as you. The processor I was using didn't have fp
support, so what I did was link the kernel with the gcc library and I
got it to work. However, as Roger said it would break on processors with
fp support. In the long run I looked at the floating point calculations
(log2 in my case) and was able to do the same math with fixed point.
Can you post the floating point calculations you need to do ? Someone
here might be able to do the same using fix point.
Thanks,
Carlos