kaiser: add "nokaiser" boot option, using ALTERNATIVE
[pandora-kernel.git] / arch / x86 / mm / init_64.c
index 44b93da..1f1b8ed 100644 (file)
@@ -312,6 +312,16 @@ void __init cleanup_highmap(void)
                        continue;
                if (vaddr < (unsigned long) _text || vaddr > end)
                        set_pmd(pmd, __pmd(0));
+               else if (kaiser_enabled) {
+                       /*
+                        * level2_kernel_pgt is initialized with _PAGE_GLOBAL:
+                        * clear that now.  This is not important, so long as
+                        * CR4.PGE remains clear, but it removes an anomaly.
+                        * Physical mapping setup below avoids _PAGE_GLOBAL
+                        * by use of massage_pgprot() inside pfn_pte() etc.
+                        */
+                       set_pmd(pmd, pmd_clear_flags(*pmd, _PAGE_GLOBAL));
+               }
        }
 }