patch-2.1.34 linux/arch/m68k/mm/init.c

Next file: linux/arch/mips/kernel/irq.c
Previous file: linux/arch/i386/mm/init.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.33/linux/arch/m68k/mm/init.c linux/arch/m68k/mm/init.c
@@ -71,12 +71,12 @@
 	total++;
 	if (PageReserved(mem_map+i))
 	    reserved++;
-	else if (!mem_map[i].count)
+	else if (!atomic_read(&mem_map[i].count))
 	    free++;
-	else if (mem_map[i].count == 1)
+	else if (atomic_read(&mem_map[i].count) == 1)
 	    nonshared++;
 	else
-	    shared += mem_map[i].count-1;
+	    shared += atomic_read(&mem_map[i].count) - 1;
     }
     printk("%d pages of RAM\n",total);
     printk("%d free pages\n",free);
@@ -463,7 +463,7 @@
 				datapages++;
 			continue;
 		}
-		mem_map[MAP_NR(tmp)].count = 1;
+		atomic_set(&mem_map[MAP_NR(tmp)].count, 1);
 #ifdef CONFIG_BLK_DEV_INITRD
 		if (!initrd_start ||
 		    (tmp < (initrd_start & PAGE_MASK) || tmp >= initrd_end))
@@ -495,9 +495,9 @@
 	if (PageReserved(mem_map+i))
 	    continue;
 	val->totalram++;
-	if (!mem_map[i].count)
+	if (!atomic_read(&mem_map[i].count))
 	    continue;
-	val->sharedram += mem_map[i].count-1;
+	val->sharedram += atomic_read(&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