All of lore.kernel.org
 help / color / mirror / Atom feed
* Query about Float Point Operation
@ 2010-03-23 12:57 胡杨树
  2010-03-23 13:34 ` Måns Rullgård
  2010-03-29  5:22 ` Rajanikanth H.V
  0 siblings, 2 replies; 9+ messages in thread
From: 胡杨树 @ 2010-03-23 12:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi , guys
I want to do float point operations in kernel like the following,

int foo(double d)
{

return (int)d*d;

}

while compiling output error msg like following:
cannt find eabi_dmul  balabla??????

May I ask any possibility of use float point operation in the kernel space?
Any hints/doc would be appreciated!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Query about Float Point Operation
  2010-03-23 12:57 Query about Float Point Operation 胡杨树
@ 2010-03-23 13:34 ` Måns Rullgård
  2010-03-29  5:22 ` Rajanikanth H.V
  1 sibling, 0 replies; 9+ messages in thread
From: Måns Rullgård @ 2010-03-23 13:34 UTC (permalink / raw)
  To: linux-arm-kernel

914059751 at qq.com writes:

> Hi , guys
> I want to do float point operations in kernel like the following,
>
> int foo(double d)
> {
> return (int)d*d;
> }
>
> May I ask any possibility of use float point operation in the kernel space?

Floating-point in the kernel is not allowed.

-- 
M?ns Rullg?rd
mans at mansr.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Query about Float Point Operation
  2010-03-23 12:57 Query about Float Point Operation 胡杨树
  2010-03-23 13:34 ` Måns Rullgård
@ 2010-03-29  5:22 ` Rajanikanth H.V
  2010-03-29  8:11   ` Russell King - ARM Linux
                     ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Rajanikanth H.V @ 2010-03-29  5:22 UTC (permalink / raw)
  To: linux-arm-kernel

2010/3/23 ??? <914059751@qq.com>:
> Hi , guys
> I want to do float point operations in kernel like the following,
>
> int foo(double d)
> {
>
> return (int)d*d;
>
> }
>
> while compiling output error msg like following:
> cannt find eabi_dmul ?balabla??????
>
> May I ask any possibility of use float point operation in the kernel space?
> Any hints/doc would be appreciated!
I do not know how are you compiling the required function.
Use hardware floating point support. If your target SOC support.
Also verify whether Floating Point Emulation -> VFP is enabled in your config.

> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Query about Float Point Operation
  2010-03-29  5:22 ` Rajanikanth H.V
@ 2010-03-29  8:11   ` Russell King - ARM Linux
  2010-03-29  8:19   ` 答复: " rocky
  2010-03-29 10:59   ` Martin Guy
  2 siblings, 0 replies; 9+ messages in thread
From: Russell King - ARM Linux @ 2010-03-29  8:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 29, 2010 at 10:52:50AM +0530, Rajanikanth H.V wrote:
> 2010/3/23 ??? <914059751@qq.com>:
> > Hi , guys
> > I want to do float point operations in kernel like the following,
> >
> > int foo(double d)
> > {
> >
> > return (int)d*d;
> >
> > }
> >
> > while compiling output error msg like following:
> > cannt find eabi_dmul ?balabla??????
> >
> > May I ask any possibility of use float point operation in the kernel space?
> > Any hints/doc would be appreciated!
> I do not know how are you compiling the required function.
> Use hardware floating point support. If your target SOC support.

And if you do this, you end up corrupting the FP state for user
applications.  Then you will complain when your user applications
don't work as you expect.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 答复: Query about Float Point Operation
  2010-03-29  5:22 ` Rajanikanth H.V
  2010-03-29  8:11   ` Russell King - ARM Linux
@ 2010-03-29  8:19   ` rocky
  2010-03-29 10:59   ` Martin Guy
  2 siblings, 0 replies; 9+ messages in thread
From: rocky @ 2010-03-29  8:19 UTC (permalink / raw)
  To: linux-arm-kernel

Thanks you guys??

Read the code in arch/arm/nwfpe/ and arch/arm/vfp, kernel DOES provide float
point operation ONLY for user space in terms of two aspects.
1:
Employ hardware float point instructions, easy to implement, while increase
die size of whole chip.
2:
Using software to emulate above hardware float point instructions, in short,
decode every undefined instruction exceptions to inspect if that's an
emulated float point instructs. While in this way kernel burden will
increase as there are too many exceptions to be handled.

So basically, no float point operation in kernel space.

ROCKY
B.R

-----????-----
???: Rajanikanth H.V [mailto:rkiyerpersonal at gmail.com] 
????: 2010?3?29? 13:23
???: ???
??: linux-arm-kernel
??: Re: Query about Float Point Operation

2010/3/23 ??? <914059751@qq.com>:
> Hi , guys
> I want to do float point operations in kernel like the following,
>
> int foo(double d)
> {
>
> return (int)d*d;
>
> }
>
> while compiling output error msg like following:
> cannt find eabi_dmul ?balabla??????
>
> May I ask any possibility of use float point operation in the kernel
space?
> Any hints/doc would be appreciated!
I do not know how are you compiling the required function.
Use hardware floating point support. If your target SOC support.
Also verify whether Floating Point Emulation -> VFP is enabled in your
config.

> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Query about Float Point Operation
  2010-03-29  5:22 ` Rajanikanth H.V
  2010-03-29  8:11   ` Russell King - ARM Linux
  2010-03-29  8:19   ` 答复: " rocky
@ 2010-03-29 10:59   ` Martin Guy
  2 siblings, 0 replies; 9+ messages in thread
From: Martin Guy @ 2010-03-29 10:59 UTC (permalink / raw)
  To: linux-arm-kernel

On 3/29/10, Rajanikanth H.V <rkiyerpersonal@gmail.com> wrote:
> 2010/3/23 ??? <914059751@qq.com>:
>  > Hi , guys
>  > I want to do float point operations in kernel like the following,
>  >
>  > int foo(double d)
>  > {
>  >
>  > return (int)d*d;
>  >
>  > }
>  >
>  > while compiling output error msg like following:
>  > cannt find eabi_dmul  balabla??????
>  >
>  > May I ask any possibility of use float point operation in the kernel space?
>  > Any hints/doc would be appreciated!
>  I do not know how are you compiling the required function.
>  Use hardware floating point support. If your target SOC support.
>  Also verify whether Floating Point Emulation -> VFP is enabled in your config.

Wrong. You cannot do floating point operations inside the linux kernel.
At best, you can use fixed-point arithmetic.

    M

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Query about Float Point Operation
  2010-03-23 13:41 胡杨树
  2010-03-28 21:47 ` Jamie Lokier
@ 2010-03-28 23:34 ` Nicolas Pitre
  1 sibling, 0 replies; 9+ messages in thread
From: Nicolas Pitre @ 2010-03-28 23:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 23 Mar 2010, ??? wrote:

> WOW
> My audio codec drivers use float point operation heavily!
> Does that mean that I can ONLY implement it on USER space ?

Yes.  Software codecs don't belong in the kernel anyway.


Nicolas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Query about Float Point Operation
  2010-03-23 13:41 胡杨树
@ 2010-03-28 21:47 ` Jamie Lokier
  2010-03-28 23:34 ` Nicolas Pitre
  1 sibling, 0 replies; 9+ messages in thread
From: Jamie Lokier @ 2010-03-28 21:47 UTC (permalink / raw)
  To: linux-arm-kernel

??? wrote:
> WOW
> My audio codec drivers use float point operation heavily!
> Does that mean that I can ONLY implement it on USER space ?

It's not impossible, but it's quite complicated, not supported
(no need), and architecture-dependent.

Anyway, codecs should be done in userspace.  That's how Linux does
software codecs.  Only audio output, or passing raw data to an audio
DSP, needs to happen in kernel space.

-- Jamie

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Query about Float Point Operation
@ 2010-03-23 13:41 胡杨树
  2010-03-28 21:47 ` Jamie Lokier
  2010-03-28 23:34 ` Nicolas Pitre
  0 siblings, 2 replies; 9+ messages in thread
From: 胡杨树 @ 2010-03-23 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

WOW
My audio codec drivers use float point operation heavily!
Does that mean that I can ONLY implement it on USER space ?
 
 
------------------ Original ------------------
From:  "M?ns Rullg?rd"<mans@mansr.com>;
Date:  Tue, Mar 23, 2010 09:34 PM
To:  "linux-arm-kernel"<linux-arm-kernel@lists.infradead.org>; 

Subject:  Re: Query about Float Point Operation

 
914059751 at qq.com writes:

> Hi , guys
> I want to do float point operations in kernel like the following,
>
> int foo(double d)
> {
> return (int)d*d;
> }
>
> May I ask any possibility of use float point operation in the kernel space?

Floating-point in the kernel is not allowed.

-- 
M?ns Rullg?rd
mans at mansr.com


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-03-29 10:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-23 12:57 Query about Float Point Operation 胡杨树
2010-03-23 13:34 ` Måns Rullgård
2010-03-29  5:22 ` Rajanikanth H.V
2010-03-29  8:11   ` Russell King - ARM Linux
2010-03-29  8:19   ` 答复: " rocky
2010-03-29 10:59   ` Martin Guy
2010-03-23 13:41 胡杨树
2010-03-28 21:47 ` Jamie Lokier
2010-03-28 23:34 ` Nicolas Pitre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.