patch-1.3.29 linux/arch/i386/mm/init.c

Next file: linux/drivers/block/genhd.c
Previous file: linux/arch/i386/kernel/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.28/linux/arch/i386/mm/init.c linux/arch/i386/mm/init.c
@@ -73,12 +73,12 @@
 	i = high_memory >> PAGE_SHIFT;
 	while (i-- > 0) {
 		total++;
-		if (mem_map[i] & MAP_PAGE_RESERVED)
+		if (mem_map[i].reserved)
 			reserved++;
-		else if (!mem_map[i])
+		else if (!mem_map[i].count)
 			free++;
 		else
-			shared += mem_map[i]-1;
+			shared += mem_map[i].count-1;
 	}
 	printk("%d pages of RAM\n",total);
 	printk("%d free pages\n",free);
@@ -192,12 +192,12 @@
 	 * controller as well..
 	 */
 	while (start_low_mem < 0x9f000) {
-		mem_map[MAP_NR(start_low_mem)] = 0;
+		mem_map[MAP_NR(start_low_mem)].reserved = 0;
 		start_low_mem += PAGE_SIZE;
 	}
 
 	while (start_mem < high_memory) {
-		mem_map[MAP_NR(start_mem)] = 0;
+		mem_map[MAP_NR(start_mem)].reserved = 0;
 		start_mem += PAGE_SIZE;
 	}
 #ifdef CONFIG_SCSI
@@ -207,7 +207,7 @@
 	sound_mem_init();
 #endif
 	for (tmp = 0 ; tmp < high_memory ; tmp += PAGE_SIZE) {
-		if (mem_map[MAP_NR(tmp)]) {
+		if (mem_map[MAP_NR(tmp)].reserved) {
 			if (tmp >= 0xA0000 && tmp < 0x100000)
 				reservedpages++;
 			else if (tmp < (unsigned long) &_etext)
@@ -216,7 +216,7 @@
 				datapages++;
 			continue;
 		}
-		mem_map[MAP_NR(tmp)] = 1;
+		mem_map[MAP_NR(tmp)].count = 1;
 		free_page(tmp);
 	}
 	tmp = nr_free_pages << PAGE_SHIFT;
@@ -249,12 +249,12 @@
 	val->freeram = nr_free_pages << PAGE_SHIFT;
 	val->bufferram = buffermem;
 	while (i-- > 0)  {
-		if (mem_map[i] & MAP_PAGE_RESERVED)
+		if (mem_map[i].reserved)
 			continue;
 		val->totalram++;
-		if (!mem_map[i])
+		if (!mem_map[i].count)
 			continue;
-		val->sharedram += mem_map[i]-1;
+		val->sharedram += mem_map[i].count-1;
 	}
 	val->totalram <<= PAGE_SHIFT;
 	val->sharedram <<= PAGE_SHIFT;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this