patch-2.4.0-test6 linux/arch/m68k/atari/stram.c

Next file: linux/arch/m68k/kernel/entry.S
Previous file: linux/arch/m68k/atari/ataints.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test5/linux/arch/m68k/atari/stram.c linux/arch/m68k/atari/stram.c
@@ -305,7 +305,7 @@
 
 	/* always reserve first page of ST-RAM, the first 2 kB are
 	 * supervisor-only! */
-	set_bit( PG_reserved, &mem_map[MAP_NR(stram_start)].flags );
+	set_bit( PG_reserved, &virt_to_page(stram_start)->flags );
 
 #ifdef CONFIG_STRAM_SWAP
 	if (!max_swap_size) {
@@ -699,7 +699,7 @@
 		if (pte_page(pte) != page)
 			return;
 		if (0 /* isswap */)
-			mem_map[MAP_NR(pte_page(pte))].offset = page;
+			virt_to_page(pte_page(pte))->offset = page;
 		else
 			/* We will be removing the swap cache in a moment, so... */
 			set_pte(dir, pte_mkdirty(pte));
@@ -716,7 +716,7 @@
 		DPRINTK( "unswap_pte: replacing entry %08lx by new page %08lx",
 				 entry, page );
 		set_pte(dir, pte_mkdirty(__mk_pte(page,vma->vm_page_prot)));
-		atomic_inc(&mem_map[MAP_NR(page)].count);
+		atomic_inc(&virt_to_page(page)->count);
 		++vma->vm_mm->rss;
 	}
 	swap_free(entry);
@@ -934,7 +934,7 @@
 			   get a clean page and read the swap into it. */
 			page_map = read_swap_cache(entry);
 			if (page_map) {
-				page = page_address(page_map);
+				page = (unsigned long) page_address(page_map);
 				read_lock(&tasklist_lock);
 				for_each_task(p)
 					unswap_process(p->mm, entry, page
@@ -1291,7 +1291,7 @@
 /* reserve a range of pages in mem_map[] */
 static void reserve_region( unsigned long addr, unsigned long end )
 {
-	mem_map_t *mapp = &mem_map[MAP_NR(addr)];
+	mem_map_t *mapp = virt_to_page(addr);
 
 	for( ; addr < end; addr += PAGE_SIZE, ++mapp )
 		set_bit( PG_reserved, &mapp->flags );

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)