patch-2.4.3 linux/arch/ppc/mm/fault.c
Next file: linux/arch/ppc/mm/init.c
Previous file: linux/arch/ppc/kernel/traps.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Mon Mar 19 12:35:09 2001
- Orig file:
v2.4.2/linux/arch/ppc/mm/fault.c
- Orig date:
Sat Feb 3 19:51:24 2001
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/mm/fault.c linux/arch/ppc/mm/fault.c
@@ -99,7 +99,7 @@
bad_page_fault(regs, address, SIGSEGV);
return;
}
- down(&mm->mmap_sem);
+ down_read(&mm->mmap_sem);
vma = find_vma(mm, address);
if (!vma)
goto bad_area;
@@ -159,7 +159,7 @@
goto out_of_memory;
}
- up(&mm->mmap_sem);
+ up_read(&mm->mmap_sem);
/*
* keep track of tlb+htab misses that are good addrs but
* just need pte's created via handle_mm_fault()
@@ -169,7 +169,7 @@
return;
bad_area:
- up(&mm->mmap_sem);
+ up_read(&mm->mmap_sem);
pte_errors++;
/* User mode accesses cause a SIGSEGV */
@@ -190,7 +190,7 @@
* us unable to handle the page fault gracefully.
*/
out_of_memory:
- up(&mm->mmap_sem);
+ up_read(&mm->mmap_sem);
printk("VM: killing process %s\n", current->comm);
if (user_mode(regs))
do_exit(SIGKILL);
@@ -198,7 +198,7 @@
return;
do_sigbus:
- up(&mm->mmap_sem);
+ up_read(&mm->mmap_sem);
info.si_signo = SIGBUS;
info.si_errno = 0;
info.si_code = BUS_ADRERR;
@@ -276,7 +276,7 @@
pte = va_to_pte(address);
if (pte)
- return(((unsigned long)(pte_val(*pte)) & PAGE_MASK) | (address & ~(PAGE_MASK-1)));
+ return(((unsigned long)(pte_val(*pte)) & PAGE_MASK) | (address & ~(PAGE_MASK)));
return (0);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)