diff options
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r-- | arch/x86/kernel/e820.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index d3f6c5f6d3b1..b01fa0d0dc7c 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -360,7 +360,7 @@ int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, | |||
360 | return 0; | 360 | return 0; |
361 | } | 361 | } |
362 | 362 | ||
363 | static int __init __copy_e820_map(struct e820entry *biosmap, int nr_map) | 363 | static int __init __append_e820_map(struct e820entry *biosmap, int nr_map) |
364 | { | 364 | { |
365 | while (nr_map) { | 365 | while (nr_map) { |
366 | u64 start = biosmap->addr; | 366 | u64 start = biosmap->addr; |
@@ -389,13 +389,13 @@ static int __init __copy_e820_map(struct e820entry *biosmap, int nr_map) | |||
389 | * will have given us a memory map that we can use to properly | 389 | * will have given us a memory map that we can use to properly |
390 | * set up memory. If we aren't, we'll fake a memory map. | 390 | * set up memory. If we aren't, we'll fake a memory map. |
391 | */ | 391 | */ |
392 | int __init copy_e820_map(struct e820entry *biosmap, int nr_map) | 392 | static int __init append_e820_map(struct e820entry *biosmap, int nr_map) |
393 | { | 393 | { |
394 | /* Only one memory region (or negative)? Ignore it */ | 394 | /* Only one memory region (or negative)? Ignore it */ |
395 | if (nr_map < 2) | 395 | if (nr_map < 2) |
396 | return -1; | 396 | return -1; |
397 | 397 | ||
398 | return __copy_e820_map(biosmap, nr_map); | 398 | return __append_e820_map(biosmap, nr_map); |
399 | } | 399 | } |
400 | 400 | ||
401 | u64 __init e820_update_range(u64 start, u64 size, unsigned old_type, | 401 | u64 __init e820_update_range(u64 start, u64 size, unsigned old_type, |
@@ -583,7 +583,7 @@ void __init parse_e820_ext(struct setup_data *sdata, unsigned long pa_data) | |||
583 | if (map_len > PAGE_SIZE) | 583 | if (map_len > PAGE_SIZE) |
584 | sdata = early_ioremap(pa_data, map_len); | 584 | sdata = early_ioremap(pa_data, map_len); |
585 | extmap = (struct e820entry *)(sdata->data); | 585 | extmap = (struct e820entry *)(sdata->data); |
586 | __copy_e820_map(extmap, entries); | 586 | __append_e820_map(extmap, entries); |
587 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); | 587 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); |
588 | if (map_len > PAGE_SIZE) | 588 | if (map_len > PAGE_SIZE) |
589 | early_iounmap(sdata, map_len); | 589 | early_iounmap(sdata, map_len); |
@@ -1247,7 +1247,8 @@ char *__init default_machine_specific_memory_setup(void) | |||
1247 | ARRAY_SIZE(boot_params.e820_map), | 1247 | ARRAY_SIZE(boot_params.e820_map), |
1248 | &new_nr); | 1248 | &new_nr); |
1249 | boot_params.e820_entries = new_nr; | 1249 | boot_params.e820_entries = new_nr; |
1250 | if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) < 0) { | 1250 | if (append_e820_map(boot_params.e820_map, boot_params.e820_entries) |
1251 | < 0) { | ||
1251 | u64 mem_size; | 1252 | u64 mem_size; |
1252 | 1253 | ||
1253 | /* compare results from other methods and take the greater */ | 1254 | /* compare results from other methods and take the greater */ |