Date: Wed, 20 Oct 2010 14:25:19 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 184933 for review Message-ID: <201010201425.o9KEPJj2027679@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@184933?ac=10 Change 184933 by jhb@jhb_jhbbsd on 2010/10/20 14:24:16 Drop these local changes. alc@ committed an alternate fix. Affected files ... .. //depot/projects/smpng/sys/i386/i386/vm86.c#25 edit .. //depot/projects/smpng/sys/i386/include/pmap.h#52 edit Differences ... ==== //depot/projects/smpng/sys/i386/i386/vm86.c#25 (text+ko) ==== @@ -592,7 +592,7 @@ mtx_lock(&vm86_lock); for (i = 0; i < vmc->npages; i++) { - page = pmap_kextract_early(vmc->pmap[i].kva & PG_FRAME); + page = vtophys(vmc->pmap[i].kva & PG_FRAME); entry = vmc->pmap[i].pte_num; vmc->pmap[i].old_pte = pte[entry]; pte[entry] = page | PG_V | PG_RW | PG_U; ==== //depot/projects/smpng/sys/i386/include/pmap.h#52 (text+ko) ==== @@ -302,29 +302,6 @@ return (pa); } -/* - * A version of pmap_kextract() that is safe to call before - * pmap_bootstrap(). This is used in vm86_datacall(). If - * pmap_bootstrap() has not been called, then KPTmap is not yet - * initialized, so fall back to using vtopte() instead. - */ -static __inline vm_paddr_t -pmap_kextract_early(vm_offset_t va) -{ - vm_paddr_t pa; - - if ((pa = PTD[va >> PDRSHIFT]) & PG_PS) { - pa = (pa & PG_PS_FRAME) | (va & PDRMASK); - } else { - if (KPTmap == NULL) - pa = *vtopte(va); - else - pa = KPTmap[i386_btop(va)]; - pa = (pa & PG_FRAME) | (va & PAGE_MASK); - } - return (pa); -} - #define PT_UPDATES_FLUSH() #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010201425.o9KEPJj2027679>