Update of /cvsroot/linux-mips/linux/mm
In directory usw-pr-cvs1:/tmp/cvs-serv30225/mm
Added Files:
memory.c
Log Message:
- consolidate all architectures to use type phys_addr_t for physical
addresses. MIPS-only phys_t is gone, replaced with phys_addr_t.
- remap_page_range() will "fixup" physaddr's for platforms with 64-bit
physaddr support enabled, just as __ioremap() does.
--- NEW FILE: memory.c ---
/*
* linux/mm/memory.c
*
* Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
*/
/*
* demand-loading started 01.12.91 - seems it is high on the list of
* things wanted, and it should be easy to implement. - Linus
*/
/*
* Ok, demand-loading was easy, shared pages a little bit tricker. Shared
* pages started 02.12.91, seems to work. - Linus.
*
* Tested sharing by executing about 30 /bin/sh: under the old kernel it
* would have taken more than the 6M I have free, but it worked well as
* far as I could see.
*
[...1431 lines suppressed...]
out:
return pte_offset(pmd, address);
}
int make_pages_present(unsigned long addr, unsigned long end)
{
int ret, len, write;
struct vm_area_struct * vma;
vma = find_vma(current->mm, addr);
write = (vma->vm_flags & VM_WRITE) != 0;
if (addr >= end)
BUG();
if (end > vma->vm_end)
BUG();
len = (end+PAGE_SIZE-1)/PAGE_SIZE-addr/PAGE_SIZE;
ret = get_user_pages(current, current->mm, addr,
len, write, 0, NULL, NULL);
return ret == len ? 0 : -1;
}
|