]> err.no Git - linux-2.6/blobdiff - arch/x86_64/mm/init.c
x86: Fix alternatives and kprobes to remap write-protected kernel text
[linux-2.6] / arch / x86_64 / mm / init.c
index 88678e82e23da984a8f554ef1de1677b474b0cbe..314e12b2209f111464dd499949bc91d806e0b095 100644 (file)
@@ -383,7 +383,7 @@ void __meminit init_memory_mapping(unsigned long start, unsigned long end)
        } 
 
        if (!after_bootmem)
-               asm volatile("movq %%cr4,%0" : "=r" (mmu_cr4_features));
+               mmu_cr4_features = read_cr4();
        __flush_tlb_all();
 }
 
@@ -600,16 +600,6 @@ void mark_rodata_ro(void)
 {
        unsigned long start = (unsigned long)_stext, end;
 
-#ifdef CONFIG_HOTPLUG_CPU
-       /* It must still be possible to apply SMP alternatives. */
-       if (num_possible_cpus() > 1)
-               start = (unsigned long)_etext;
-#endif
-
-#ifdef CONFIG_KPROBES
-       start = (unsigned long)__start_rodata;
-#endif
-       
        end = (unsigned long)__end_rodata;
        start = (start + PAGE_SIZE - 1) & PAGE_MASK;
        end &= PAGE_MASK;