aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5cde54695cfb..13c102b95c57 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1199,13 +1199,8 @@ void si_meminfo(struct sysinfo *val)
1199 val->sharedram = 0; 1199 val->sharedram = 0;
1200 val->freeram = nr_free_pages(); 1200 val->freeram = nr_free_pages();
1201 val->bufferram = nr_blockdev_pages(); 1201 val->bufferram = nr_blockdev_pages();
1202#ifdef CONFIG_HIGHMEM
1203 val->totalhigh = totalhigh_pages; 1202 val->totalhigh = totalhigh_pages;
1204 val->freehigh = nr_free_highpages(); 1203 val->freehigh = nr_free_highpages();
1205#else
1206 val->totalhigh = 0;
1207 val->freehigh = 0;
1208#endif
1209 val->mem_unit = PAGE_SIZE; 1204 val->mem_unit = PAGE_SIZE;
1210} 1205}
1211 1206
@@ -1218,8 +1213,13 @@ void si_meminfo_node(struct sysinfo *val, int nid)
1218 1213
1219 val->totalram = pgdat->node_present_pages; 1214 val->totalram = pgdat->node_present_pages;
1220 val->freeram = nr_free_pages_pgdat(pgdat); 1215 val->freeram = nr_free_pages_pgdat(pgdat);
1216#ifdef CONFIG_HIGHMEM
1221 val->totalhigh = pgdat->node_zones[ZONE_HIGHMEM].present_pages; 1217 val->totalhigh = pgdat->node_zones[ZONE_HIGHMEM].present_pages;
1222 val->freehigh = pgdat->node_zones[ZONE_HIGHMEM].free_pages; 1218 val->freehigh = pgdat->node_zones[ZONE_HIGHMEM].free_pages;
1219#else
1220 val->totalhigh = 0;
1221 val->freehigh = 0;
1222#endif
1223 val->mem_unit = PAGE_SIZE; 1223 val->mem_unit = PAGE_SIZE;
1224} 1224}
1225#endif 1225#endif
@@ -1344,14 +1344,11 @@ static int __meminit build_zonelists_node(pg_data_t *pgdat,
1344{ 1344{
1345 struct zone *zone; 1345 struct zone *zone;
1346 1346
1347 BUG_ON(zone_type > ZONE_HIGHMEM); 1347 BUG_ON(zone_type >= MAX_NR_ZONES);
1348 1348
1349 do { 1349 do {
1350 zone = pgdat->node_zones + zone_type; 1350 zone = pgdat->node_zones + zone_type;
1351 if (populated_zone(zone)) { 1351 if (populated_zone(zone)) {
1352#ifndef CONFIG_HIGHMEM
1353 BUG_ON(zone_type > ZONE_NORMAL);
1354#endif
1355 zonelist->zones[nr_zones++] = zone; 1352 zonelist->zones[nr_zones++] = zone;
1356 check_highest_zone(zone_type); 1353 check_highest_zone(zone_type);
1357 } 1354 }
@@ -1981,7 +1978,7 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat,
1981 if (zholes_size) 1978 if (zholes_size)
1982 realsize -= zholes_size[j]; 1979 realsize -= zholes_size[j];
1983 1980
1984 if (j < ZONE_HIGHMEM) 1981 if (!is_highmem_idx(j))
1985 nr_kernel_pages += realsize; 1982 nr_kernel_pages += realsize;
1986 nr_all_pages += realsize; 1983 nr_all_pages += realsize;
1987 1984