diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/setup.c | 13 | ||||
-rw-r--r-- | arch/i386/mm/discontig.c | 11 |
2 files changed, 12 insertions, 12 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 000cf03751fe..519e63c3c130 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -1083,16 +1083,15 @@ static unsigned long __init setup_memory(void) | |||
1083 | 1083 | ||
1084 | void __init zone_sizes_init(void) | 1084 | void __init zone_sizes_init(void) |
1085 | { | 1085 | { |
1086 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | ||
1087 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | ||
1088 | max_zone_pfns[ZONE_DMA] = | ||
1089 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; | ||
1090 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | ||
1086 | #ifdef CONFIG_HIGHMEM | 1091 | #ifdef CONFIG_HIGHMEM |
1087 | unsigned long max_zone_pfns[MAX_NR_ZONES] = { | 1092 | max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; |
1088 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT, | ||
1089 | max_low_pfn, | ||
1090 | highend_pfn}; | ||
1091 | add_active_range(0, 0, highend_pfn); | 1093 | add_active_range(0, 0, highend_pfn); |
1092 | #else | 1094 | #else |
1093 | unsigned long max_zone_pfns[MAX_NR_ZONES] = { | ||
1094 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT, | ||
1095 | max_low_pfn}; | ||
1096 | add_active_range(0, 0, max_low_pfn); | 1095 | add_active_range(0, 0, max_low_pfn); |
1097 | #endif | 1096 | #endif |
1098 | 1097 | ||
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c index 455597db84df..ddbdb0336f28 100644 --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c | |||
@@ -356,11 +356,12 @@ void __init numa_kva_reserve(void) | |||
356 | void __init zone_sizes_init(void) | 356 | void __init zone_sizes_init(void) |
357 | { | 357 | { |
358 | int nid; | 358 | int nid; |
359 | unsigned long max_zone_pfns[MAX_NR_ZONES] = { | 359 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
360 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT, | 360 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
361 | max_low_pfn, | 361 | max_zone_pfns[ZONE_DMA] = |
362 | highend_pfn | 362 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; |
363 | }; | 363 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; |
364 | max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; | ||
364 | 365 | ||
365 | /* If SRAT has not registered memory, register it now */ | 366 | /* If SRAT has not registered memory, register it now */ |
366 | if (find_max_pfn_with_active_regions() == 0) { | 367 | if (find_max_pfn_with_active_regions() == 0) { |