00001
00002
00003
00004
00005
00006 #include<linux/linkage.h>
00007
00008 #include<linux/mm.h>
00009 #include<linux/sched.h>
00010
00011 #include<asm/current.h>
00012
00013 #include<ipldef.h>
00014 #include<phddef.h>
00015 #include<ssdef.h>
00016 #include<va_rangedef.h>
00017 #include<wsldef.h>
00018 #include<vmspte.h>
00019 #include<ipl.h>
00020 #include <mmg_routines.h>
00021 #include <misc_routines.h>
00022
00023 int mmg_purgwsscn(int acmode, void * va, struct _pcb * p, signed int pagedirection, struct _rde * rde, unsigned long newpte) {
00024 #ifdef CONFIG_VMS
00025
00026 struct page * page;
00027 struct _phd * phd;
00028 struct _wsl * wsl, *wsle;
00029 unsigned long pfn;
00030 struct mm_struct * mm = p->mm;
00031 if (mm==0)
00032 mm = p->active_mm;
00033 struct _mypte *pte = findpte_new(mm,va);
00034 if (pte->pte_v_valid==0)
00035 return SS__NORMAL;
00036 #ifdef __arch_um__
00037 pfn=__pa(pte->pte_v_pfn<<PAGE_SHIFT)>>PAGE_SHIFT;
00038 #else
00039 pfn=pte->pte_v_pfn;
00040 #endif
00041 page=&mem_map[pfn];
00042 phd=p->pcb_l_phd;
00043 wsl=phd->phd_l_wslist;
00044
00045 if ((unsigned long)page->pfn_l_wslx_qw>=0x80000000)
00046 return SS__NORMAL;
00047
00048 wsle=&wsl[page->pfn_l_wslx_qw];
00049
00050 if (wsle->wsl_v_valid==0)
00051 return SS__NORMAL;
00052
00053 if (wsle->wsl_v_pfnlock)
00054 return SS__NORMAL;
00055
00056 if ((((unsigned long)wsle->wsl_pq_va)&WSL$M_PAGTYP)>=WSL$C_PPGTBL)
00057 return SS__NORMAL;
00058
00059 mmg_frewslx(p, va, findpte_new(mm, va), page->pfn$l_wslx_qw);
00060
00061 return SS__NORMAL;
00062 #endif
00063 }
00064
00065 int mmg_purgwspag (int acmode, void * va, struct _pcb * p, signed int pagedirection, struct _rde * rde, unsigned long newpte) {
00066 return mmg_purgwsscn(acmode,va,p,pagedirection,rde,newpte);
00067 }
00068
00069 asmlinkage int exe_purgws(struct _va_range *inadr) {
00070 unsigned long start=((unsigned long)inadr->va_range_ps_start_va)&0xfffff000;
00071 unsigned long end=((unsigned long)inadr->va_range_ps_end_va)&0xfffff000;
00072 setipl(IPL__ASTDEL);
00073 for(;start<end;start+=PAGE_SIZE) {
00074 mmg_credel(0, start, end, mmg$purgwspag, 0, 0, 0, current, 1);
00075 }
00076 return SS__NORMAL;
00077 }
00078