mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-05 10:46:58 +00:00
Revert "x86/PAT: Fix Xorg regression on CPUs that don't support PAT"
This reverts commit cbed27cdf0e3f7ea3b2259e86b9e34df02be3fe4. As Andy Lutomirski observed: "I think this patch is bogus. pat_enabled() sure looks like it's supposed to return true if PAT is *enabled*, and these days PAT is 'enabled' even if there's no HW PAT support." Reported-by: Bernhard Held <berny156@gmx.de> Reported-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Andy Lutomirski <luto@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Luis R. Rodriguez <mcgrof@suse.com> Cc: Mikulas Patocka <mpatocka@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Toshi Kani <toshi.kani@hp.com> Cc: stable@vger.kernel.org # v4.2+ Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
5d9070b1f0
commit
c08d517480
@ -65,11 +65,9 @@ static int __init nopat(char *str)
|
||||
}
|
||||
early_param("nopat", nopat);
|
||||
|
||||
static bool __read_mostly __pat_initialized = false;
|
||||
|
||||
bool pat_enabled(void)
|
||||
{
|
||||
return __pat_initialized;
|
||||
return !!__pat_enabled;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pat_enabled);
|
||||
|
||||
@ -227,14 +225,13 @@ static void pat_bsp_init(u64 pat)
|
||||
}
|
||||
|
||||
wrmsrl(MSR_IA32_CR_PAT, pat);
|
||||
__pat_initialized = true;
|
||||
|
||||
__init_cache_modes(pat);
|
||||
}
|
||||
|
||||
static void pat_ap_init(u64 pat)
|
||||
{
|
||||
if (!this_cpu_has(X86_FEATURE_PAT)) {
|
||||
if (!boot_cpu_has(X86_FEATURE_PAT)) {
|
||||
/*
|
||||
* If this happens we are on a secondary CPU, but switched to
|
||||
* PAT on the boot CPU. We have no way to undo PAT.
|
||||
@ -309,7 +306,7 @@ void pat_init(void)
|
||||
u64 pat;
|
||||
struct cpuinfo_x86 *c = &boot_cpu_data;
|
||||
|
||||
if (!__pat_enabled) {
|
||||
if (!pat_enabled()) {
|
||||
init_cache_modes();
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user