diff -Naur linux-2.6.7/drivers/mtd/maps/uclinux.c linux-2.6.7-uc0/drivers/mtd/maps/uclinux.c --- linux-2.6.7/drivers/mtd/maps/uclinux.c 2004-06-17 17:47:34.000000000 +1000 +++ linux-2.6.7-uc0/drivers/mtd/maps/uclinux.c 2004-06-17 17:49:34.000000000 +1000 @@ -5,7 +5,7 @@ * * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) * - * $Id: uclinux.c,v 1.5 2003/05/20 20:59:32 dwmw2 Exp $ + * $Id: uclinux.c,v 1.9 2004/06/16 15:09:16 gerg Exp $ */ /****************************************************************************/ @@ -60,14 +60,20 @@ struct mtd_info *mtd; struct map_info *mapp; extern char _ebss; + unsigned long addr = (unsigned long) &_ebss; + +#ifdef CONFIG_PILOT + extern char _etext, _sdata, __init_end; + addr = (unsigned long) (&_etext + (&__init_end - &_sdata)); +#endif mapp = &uclinux_ram_map; - mapp->phys = (unsigned long) &_ebss; - mapp->size = PAGE_ALIGN(*((unsigned long *)((&_ebss) + 8))); + mapp->phys = addr; + mapp->size = PAGE_ALIGN(*((unsigned long *)(addr + 8))); mapp->buswidth = 4; printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n", - (int) mapp->map_priv_2, (int) mapp->size); + (int) mapp->phys, (int) mapp->size); mapp->virt = (unsigned long) ioremap_nocache(mapp->phys, mapp->size); @@ -96,7 +102,6 @@ printk("uclinux[mtd]: set %s to be root filesystem\n", uclinux_romfs[0].name); ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, 0); - put_mtd_device(mtd); return(0); } @@ -110,7 +115,7 @@ map_destroy(uclinux_ram_mtdinfo); uclinux_ram_mtdinfo = NULL; } - if (uclinux_ram_map.map_priv_1) { + if (uclinux_ram_map.virt) { iounmap((void *) uclinux_ram_map.virt); uclinux_ram_map.virt = 0; } diff -Naur linux-2.6.7/Makefile linux-2.6.7-uc0/Makefile --- linux-2.6.7/Makefile 2004-06-17 17:48:23.000000000 +1000 +++ linux-2.6.7-uc0/Makefile 2004-06-17 17:48:26.000000000 +1000 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 7 -EXTRAVERSION = +EXTRAVERSION = -uc0 NAME=Zonked Quokka # *DOCUMENTATION* diff -Naur linux-2.6.7/mm/nommu.c linux-2.6.7-uc0/mm/nommu.c --- linux-2.6.7/mm/nommu.c 2004-06-17 17:48:23.000000000 +1000 +++ linux-2.6.7-uc0/mm/nommu.c 2004-06-17 17:51:15.000000000 +1000 @@ -431,6 +431,7 @@ tblock->next = current->mm->context.tblock.next; current->mm->context.tblock.next = tblock; + current->mm->total_vm += len >> PAGE_SHIFT; #ifdef DEBUG printk("do_mmap:\n"); @@ -484,6 +485,7 @@ realalloc -= kobjsize(tblock); askedalloc -= sizeof(struct mm_tblock_struct); kfree(tblock); + mm->total_vm -= len >> PAGE_SHIFT; #ifdef DEBUG show_process_blocks(); @@ -496,6 +498,7 @@ void exit_mmap(struct mm_struct * mm) { struct mm_tblock_struct *tmp; + mm->total_vm = 0; if (!mm) return; @@ -572,6 +575,6 @@ return -ENOMEM; } -void swap_unplug_io_fn(struct backing_dev_info *) +void swap_unplug_io_fn(struct backing_dev_info *unused_bdi, struct page *page) { } diff -Naur linux-2.6.7/mm/page_alloc.c linux-2.6.7-uc0/mm/page_alloc.c --- linux-2.6.7/mm/page_alloc.c 2004-06-17 17:48:23.000000000 +1000 +++ linux-2.6.7-uc0/mm/page_alloc.c 2004-06-17 17:51:15.000000000 +1000 @@ -220,7 +220,9 @@ { if ( page_mapped(page) || page->mapping != NULL || +#ifdef CONFIG_MMU page_count(page) != 0 || +#endif (page->flags & ( 1 << PG_lru | 1 << PG_private |