[lkml]   [2001]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: CPU capabilities -- an update proposal
Hi there,

I like what you have done here, but there are a few things...

> diff -up --recursive --new-file linux-2.4.0-ac12.macro/include/asm-i386/bugs.h linux-2.4.0-ac12/include/asm-i386/bugs.h
> --- linux-2.4.0-ac12.macro/include/asm-i386/bugs.h Sun Jan 28 09:41:20 2001
> +++ linux-2.4.0-ac12/include/asm-i386/bugs.h Wed Jan 31 22:18:40 2001
> @@ -83,12 +83,12 @@ static void __init check_fpu(void)
> extern void __buggy_fxsr_alignment(void);
> __buggy_fxsr_alignment();
> }
> - if (cpu_has_fxsr) {
> + if (boot_has_fxsr) {
> printk(KERN_INFO "Enabling fast FPU save and restore... ");
> set_in_cr4(X86_CR4_OSFXSR);
> printk("done.\n");
> }
> - if (cpu_has_xmm) {
> + if (boot_has_xmm) {
> printk(KERN_INFO "Enabling unmasked SIMD FPU exception support... ");
> set_in_cr4(X86_CR4_OSXMMEXCPT);
> printk("done.\n");

Once you enable OSFXSR (therefore allowing user-space code to issue SSE
instructions) you *have* to save using FXSAVE, which you can only do if
*all* CPUs support FXSR. Therefore, I would say this is a buggy
change... it is not save to enable OSFXSR unless *all* the CPUs support
FXSR (they don't have to all support SSE, however, although since you
can't control which CPU you execute on, it's pretty useless if they

This may mean the code needs to be restructured; I haven't looked at it
in detail.


<> at work, <> in private!
"Unix gives you enough rope to shoot yourself in the foot."
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.230 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site