This is a note to let you know that I've just added the patch titled
x86, mm: Use memblock memory loop instead of e820_RAM
to the 3.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-mm-use-memblock-memory-loop-instead-of-e820_ram.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 1f2ff682ac951ed82cc043cf140d2851084512df Mon Sep 17 00:00:00 2001
From: Yinghai Lu <[email protected]>
Date: Mon, 22 Oct 2012 16:35:18 -0700
Subject: x86, mm: Use memblock memory loop instead of e820_RAM
From: Yinghai Lu <[email protected]>
commit 1f2ff682ac951ed82cc043cf140d2851084512df upstream.
We need to handle E820_RAM and E820_RESERVED_KERNEL at the same time.
Also memblock has page aligned range for ram, so we could avoid mapping
partial pages.
Signed-off-by: Yinghai Lu <[email protected]>
Link:
http://lkml.kernel.org/r/cae9fiqvzirvabmfyrfxmmwechbksicqehz4vawuv0xfck51...@mail.gmail.com
Acked-by: Jacob Shin <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/x86/kernel/setup.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -928,18 +928,19 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_X86_64
if (max_pfn > max_low_pfn) {
int i;
- for (i = 0; i < e820.nr_map; i++) {
- struct e820entry *ei = &e820.map[i];
+ unsigned long start, end;
+ unsigned long start_pfn, end_pfn;
- if (ei->addr + ei->size <= 1UL << 32)
- continue;
+ for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn,
+ NULL) {
- if (ei->type == E820_RESERVED)
+ end = PFN_PHYS(end_pfn);
+ if (end <= (1UL<<32))
continue;
+ start = PFN_PHYS(start_pfn);
max_pfn_mapped = init_memory_mapping(
- ei->addr < 1UL << 32 ? 1UL << 32 : ei->addr,
- ei->addr + ei->size);
+ max((1UL<<32), start), end);
}
/* can we preseve max_low_pfn ?*/
Patches currently in stable-queue which might be from [email protected] are
queue-3.4/x86-mm-undo-incorrect-revert-in-arch-x86-mm-init.c.patch
queue-3.4/x86-mm-use-memblock-memory-loop-instead-of-e820_ram.patch
queue-3.4/x86-mm-trim-memory-in-memblock-to-be-page-aligned.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html