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

Next file: linux/arch/m68k/mm/memory.c
Previous file: linux/arch/m68k/mm/fault.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.35/linux/arch/m68k/mm/init.c linux/arch/m68k/mm/init.c
@@ -109,6 +109,8 @@
 	else
 		ptablep = (pte_t *)__get_free_page(GFP_KERNEL);
 
+	flush_page_to_ram((unsigned long) ptablep);
+	flush_tlb_kernel_page((unsigned long) ptablep);
 	nocache_page ((unsigned long)ptablep);
 
 	return ptablep;
@@ -293,8 +295,6 @@
 {
 	int chunk;
 	unsigned long mem_avail = 0;
-	/* pointer to page table for kernel stacks */
-	extern unsigned long availmem;
 
 #ifdef DEBUG
 	{
@@ -324,21 +324,12 @@
 
 	for (chunk = 0; chunk < m68k_num_memory; chunk++) {
 		mem_avail = map_chunk (m68k_memory[chunk].addr,
-				       m68k_memory[chunk].size, &availmem);
+				       m68k_memory[chunk].size, &start_mem);
 
 	}
 	flush_tlb_all();
 #ifdef DEBUG
 	printk ("memory available is %ldKB\n", mem_avail >> 10);
-#endif
-
-	/*
-	 * virtual address after end of kernel
-	 * "availmem" is setup by the code in head.S.
-	 */
-	start_mem = availmem;
-
-#ifdef DEBUG
 	printk ("start_mem is %#lx\nvirtual_end is %#lx\n",
 		start_mem, end_mem);
 #endif
@@ -401,7 +392,7 @@
 	printk ("before free_area_init\n");
 #endif
 
-	return free_area_init (start_mem, end_mem);
+	return PAGE_ALIGN(free_area_init (start_mem, end_mem));
 }
 
 void mem_init(unsigned long start_mem, unsigned long end_mem)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov