diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-24 17:55:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:10:34 -0400 |
commit | 976dd4dc99c3eaf45e3802ed46e3cc06a1ad8689 (patch) | |
tree | 351ed6bc71666575f4981508f743a963f78f32eb /arch/x86/kernel/e820.c | |
parent | 3a58a2a6c879b2e47daafd6e641661c50ac9da5a (diff) |
x86: fix e820_update_range size when overlapping
before that we relay on sanitize_e820_map to remove the overlap.
but e820_update_range(,,E820_RESERVED, E820_RAM) will not work
this patch fix that
who is going to use this?
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r-- | arch/x86/kernel/e820.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 512f779fc6af..15b4393ff9bf 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -425,6 +425,11 @@ u64 __init e820_update_range(u64 start, u64 size, unsigned old_type, | |||
425 | e820_add_region(final_start, final_end - final_start, | 425 | e820_add_region(final_start, final_end - final_start, |
426 | new_type); | 426 | new_type); |
427 | real_updated_size += final_end - final_start; | 427 | real_updated_size += final_end - final_start; |
428 | |||
429 | ei->size -= final_end - final_start; | ||
430 | if (ei->addr < final_start) | ||
431 | continue; | ||
432 | ei->addr = final_end; | ||
428 | } | 433 | } |
429 | return real_updated_size; | 434 | return real_updated_size; |
430 | } | 435 | } |