diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-13 08:20:31 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-13 08:20:31 -0800 |
commit | d7ab95f8c54aed896ad739f261f79ed945472aca (patch) | |
tree | 7a5f0d6b61b1f01d31dc75179ce93abbbb21567a /arch/x86/kernel/efi.c | |
parent | 282ea441e003f2886893ab7bb60bfe29399ef7be (diff) | |
parent | c2a9cc7e86cf535a4fa14aebf5c3bc3349d09603 (diff) | |
download | op-kernel-dev-d7ab95f8c54aed896ad739f261f79ed945472aca.zip op-kernel-dev-d7ab95f8c54aed896ad739f261f79ed945472aca.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
x86: pit_clockevent can be static
x86: EFI runtime code mapping enhancement
x86: EFI: fix use of unitialized variable and the cache logic
x86: CPA: fix gbpages support in try_preserve_large_page
xen: unpin initial Xen pagetable once we're finished with it
x86/early_ioremap: don't assume we're using swapper_pg_dir
x86: fixup machine_ops reboot_{32|64}.c unification fallout
x86: fix sigcontext.h user export
Diffstat (limited to 'arch/x86/kernel/efi.c')
-rw-r--r-- | arch/x86/kernel/efi.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c index 32dd62b..cbdf9ba 100644 --- a/arch/x86/kernel/efi.c +++ b/arch/x86/kernel/efi.c @@ -384,9 +384,6 @@ static void __init runtime_code_page_mkexec(void) efi_memory_desc_t *md; void *p; - if (!(__supported_pte_mask & _PAGE_NX)) - return; - /* Make EFI runtime service code area executable */ for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { md = p; @@ -428,9 +425,6 @@ void __init efi_enter_virtual_mode(void) else va = efi_ioremap(md->phys_addr, size); - if (md->attribute & EFI_MEMORY_WB) - set_memory_uc(md->virt_addr, size); - md->virt_addr = (u64) (unsigned long) va; if (!va) { @@ -439,6 +433,9 @@ void __init efi_enter_virtual_mode(void) continue; } + if (!(md->attribute & EFI_MEMORY_WB)) + set_memory_uc(md->virt_addr, size); + systab = (u64) (unsigned long) efi_phys.systab; if (md->phys_addr <= systab && systab < end) { systab += md->virt_addr - md->phys_addr; @@ -476,7 +473,8 @@ void __init efi_enter_virtual_mode(void) efi.get_next_high_mono_count = virt_efi_get_next_high_mono_count; efi.reset_system = virt_efi_reset_system; efi.set_virtual_address_map = virt_efi_set_virtual_address_map; - runtime_code_page_mkexec(); + if (__supported_pte_mask & _PAGE_NX) + runtime_code_page_mkexec(); early_iounmap(memmap.map, memmap.nr_map * memmap.desc_size); memmap.map = NULL; } |