Commit 976dd4dc authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

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: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3a58a2a6
...@@ -425,6 +425,11 @@ u64 __init e820_update_range(u64 start, u64 size, unsigned old_type, ...@@ -425,6 +425,11 @@ u64 __init e820_update_range(u64 start, u64 size, unsigned old_type,
e820_add_region(final_start, final_end - final_start, e820_add_region(final_start, final_end - final_start,
new_type); new_type);
real_updated_size += final_end - final_start; real_updated_size += final_end - final_start;
ei->size -= final_end - final_start;
if (ei->addr < final_start)
continue;
ei->addr = final_end;
} }
return real_updated_size; return real_updated_size;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment