[tip:x86/asm] x86-64: Also clear _PAGE_GLOBAL from __supported_pte_mask if !cpu_has_pge

From: tip-bot for Jan Beulich
Date: Wed Feb 18 2015 - 19:30:27 EST

Commit-ID: 3ebfaff2bbd1d2ef882e475245d9f0276f21fe83
Gitweb: http://git.kernel.org/tip/3ebfaff2bbd1d2ef882e475245d9f0276f21fe83
Author: Jan Beulich <JBeulich@xxxxxxxx>
AuthorDate: Fri, 23 Jan 2015 08:35:13 +0000
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Thu, 19 Feb 2015 00:44:46 +0100

x86-64: Also clear _PAGE_GLOBAL from __supported_pte_mask if !cpu_has_pge

Not just setting it when the feature is available is for
consistency, and may allow Xen to drop its custom clearing of
the flag (unless it needs it cleared earlier than this code
executes). Note that the change is benign to ix86, as the flag
starts out clear there.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Link: http://lkml.kernel.org/r/54C215D10200007800058912@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
arch/x86/mm/init.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 079c3b6..090499a 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -179,7 +179,8 @@ static void __init probe_page_size_mask(void)
if (cpu_has_pge) {
__supported_pte_mask |= _PAGE_GLOBAL;
- }
+ } else
+ __supported_pte_mask &= ~_PAGE_GLOBAL;

#ifdef CONFIG_X86_32
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/