linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* 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: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  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
[parent not found: <20060526073815.32337.qmail@web8401.mail.in.yahoo.com>]

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).