* Help Needed: floating point used in kernel (task=c0398410, pc=3184)
@ 2006-05-24 6:12 sandeep malik
2006-05-24 6:50 ` Roger Larsson
0 siblings, 1 reply; 9+ messages in thread
From: sandeep malik @ 2006-05-24 6:12 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 5103 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Help Needed: floating point used in kernel (task=c0398410, pc=3184)
2006-05-24 6:12 Help Needed: floating point used in kernel (task=c0398410, pc=3184) sandeep malik
@ 2006-05-24 6:50 ` Roger Larsson
2006-05-24 18:03 ` Carlos Munoz
0 siblings, 1 reply; 9+ messages in thread
From: Roger Larsson @ 2006-05-24 6:50 UTC (permalink / raw)
To: linuxppc-embedded
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Help Needed: floating point used in kernel (task=c0398410, pc=3184)
2006-05-24 6:50 ` Roger Larsson
@ 2006-05-24 18:03 ` Carlos Munoz
0 siblings, 0 replies; 9+ messages in thread
From: Carlos Munoz @ 2006-05-24 18:03 UTC (permalink / raw)
To: Roger Larsson; +Cc: linuxppc-embedded
Roger Larsson wrote:
>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
>_______________________________________________
>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
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Help Needed: floating point used in kernel (task=c0398410, pc =3184)
@ 2006-05-24 6:26 Liu Dave-r63238
2006-05-26 7:45 ` sandeep malik
0 siblings, 1 reply; 9+ messages in thread
From: Liu Dave-r63238 @ 2006-05-24 6:26 UTC (permalink / raw)
To: 'sandeep malik', linuxppc-embedded
Malik,
Because PPC8325 have NO float point unit, so please compile all of source code with gcc 8325 compiler
or use fixed simulate. The source code includs kernel, and filesystem.
Dave
-----Original Message-----
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Help Needed: floating point used in kernel (task=c0398410, pc =3184)
2006-05-24 6:26 Help Needed: floating point used in kernel (task=c0398410, pc =3184) Liu Dave-r63238
@ 2006-05-26 7:45 ` sandeep malik
0 siblings, 0 replies; 9+ messages in thread
From: sandeep malik @ 2006-05-26 7:45 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2243 bytes --]
.Hi All...
The problem has been resolved and was no where related to the hardware or software using the floating points....Actually it was associated with wrong linkage....the code was being compiled with gclibc and linked with uClibc....so sometime it was working and sometime it was failing and that too at various different points......
Thanks everyone for ur help.....
Regards,
Malik
.
Liu Dave-r63238 <DaveLiu@freescale.com> wrote:
Malik,
Because PPC8325 have NO float point unit, so please compile all of source code with gcc 8325 compiler
or use fixed simulate. The source code includs kernel, and filesystem.
Dave
-----Original Message-----
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
---------------------------------
Yahoo! India Answers Share what your know-how and wisdom
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
[-- Attachment #2: Type: text/html, Size: 2755 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re:Help Needed: floating point used in kernel (task=c0398410, pc=3184)
@ 2006-05-24 8:14 sandeep malik
2006-05-24 9:48 ` Help " Roger Larsson
0 siblings, 1 reply; 9+ messages in thread
From: sandeep malik @ 2006-05-24 8:14 UTC (permalink / raw)
To: linuxppc-embedded, roger.larsson
[-- Attachment #1: Type: text/plain, Size: 2729 bytes --]
Hi Roger...
Thanks for your response.....but in my case the application is causing this error....this is not coming from any kernel module but a user space application which is creating problem.....and in that application also i have replaced all double occurances with long but still the same error was being flashed......what i suspect is this error is no where related to the usage of floating point as i compiled following code and run the same on the 8325 board and the code was running without any issue.....
#include "stdio.h"
int main()
{
int i=0;
float j= 1.2;
float result;
for(i=0; i<10; i++ )
{
result = result * 2;
}
printf("\n result %f",result);
return 0;
}
The result was exactly what is expected.....so i think this is not related to floating point but might be some other issue......
Are there any other scenarios which can lead to this message????
Regards,
Malik
=====================================================
> 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
---------------------------------
Yahoo! India Answers Share what your know-how and wisdom
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
[-- Attachment #2: Type: text/html, Size: 3599 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Help Needed: floating point used in kernel (task=c0398410, pc=3184)
2006-05-24 8:14 Re:Help Needed: floating point used in kernel (task=c0398410, pc=3184) sandeep malik
@ 2006-05-24 9:48 ` Roger Larsson
2006-05-24 12:30 ` sandeep malik
0 siblings, 1 reply; 9+ messages in thread
From: Roger Larsson @ 2006-05-24 9:48 UTC (permalink / raw)
To: sandeep malik, linuxppc-embedded
On onsdag 24 maj 2006 10.14, you wrote:
> Hi Roger...
> Thanks for your response.....but in my case the application is causing
> this error....
It might be the application who runs, calls kernel for output, drivers used
for output uses floating point.
No application running => no floating point exceptions...
> The result was exactly what is expected.....so i think this is not
> related to floating point but might be some other issue......
Some driver, most likely your if you have made any yourself is
using floating point.
serial, console, ethernet drivers?
>
> Are there any other scenarios which can lead to this message????
Not unless the exception is setup wrong - I would not bet on that.
Lets trace it:
> > floating point used in kernel (task=c0398410, pc=3184)
This message is generated in ./arch/ppc/kernel/head.S
pc = 3184 (in hex)
Now check your System.map
The routine with the closest lower address is your main suspect,
the use of inlines can blur this...
(the task pointer is not that useful, they should have converted it
to process id)
/RogerL
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Help Needed: floating point used in kernel (task=c0398410, pc=3184)
2006-05-24 9:48 ` Help " Roger Larsson
@ 2006-05-24 12:30 ` sandeep malik
0 siblings, 0 replies; 9+ messages in thread
From: sandeep malik @ 2006-05-24 12:30 UTC (permalink / raw)
To: Roger Larsson, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2666 bytes --]
>It might be the application who runs, calls kernel for output, drivers used
>for output uses floating point.
>No application running => no floating point exceptions...
Yes even I do agree with this point.....and need ur help how to check this coz
the main reason is that the error is not consistently coming from one particular point but the location keeps on changing......
if we try to debug and remove from one point it start coming from some other point in the application......
>Some driver, most likely your if you have made any yourself is
>using floating point.
>serial, console, ethernet drivers?
No I am not running any such drivers which are new and can be suspected
all the drivers used are fully tested and working well with all other applications...
>pc = 3184 (in hex)
>Now check your System.map
>The routine with the closest lower address is your main suspect,
>the use of inlines can blur this...
>(the task pointer is not that useful, they should have converted it
>to process id)
Even this pc value is very less. I think it should be in the range of c0000000 - c0233e38(range I got from system.map file)....
if we think pc is returning the four LSB's even then it is not giving any such clue
as there are only ISR's defined in arc/ppc/kernel/head.S which are lying close to this address
Regards,
Malik
Roger Larsson <roger.larsson@norran.net> wrote:
On onsdag 24 maj 2006 10.14, you wrote:
> Hi Roger...
> Thanks for your response.....but in my case the application is causing
> this error....
It might be the application who runs, calls kernel for output, drivers used
for output uses floating point.
No application running => no floating point exceptions...
> The result was exactly what is expected.....so i think this is not
> related to floating point but might be some other issue......
Some driver, most likely your if you have made any yourself is
using floating point.
serial, console, ethernet drivers?
>
> Are there any other scenarios which can lead to this message????
Not unless the exception is setup wrong - I would not bet on that.
Lets trace it:
> > floating point used in kernel (task=c0398410, pc=3184)
This message is generated in ./arch/ppc/kernel/head.S
pc = 3184 (in hex)
Now check your System.map
The routine with the closest lower address is your main suspect,
the use of inlines can blur this...
(the task pointer is not that useful, they should have converted it
to process id)
/RogerL
---------------------------------
Yahoo! India Answers Share what your know-how and wisdom
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
[-- Attachment #2: Type: text/html, Size: 3378 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20060526073815.32337.qmail@web8401.mail.in.yahoo.com>]
* Re: Help Needed: floating point used in kernel (task=c0398410, pc=3184)
[not found] <20060526073815.32337.qmail@web8401.mail.in.yahoo.com>
@ 2006-05-26 7:49 ` Roger Larsson
2006-05-26 14:00 ` sandeep malik
0 siblings, 1 reply; 9+ messages in thread
From: Roger Larsson @ 2006-05-26 7:49 UTC (permalink / raw)
To: sandeep malik, linuxppc-embedded
On fredag 26 maj 2006 09.38, you wrote:
> Hi Roger,
>
> =A0 The problem has been resolved...the issue was in the make
> file.....actually we were cpmiling the code with gclibc and linking it wi=
th
> uClibc which was causing the problem.....But this was real test i faced
> till now as all the tricks realted to the message were failed.....any ways
> thanks for ur help....=20
> =A0 Regards,
> =A0 Malik
Now I am confused!
How could this cause
"floating point used in kernel (task=3Dc0398410, pc=3D3184)"
Both uClibc and gclibc are user land libraries. They should not be able to
cause an kernel floating point operation. No user land code should be able
to do this!
Or is it your kernel linked with uClibc/gclibc? I do not think that is the
right thing to do...
/RogerL
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Help Needed: floating point used in kernel (task=c0398410, pc=3184)
2006-05-26 7:49 ` Roger Larsson
@ 2006-05-26 14:00 ` sandeep malik
0 siblings, 0 replies; 9+ messages in thread
From: sandeep malik @ 2006-05-26 14:00 UTC (permalink / raw)
To: Roger Larsson, linuxppc-embedded
Hi Roger,
The kernel is not linked with uClibc/glibc its user
application only which is linked with uClibc/glibc....
What i am able to conclude is that the library
internall might be using floating point operations and
might be genrating some floating point instructions
which are not handled by our board....and that might
be the reason....or this error might be mapped in a
generic way such that it is getting flashed in some
particular scenarios.....
I might be wrong but as of now i don't have any other
explaination as now after linking with glibs the
application is working fine.....
Regards,
Malik
--- Roger Larsson <roger.larsson@norran.net> wrote:
> On fredag 26 maj 2006 09.38, you wrote:
> > Hi Roger,
> >
> > The problem has been resolved...the issue was in
> the make
> > file.....actually we were cpmiling the code with
> gclibc and linking it with
> > uClibc which was causing the problem.....But this
> was real test i faced
> > till now as all the tricks realted to the message
> were failed.....any ways
> > thanks for ur help....
> > Regards,
> > Malik
>
> Now I am confused!
>
> How could this cause
> "floating point used in kernel (task=c0398410,
> pc=3184)"
>
> Both uClibc and gclibc are user land libraries. They
> should not be able to
> cause an kernel floating point operation. No user
> land code should be able
> to do this!
>
> Or is it your kernel linked with uClibc/gclibc? I do
> not think that is the
> right thing to do...
>
> /RogerL
>
Send instant messages to your online friends http://in.messenger.yahoo.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-05-26 14:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-24 6:12 Help Needed: floating point used in kernel (task=c0398410, pc=3184) sandeep malik
2006-05-24 6:50 ` Roger Larsson
2006-05-24 18:03 ` Carlos Munoz
-- strict thread matches above, loose matches on Subject: below --
2006-05-24 6:26 Help Needed: floating point used in kernel (task=c0398410, pc =3184) Liu Dave-r63238
2006-05-26 7:45 ` sandeep malik
2006-05-24 8:14 Re:Help Needed: floating point used in kernel (task=c0398410, pc=3184) sandeep malik
2006-05-24 9:48 ` Help " Roger Larsson
2006-05-24 12:30 ` sandeep malik
[not found] <20060526073815.32337.qmail@web8401.mail.in.yahoo.com>
2006-05-26 7:49 ` Roger Larsson
2006-05-26 14:00 ` sandeep malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).