aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/platform
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 21:06:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 21:06:55 -0500
commit2ef14f465b9e096531343f5b734cffc5f759f4a6 (patch)
tree07b504d7105842a4b1a74cf1e153023a02fb9c1e /arch/x86/platform
parentcb715a836642e0ec69350670d1c2f800f3e2d2e4 (diff)
parent0da3e7f526fde7a6522a3038b7ce609fc50f6707 (diff)
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm changes from Peter Anvin: "This is a huge set of several partly interrelated (and concurrently developed) changes, which is why the branch history is messier than one would like. The *really* big items are two humonguous patchsets mostly developed by Yinghai Lu at my request, which completely revamps the way we create initial page tables. In particular, rather than estimating how much memory we will need for page tables and then build them into that memory -- a calculation that has shown to be incredibly fragile -- we now build them (on 64 bits) with the aid of a "pseudo-linear mode" -- a #PF handler which creates temporary page tables on demand. This has several advantages: 1. It makes it much easier to support things that need access to data very early (a followon patchset uses this to load microcode way early in the kernel startup). 2. It allows the kernel and all the kernel data objects to be invoked from above the 4 GB limit. This allows kdump to work on very large systems. 3. It greatly reduces the difference between Xen and native (Xen's equivalent of the #PF handler are the temporary page tables created by the domain builder), eliminating a bunch of fragile hooks. The patch series also gets us a bit closer to W^X. Additional work in this pull is the 64-bit get_user() work which you were also involved with, and a bunch of cleanups/speedups to __phys_addr()/__pa()." * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (105 commits) x86, mm: Move reserving low memory later in initialization x86, doc: Clarify the use of asm("%edx") in uaccess.h x86, mm: Redesign get_user with a __builtin_choose_expr hack x86: Be consistent with data size in getuser.S x86, mm: Use a bitfield to mask nuisance get_user() warnings x86/kvm: Fix compile warning in kvm_register_steal_time() x86-32: Add support for 64bit get_user() x86-32, mm: Remove reference to alloc_remap() x86-32, mm: Remove reference to resume_map_numa_kva() x86-32, mm: Rip out x86_32 NUMA remapping code x86/numa: Use __pa_nodebug() instead x86: Don't panic if can not alloc buffer for swiotlb mm: Add alloc_bootmem_low_pages_nopanic() x86, 64bit, mm: hibernate use generic mapping_init x86, 64bit, mm: Mark data/bss/brk to nx x86: Merge early kernel reserve for 32bit and 64bit x86: Add Crash kernel low reservation x86, kdump: Remove crashkernel range find limit for 64bit memblock: Add memblock_mem_size() x86, boot: Not need to check setup_header version for setup_data ...
Diffstat (limited to 'arch/x86/platform')
-rw-r--r--arch/x86/platform/efi/efi.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 928bf837040a..70b2a3a305d6 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -416,8 +416,8 @@ void __init efi_reserve_boot_services(void)
416 * - Not within any part of the kernel 416 * - Not within any part of the kernel
417 * - Not the bios reserved area 417 * - Not the bios reserved area
418 */ 418 */
419 if ((start+size >= virt_to_phys(_text) 419 if ((start+size >= __pa_symbol(_text)
420 && start <= virt_to_phys(_end)) || 420 && start <= __pa_symbol(_end)) ||
421 !e820_all_mapped(start, start+size, E820_RAM) || 421 !e820_all_mapped(start, start+size, E820_RAM) ||
422 memblock_is_region_reserved(start, size)) { 422 memblock_is_region_reserved(start, size)) {
423 /* Could not reserve, skip it */ 423 /* Could not reserve, skip it */
@@ -843,7 +843,7 @@ void __init efi_enter_virtual_mode(void)
843 efi_memory_desc_t *md, *prev_md = NULL; 843 efi_memory_desc_t *md, *prev_md = NULL;
844 efi_status_t status; 844 efi_status_t status;
845 unsigned long size; 845 unsigned long size;
846 u64 end, systab, end_pfn; 846 u64 end, systab, start_pfn, end_pfn;
847 void *p, *va, *new_memmap = NULL; 847 void *p, *va, *new_memmap = NULL;
848 int count = 0; 848 int count = 0;
849 849
@@ -896,10 +896,9 @@ void __init efi_enter_virtual_mode(void)
896 size = md->num_pages << EFI_PAGE_SHIFT; 896 size = md->num_pages << EFI_PAGE_SHIFT;
897 end = md->phys_addr + size; 897 end = md->phys_addr + size;
898 898
899 start_pfn = PFN_DOWN(md->phys_addr);
899 end_pfn = PFN_UP(end); 900 end_pfn = PFN_UP(end);
900 if (end_pfn <= max_low_pfn_mapped 901 if (pfn_range_is_mapped(start_pfn, end_pfn)) {
901 || (end_pfn > (1UL << (32 - PAGE_SHIFT))
902 && end_pfn <= max_pfn_mapped)) {
903 va = __va(md->phys_addr); 902 va = __va(md->phys_addr);
904 903
905 if (!(md->attribute & EFI_MEMORY_WB)) 904 if (!(md->attribute & EFI_MEMORY_WB))