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

Next file: linux/arch/mips/boot/Makefile
Previous file: linux/arch/i386/kernel/traps.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.86/linux/arch/i386/mm/init.c linux/arch/i386/mm/init.c
@@ -84,7 +84,7 @@
 	i = high_memory >> PAGE_SHIFT;
 	while (i-- > 0) {
 		total++;
-		if (mem_map[i].reserved)
+		if (PageReserved(mem_map+i))
 			reserved++;
 		else if (!mem_map[i].count)
 			free++;
@@ -235,18 +235,18 @@
 	 * controller as well..
 	 */
 	while (start_low_mem < 0x9f000) {
-		mem_map[MAP_NR(start_low_mem)].reserved = 0;
+		clear_bit(PG_reserved, &mem_map[MAP_NR(start_low_mem)].flags);
 		start_low_mem += PAGE_SIZE;
 	}
 
 	while (start_mem < high_memory) {
-		mem_map[MAP_NR(start_mem)].reserved = 0;
+		clear_bit(PG_reserved, &mem_map[MAP_NR(start_mem)].flags);
 		start_mem += PAGE_SIZE;
 	}
 	for (tmp = 0 ; tmp < high_memory ; tmp += PAGE_SIZE) {
 		if (tmp >= MAX_DMA_ADDRESS)
-			mem_map[MAP_NR(tmp)].dma = 0;
-		if (mem_map[MAP_NR(tmp)].reserved) {
+			clear_bit(PG_DMA, &mem_map[MAP_NR(tmp)].flags);
+		if (PageReserved(mem_map+MAP_NR(tmp))) {
 			if (tmp >= 0xA0000 && tmp < 0x100000)
 				reservedpages++;
 			else if (tmp < (unsigned long) &_etext)
@@ -292,7 +292,7 @@
 	val->freeram = nr_free_pages << PAGE_SHIFT;
 	val->bufferram = buffermem;
 	while (i-- > 0)  {
-		if (mem_map[i].reserved)
+		if (PageReserved(mem_map+i))
 			continue;
 		val->totalram++;
 		if (!mem_map[i].count)

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