lkml.org 
[lkml]   [2009]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 6/7] x86: Move kernel_fpu_using to asm/i387.h
Huang Ying wrote:
>
> After some thinking, I think something as follow may be more
> appropriate:
>
> /* This may be useful for someone else */
> static inline bool fpu_using(void)
> {
> return !(read_cr0() & X86_CR0_TS);
> }
>
> static inline bool irq_fpu_using(void)
> {
> return in_interrupt() && fpu_using();
> }
>

Yes, looks good. I'll pull in the patch as soon as I get it.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2009-06-18 05:55    [W:0.063 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site