diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-26 12:35:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-26 12:35:46 -0400 |
commit | 622f202a4cba7acbd843f22fa67c206c15d45034 (patch) | |
tree | fa272b824e49a48f595f1faceb79368a6bd634c0 /mm | |
parent | 6a2e52f844ed0002579e9f6d3e6d6286fa3bd76d (diff) | |
parent | 8b724e2a12d553cad8ad412846511c783a92d25e (diff) |
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
"This fixes a couple of nasty page table initialization bugs which were
causing kdump regressions. A clean rearchitecturing of the code is in
the works - meanwhile these are reverts that restore the
best-known-working state of the kernel.
There's also EFI fixes and other small fixes."
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, mm: Undo incorrect revert in arch/x86/mm/init.c
x86: efi: Turn off efi_enabled after setup on mixed fw/kernel
x86, mm: Find_early_table_space based on ranges that are actually being mapped
x86, mm: Use memblock memory loop instead of e820_RAM
x86, mm: Trim memory in memblock to be page aligned
x86/irq/ioapic: Check for valid irq_cfg pointer in smp_irq_move_cleanup_interrupt
x86/efi: Fix oops caused by incorrect set_memory_uc() usage
x86-64: Fix page table accounting
Revert "x86/mm: Fix the size calculation of mapping tables"
MAINTAINERS: Add EFI git repository location
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memblock.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index 931eef145af5..625905523c2a 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -930,6 +930,30 @@ int __init_memblock memblock_is_region_reserved(phys_addr_t base, phys_addr_t si | |||
930 | return memblock_overlaps_region(&memblock.reserved, base, size) >= 0; | 930 | return memblock_overlaps_region(&memblock.reserved, base, size) >= 0; |
931 | } | 931 | } |
932 | 932 | ||
933 | void __init_memblock memblock_trim_memory(phys_addr_t align) | ||
934 | { | ||
935 | int i; | ||
936 | phys_addr_t start, end, orig_start, orig_end; | ||
937 | struct memblock_type *mem = &memblock.memory; | ||
938 | |||
939 | for (i = 0; i < mem->cnt; i++) { | ||
940 | orig_start = mem->regions[i].base; | ||
941 | orig_end = mem->regions[i].base + mem->regions[i].size; | ||
942 | start = round_up(orig_start, align); | ||
943 | end = round_down(orig_end, align); | ||
944 | |||
945 | if (start == orig_start && end == orig_end) | ||
946 | continue; | ||
947 | |||
948 | if (start < end) { | ||
949 | mem->regions[i].base = start; | ||
950 | mem->regions[i].size = end - start; | ||
951 | } else { | ||
952 | memblock_remove_region(mem, i); | ||
953 | i--; | ||
954 | } | ||
955 | } | ||
956 | } | ||
933 | 957 | ||
934 | void __init_memblock memblock_set_current_limit(phys_addr_t limit) | 958 | void __init_memblock memblock_set_current_limit(phys_addr_t limit) |
935 | { | 959 | { |