aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/setup.c')
-rw-r--r--arch/i386/kernel/setup.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 76a524b4c90f..814cdebf7377 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1089,22 +1089,20 @@ static unsigned long __init setup_memory(void)
1089 1089
1090void __init zone_sizes_init(void) 1090void __init zone_sizes_init(void)
1091{ 1091{
1092 unsigned long zones_size[MAX_NR_ZONES] = { 0, };
1093 unsigned int max_dma, low;
1094
1095 max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
1096 low = max_low_pfn;
1097
1098 if (low < max_dma)
1099 zones_size[ZONE_DMA] = low;
1100 else {
1101 zones_size[ZONE_DMA] = max_dma;
1102 zones_size[ZONE_NORMAL] = low - max_dma;
1103#ifdef CONFIG_HIGHMEM 1092#ifdef CONFIG_HIGHMEM
1104 zones_size[ZONE_HIGHMEM] = highend_pfn - low; 1093 unsigned long max_zone_pfns[MAX_NR_ZONES] = {
1094 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT,
1095 max_low_pfn,
1096 highend_pfn};
1097 add_active_range(0, 0, highend_pfn);
1098#else
1099 unsigned long max_zone_pfns[MAX_NR_ZONES] = {
1100 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT,
1101 max_low_pfn};
1102 add_active_range(0, 0, max_low_pfn);
1105#endif 1103#endif
1106 } 1104
1107 free_area_init(zones_size); 1105 free_area_init_nodes(max_zone_pfns);
1108} 1106}
1109#else 1107#else
1110extern unsigned long __init setup_memory(void); 1108extern unsigned long __init setup_memory(void);