patch-2.4.0-test2 linux/arch/ppc/mm/fault.c
Next file: linux/arch/ppc/mm/init.c
Previous file: linux/arch/ppc/mbxboot/mbxtty.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Mon Jun 19 17:59:37 2000
- Orig file:
v2.4.0-test1/linux/arch/ppc/mm/fault.c
- Orig date:
Tue May 23 15:31:34 2000
diff -u --recursive --new-file v2.4.0-test1/linux/arch/ppc/mm/fault.c linux/arch/ppc/mm/fault.c
@@ -238,11 +238,17 @@
/* The pgtable.h claims some functions generically exist, but I
* can't find them......
*/
-pte_t *find_pte(struct mm_struct *mm, unsigned long address)
+pte_t *va_to_pte(unsigned long address)
{
pgd_t *dir;
pmd_t *pmd;
pte_t *pte;
+ struct mm_struct *mm;
+
+ if (address < TASK_SIZE)
+ mm = current->mm;
+ else
+ mm = &init_mm;
dir = pgd_offset(mm, address & PAGE_MASK);
if (dir) {
@@ -267,7 +273,7 @@
{
pte_t *pte;
- pte = find_pte(current->mm, address);
+ pte = va_to_pte(address);
if (pte)
return(((unsigned long)(pte_val(*pte)) & PAGE_MASK) | (address & ~(PAGE_MASK-1)));
return (0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)