summaryrefslogtreecommitdiffstats
path: root/arch/ppc/mm/fault.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
commit6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch)
tree0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /arch/ppc/mm/fault.c
parentecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff)
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine status unknown.
Diffstat (limited to 'arch/ppc/mm/fault.c')
-rw-r--r--arch/ppc/mm/fault.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
index 7a899252f..0b551c803 100644
--- a/arch/ppc/mm/fault.c
+++ b/arch/ppc/mm/fault.c
@@ -238,11 +238,17 @@ bad_page_fault(struct pt_regs *regs, unsigned long address)
/* 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 @@ unsigned long va_to_phys(unsigned long address)
{
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);