summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/e820_64.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel.send@gmail.com>2008-04-29 20:25:16 -0700
committerThomas Gleixner <tglx@linutronix.de>2008-05-25 10:55:10 +0200
commit8a374026c265476b1acfc3c186a66d59ebdb2cda (patch)
tree85ae71ca6aa6851934d1880373bc8b9fa884e5ca /arch/x86/kernel/e820_64.c
parent42651f15824d003e8357693ab72c4dbb3e280836 (diff)
x86: fix trimming e820 with MTRR holes. - fix
v2: process hole then end_pfn fix update_memory_range with whole cover comparing Signed-off-by: Yinghai Lu <yinghai.lu@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/e820_64.c')
-rw-r--r--arch/x86/kernel/e820_64.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
index 848b2cd2d1dd..c45b4dea4055 100644
--- a/arch/x86/kernel/e820_64.c
+++ b/arch/x86/kernel/e820_64.c
@@ -843,7 +843,8 @@ u64 __init update_memory_range(u64 start, u64 size, unsigned old_type,
if (ei->type != old_type)
continue;
/* totally covered? */
- if (ei->addr >= start && ei->size <= size) {
+ if (ei->addr >= start &&
+ (ei->addr + ei->size) <= (start + size)) {
ei->type = new_type;
real_updated_size += ei->size;
continue;