]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/x86/mm/init.c
x86: Store a per-cpu shadow copy of CR4
[mirror_ubuntu-artful-kernel.git] / arch / x86 / mm / init.c
index d4eddbd92c287c73393e3dea524c4baa2a578f5b..a74aa0fd185332a110eb2d7b04607c0fabd4dc30 100644 (file)
@@ -713,6 +713,15 @@ void __init zone_sizes_init(void)
        free_area_init_nodes(max_zone_pfns);
 }
 
+DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) = {
+#ifdef CONFIG_SMP
+       .active_mm = &init_mm,
+       .state = 0,
+#endif
+       .cr4 = ~0UL,    /* fail hard if we screw up cr4 shadow initialization */
+};
+EXPORT_SYMBOL_GPL(cpu_tlbstate);
+
 void update_cache_mode_entry(unsigned entry, enum page_cache_mode cache)
 {
        /* entry 0 MUST be WB (hardwired to speed up translations) */