patch-2.1.34 linux/arch/mips/mm/init.c
Next file: linux/arch/ppc/kernel/irq.c
Previous file: linux/arch/mips/kernel/irq.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Mon Apr 14 09:31:08 1997
- Orig file:
v2.1.33/linux/arch/mips/mm/init.c
- Orig date:
Sun Jan 26 02:07:05 1997
diff -u --recursive --new-file v2.1.33/linux/arch/mips/mm/init.c linux/arch/mips/mm/init.c
@@ -208,10 +208,10 @@
total++;
if (mem_map[i].reserved)
reserved++;
- else if (!mem_map[i].count)
+ else if (!atomic_read(&mem_map[i].count))
free++;
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);
@@ -268,7 +268,7 @@
datapages++;
continue;
}
- mem_map[MAP_NR(tmp)].count = 1;
+ atomic_set(&mem_map[MAP_NR(tmp)].count, 1);
free_page(tmp);
}
tmp = nr_free_pages << PAGE_SHIFT;
@@ -299,9 +299,9 @@
if (mem_map[i].reserved)
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