linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A simple question of a linux kernel beginner
@ 2013-10-31 11:31 韩磊
  2013-10-31 11:57 ` Richard Weinberger
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: 韩磊 @ 2013-10-31 11:31 UTC (permalink / raw)
  To: Linux Kernel Mailing List

May I can use  the ''double" as a  basic variables?

When I define the "double" as a function return type in linux kernel,the error
is "error: SSE register return with SSE disabled".

How to fix it??

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

* Re: A simple question of a linux kernel beginner
  2013-10-31 11:31 A simple question of a linux kernel beginner 韩磊
@ 2013-10-31 11:57 ` Richard Weinberger
  2013-10-31 12:03   ` Levente Kurusa
  2013-10-31 12:19 ` Yijing Wang
  2013-10-31 18:13 ` Andreas Mohr
  2 siblings, 1 reply; 6+ messages in thread
From: Richard Weinberger @ 2013-10-31 11:57 UTC (permalink / raw)
  To: 韩磊; +Cc: Linux Kernel Mailing List

On Thu, Oct 31, 2013 at 12:31 PM, 韩磊 <bonben1989@gmail.com> wrote:
> May I can use  the ''double" as a  basic variables?
>
> When I define the "double" as a function return type in linux kernel,the error
> is "error: SSE register return with SSE disabled".
>
> How to fix it??

Don't do it. :)
In kernel land we don't want FPU stuff because it slows the mode switch down.
If you *really* need to use the FPU look how the raid6 or crypto code does.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



-- 
Thanks,
//richard

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

* Re: A simple question of a linux kernel beginner
  2013-10-31 11:57 ` Richard Weinberger
@ 2013-10-31 12:03   ` Levente Kurusa
  0 siblings, 0 replies; 6+ messages in thread
From: Levente Kurusa @ 2013-10-31 12:03 UTC (permalink / raw)
  To: Richard Weinberger, 韩磊; +Cc: Linux Kernel Mailing List

2013-10-31 12:57 keltezéssel, Richard Weinberger írta:
> On Thu, Oct 31, 2013 at 12:31 PM, 韩磊 <bonben1989@gmail.com> wrote:
>> May I can use  the ''double" as a  basic variables?
>>
>> When I define the "double" as a function return type in linux kernel,the error
>> is "error: SSE register return with SSE disabled".
>>
>> How to fix it??
> 
> Don't do it. :)
> In kernel land we don't want FPU stuff because it slows the mode switch down.
> If you *really* need to use the FPU look how the raid6 or crypto code does.

Not only it slows down the switches, but if there is no FPU, then it would
need the so-called floating-point-library. Which would slow down the code,
but the kernel needs to be as fast as it can.

-- 
Regards,
Levente Kurusa

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

* Re: A simple question of a linux kernel beginner
  2013-10-31 11:31 A simple question of a linux kernel beginner 韩磊
  2013-10-31 11:57 ` Richard Weinberger
@ 2013-10-31 12:19 ` Yijing Wang
  2013-10-31 18:13 ` Andreas Mohr
  2 siblings, 0 replies; 6+ messages in thread
From: Yijing Wang @ 2013-10-31 12:19 UTC (permalink / raw)
  To: 韩磊; +Cc: Linux Kernel Mailing List

On 2013/10/31 19:31, 韩磊 wrote:
> May I can use  the ''double" as a  basic variables?
> 
> When I define the "double" as a function return type in linux kernel,the error
> is "error: SSE register return with SSE disabled".
> 
> How to fix it??


no float in kernel!
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 


-- 
Thanks!
Yijing


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

* Re: A simple question of a linux kernel beginner
  2013-10-31 11:31 A simple question of a linux kernel beginner 韩磊
  2013-10-31 11:57 ` Richard Weinberger
  2013-10-31 12:19 ` Yijing Wang
@ 2013-10-31 18:13 ` Andreas Mohr
  2013-11-01  1:12   ` 韩磊
  2 siblings, 1 reply; 6+ messages in thread
From: Andreas Mohr @ 2013-10-31 18:13 UTC (permalink / raw)
  To: =?GB2312?B?uqvA2g==?=; +Cc: Linux Kernel Mailing List

Hi,

> May I can use  the ''double" as a  basic variables?

[see other replies]


Look into terminus technicus "scaling math" as a replacement technique
(in-kernel this is being used e.g. by clocksources/clockevents).

HTH,

Andreas Mohr

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

* Re: A simple question of a linux kernel beginner
  2013-10-31 18:13 ` Andreas Mohr
@ 2013-11-01  1:12   ` 韩磊
  0 siblings, 0 replies; 6+ messages in thread
From: 韩磊 @ 2013-11-01  1:12 UTC (permalink / raw)
  To: Andreas Mohr; +Cc: Linux Kernel Mailing List

Thank you! I still have a long way to go in kernel.


2013/11/1 Andreas Mohr <andi@lisas.de>:
> Hi,
>
>> May I can use  the ''double" as a  basic variables?
>
> [see other replies]
>
>
> Look into terminus technicus "scaling math" as a replacement technique
> (in-kernel this is being used e.g. by clocksources/clockevents).
>
> HTH,
>
> Andreas Mohr

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

end of thread, other threads:[~2013-11-01  1:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-31 11:31 A simple question of a linux kernel beginner 韩磊
2013-10-31 11:57 ` Richard Weinberger
2013-10-31 12:03   ` Levente Kurusa
2013-10-31 12:19 ` Yijing Wang
2013-10-31 18:13 ` Andreas Mohr
2013-11-01  1:12   ` 韩磊

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