patch-2.3.41 linux/arch/sparc64/mm/init.c
Next file: linux/arch/sparc64/solaris/misc.c
Previous file: linux/arch/sparc64/mm/fault.c
Back to the patch index
Back to the overall index
- Lines: 65
- Date:
Tue Jan 25 10:26:04 2000
- Orig file:
v2.3.40/linux/arch/sparc64/mm/init.c
- Orig date:
Wed Dec 29 13:13:14 1999
diff -u --recursive --new-file v2.3.40/linux/arch/sparc64/mm/init.c linux/arch/sparc64/mm/init.c
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.143 1999/12/16 16:15:14 davem Exp $
+/* $Id: init.c,v 1.144 2000/01/23 07:16:11 davem Exp $
* arch/sparc64/mm/init.c
*
* Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu)
@@ -40,8 +40,6 @@
/* Ugly, but necessary... -DaveM */
unsigned long phys_base;
-static unsigned long totalram_pages = 0;
-
/* get_new_mmu_context() uses "cache + 1". */
spinlock_t ctx_alloc_lock = SPIN_LOCK_UNLOCKED;
unsigned long tlb_context_cache = CTX_FIRST_VERSION - 1;
@@ -125,7 +123,7 @@
show_free_areas();
printk("Free swap: %6dkB\n",
nr_swap_pages << (PAGE_SHIFT-10));
- printk("%ld pages of RAM\n", totalram_pages);
+ printk("%ld pages of RAM\n", num_physpages);
printk("%d free pages\n", nr_free_pages());
printk("%d pages in page table cache\n",pgtable_cache_size);
#ifndef __SMP__
@@ -1088,7 +1086,6 @@
ClearPageReserved(mem_map + MAP_NR(first));
set_page_count(mem_map + MAP_NR(first), 1);
free_page((unsigned long)first);
- totalram_pages++;
num_physpages++;
first = (struct page *)((unsigned long)first + PAGE_SIZE);
@@ -1180,7 +1177,7 @@
#ifdef DEBUG_BOOTMEM
prom_printf("mem_init: Calling free_all_bootmem().\n");
#endif
- num_physpages = totalram_pages = free_all_bootmem();
+ num_physpages = free_all_bootmem();
#if 0
free_unused_mem_map();
#endif
@@ -1202,7 +1199,6 @@
memset(empty_pg_dir, 0, sizeof(empty_pg_dir));
addr += alias_base;
free_pgd_fast((pgd_t *)addr);
- totalram_pages++;
num_physpages++;
}
#endif
@@ -1245,14 +1241,13 @@
ClearPageReserved(p);
set_page_count(p, 1);
__free_page(p);
- totalram_pages++;
num_physpages++;
}
}
void si_meminfo(struct sysinfo *val)
{
- val->totalram = totalram_pages;
+ val->totalram = num_physpages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)