Re: [PATCH][2.6] Dont use cpu_has_pse for WP test branch
From: Linus Torvalds
Date: Tue Nov 04 2003 - 11:15:03 EST
On Tue, 4 Nov 2003, Zwane Mwaikambo wrote:
>
> It appears that not all processors which support PSE have the PSE bit set,
> possibly we should be checking with PSE36 too. But instead i've opted to
> simply check for 586+
Why?
The reason we test the PSE bit is not that we think it's a good indicator
of "new enough". It's because if the PSE bit is set, we will use 4MB
pages, and the code below that actually _tests_ whether WP works or not
won't work.
So it doesn't _matter_ that
> Celeron (Mendocino): fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov pat pse36 mmx fxsr
>
> Opteron 240: fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
> pse36 clflush mmx fxsr sse sse2 syscall mmxext lm 3dnowext 3dnow
do not have PSE, they'll just end up testing dynamically if it works or
not.
In fact, these days we could remove the test entirely: the only reason it
exists is because traditionally we didn't have the "fixmap" helpers, so we
used the page in lowest kernel memory for testing (which did not exist if
we had PSE, since with PSE the kernel wouldn't use individual pages to map
itself).
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/