00001
00002
00003
00004
00005
00006
00007
00008 #include<linux/linkage.h>
00009 #include<linux/mm.h>
00010 #include<linux/sched.h>
00011 #include<internals.h>
00012 #include<ipldef.h>
00013 #include<rdedef.h>
00014 #include<ssdef.h>
00015
00016 int mmg_pteref_64 (void * va, struct _rde *rde, void ** va_pte) {
00017 if (va < rde->rde_ps_start_va || va >= (rde->rde$ps_start_va + rde->rde$l_region_size))
00018 return SS__LENVIO;
00019 struct mm_struct *mm = ctl_gl_pcb->mm;
00020 long page, address;
00021 pgd_t *pgd;
00022 pud_t *pud;
00023 pmd_t *pmd;
00024 pte_t *pte;
00025 address = va;
00026 page = address & PAGE_MASK;
00027 pgd = pgd_offset(mm, page);
00028 pud = pud_offset(pgd, page);
00029 pmd = pmd_offset(pud, page);
00030 pte = pte_offset(pmd, page);
00031
00032 int ipl = vmslock(&SPIN_MMG, IPL__MMG);
00033
00034 *va_pte = pte;
00035
00036 return SS__NORMAL;
00037 }
00038
00039