Removed all vestiges of tlbflush(). Replaced them with calls to pmap_update().
Made pmap_update an inline assembly function.
This commit is contained in:
parent
146bce91d6
commit
c3ac4714bb
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_interface.c,v 1.7 1994/05/25 08:53:13 rgrimes Exp $
|
||||
* $Id: db_interface.c,v 1.8 1994/08/13 03:49:36 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -213,7 +213,7 @@ db_write_bytes(addr, size, data)
|
||||
oldmap1 = *ptep1;
|
||||
*(int *)ptep1 |= /* INTEL_PTE_WRITE */ PG_RW;
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
dst = (char *)addr;
|
||||
@ -228,7 +228,7 @@ db_write_bytes(addr, size, data)
|
||||
if (ptep1) {
|
||||
*ptep1 = oldmap1;
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.58 1994/08/31 06:17:31 davidg Exp $
|
||||
* $Id: machdep.c,v 1.59 1994/08/31 15:55:29 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -1264,7 +1264,7 @@ init386(first)
|
||||
* map page into kernel: valid, read/write, non-cacheable
|
||||
*/
|
||||
*(int *)CMAP1 = PG_V | PG_KW | PG_N | ptoa(target_page);
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
|
||||
/*
|
||||
* Test for alternating 1's and 0's
|
||||
@ -1309,7 +1309,7 @@ init386(first)
|
||||
printf("done.\n");
|
||||
|
||||
*(int *)CMAP1 = 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
|
||||
avail_end = (Maxmem << PAGE_SHIFT)
|
||||
- i386_round_page(sizeof(struct msgbuf));
|
||||
|
@ -39,7 +39,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.32 1994/08/13 03:49:44 wollman Exp $
|
||||
* $Id: pmap.c,v 1.33 1994/08/18 22:34:42 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -194,7 +194,7 @@ const pmap_pte(pmap, va)
|
||||
else {
|
||||
if ( frame != ((int) APTDpde & PG_FRAME) ) {
|
||||
APTDpde = pmap->pm_pdir[PTDPTDI];
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
return((pt_entry_t *) avtopte(va));
|
||||
}
|
||||
@ -228,7 +228,7 @@ pmap_extract(pmap, va)
|
||||
} else {
|
||||
if ( frame != ((int) APTDpde & PG_FRAME)) {
|
||||
APTDpde = pmap->pm_pdir[PTDPTDI];
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
pa = *(int *) avtopte(va);
|
||||
}
|
||||
@ -392,7 +392,7 @@ pmap_bootstrap(firstaddr, loadaddr)
|
||||
}
|
||||
|
||||
*(int *)CMAP1 = *(int *)CMAP2 = *(int *)PTD = 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
|
||||
}
|
||||
|
||||
@ -750,7 +750,7 @@ get_pt_entry(pmap)
|
||||
} else {
|
||||
if ( frame != ((int) APTDpde & PG_FRAME)) {
|
||||
APTDpde = pmap->pm_pdir[PTDPTDI];
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
ptp=APTmap;
|
||||
}
|
||||
@ -865,7 +865,7 @@ pmap_remove(pmap, sva, eva)
|
||||
pmap_remove_entry(pmap, pv, sva);
|
||||
pmap_unuse_pt(pmap, sva);
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -956,7 +956,7 @@ pmap_remove(pmap, sva, eva)
|
||||
pmap_unuse_pt(pmap, va);
|
||||
++sva;
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1031,7 +1031,7 @@ pmap_remove_all(pa)
|
||||
}
|
||||
splx(s);
|
||||
if (anyvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
|
||||
@ -1123,7 +1123,7 @@ pmap_protect(pmap, sva, eva, prot)
|
||||
va += PAGE_SIZE;
|
||||
}
|
||||
if (anyvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1282,7 +1282,7 @@ pmap_enter(pmap, va, pa, prot, wired)
|
||||
*pte = npte;
|
||||
}
|
||||
if (ptevalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1310,7 +1310,7 @@ pmap_qenter(va, m, count)
|
||||
*pte = (pt_entry_t) ( (int) (VM_PAGE_TO_PHYS(m[i]) | PG_RW | PG_V | PG_W));
|
||||
}
|
||||
if (anyvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
/*
|
||||
* this routine jerks page mappings from the
|
||||
@ -1327,13 +1327,13 @@ pmap_qremove(va, count)
|
||||
pte = vtopte(va + i * NBPG);
|
||||
*pte = 0;
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
* add a wired page to the kva
|
||||
* note that in order for the mapping to take effect -- you
|
||||
* should do a tlbflush after doing the pmap_kenter...
|
||||
* should do a pmap_update after doing the pmap_kenter...
|
||||
*/
|
||||
void
|
||||
pmap_kenter(va, pa)
|
||||
@ -1351,7 +1351,7 @@ pmap_kenter(va, pa)
|
||||
*pte = (pt_entry_t) ( (int) (pa | PG_RW | PG_V | PG_W));
|
||||
|
||||
if (wasvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1365,7 +1365,7 @@ pmap_kremove( va)
|
||||
pte = vtopte(va);
|
||||
|
||||
*pte = (pt_entry_t) 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1517,7 +1517,7 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
|
||||
}
|
||||
|
||||
if (anyvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1575,19 +1575,6 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
|
||||
vm_offset_t src_addr;
|
||||
{
|
||||
}
|
||||
/*
|
||||
* Require that all active physical maps contain no
|
||||
* incorrect entries NOW. [This update includes
|
||||
* forcing updates of any address map caching.]
|
||||
*
|
||||
* Generally used to insure that a thread about
|
||||
* to run will see a semantically correct world.
|
||||
*/
|
||||
void
|
||||
pmap_update()
|
||||
{
|
||||
tlbflush();
|
||||
}
|
||||
|
||||
/*
|
||||
* Routine: pmap_kernel
|
||||
@ -1617,7 +1604,7 @@ pmap_zero_page(phys)
|
||||
bzero(CADDR2,NBPG);
|
||||
|
||||
*(int *)CMAP2 = 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1644,7 +1631,7 @@ pmap_copy_page(src, dst)
|
||||
#endif
|
||||
*(int *)CMAP1 = 0;
|
||||
*(int *)CMAP2 = 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
|
||||
@ -1819,7 +1806,7 @@ pmap_changebit(pa, bit, setem)
|
||||
}
|
||||
}
|
||||
splx(s);
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -38,7 +38,7 @@
|
||||
*
|
||||
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
|
||||
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
|
||||
* $Id: vm_machdep.c,v 1.26 1994/08/07 14:53:11 davidg Exp $
|
||||
* $Id: vm_machdep.c,v 1.27 1994/08/31 06:17:33 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -817,7 +817,7 @@ cpu_reset() {
|
||||
bzero((caddr_t) PTD, NBPG);
|
||||
|
||||
/* "good night, sweet prince .... <THUNK!>" */
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
/* NOTREACHED */
|
||||
while(1);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cpufunc.h,v 1.18 1994/08/23 11:57:19 paul Exp $
|
||||
* $Id: cpufunc.h,v 1.19 1994/08/23 13:41:37 paul Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -93,7 +93,7 @@ outb(u_int port, u_char data)
|
||||
}
|
||||
|
||||
static inline void
|
||||
tlbflush()
|
||||
pmap_update()
|
||||
{
|
||||
__asm __volatile("movl %%cr3, %%eax; movl %%eax, %%cr3" : : : "ax");
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_interface.c,v 1.7 1994/05/25 08:53:13 rgrimes Exp $
|
||||
* $Id: db_interface.c,v 1.8 1994/08/13 03:49:36 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -213,7 +213,7 @@ db_write_bytes(addr, size, data)
|
||||
oldmap1 = *ptep1;
|
||||
*(int *)ptep1 |= /* INTEL_PTE_WRITE */ PG_RW;
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
dst = (char *)addr;
|
||||
@ -228,7 +228,7 @@ db_write_bytes(addr, size, data)
|
||||
if (ptep1) {
|
||||
*ptep1 = oldmap1;
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.58 1994/08/31 06:17:31 davidg Exp $
|
||||
* $Id: machdep.c,v 1.59 1994/08/31 15:55:29 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -1264,7 +1264,7 @@ init386(first)
|
||||
* map page into kernel: valid, read/write, non-cacheable
|
||||
*/
|
||||
*(int *)CMAP1 = PG_V | PG_KW | PG_N | ptoa(target_page);
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
|
||||
/*
|
||||
* Test for alternating 1's and 0's
|
||||
@ -1309,7 +1309,7 @@ init386(first)
|
||||
printf("done.\n");
|
||||
|
||||
*(int *)CMAP1 = 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
|
||||
avail_end = (Maxmem << PAGE_SHIFT)
|
||||
- i386_round_page(sizeof(struct msgbuf));
|
||||
|
@ -39,7 +39,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.32 1994/08/13 03:49:44 wollman Exp $
|
||||
* $Id: pmap.c,v 1.33 1994/08/18 22:34:42 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -194,7 +194,7 @@ const pmap_pte(pmap, va)
|
||||
else {
|
||||
if ( frame != ((int) APTDpde & PG_FRAME) ) {
|
||||
APTDpde = pmap->pm_pdir[PTDPTDI];
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
return((pt_entry_t *) avtopte(va));
|
||||
}
|
||||
@ -228,7 +228,7 @@ pmap_extract(pmap, va)
|
||||
} else {
|
||||
if ( frame != ((int) APTDpde & PG_FRAME)) {
|
||||
APTDpde = pmap->pm_pdir[PTDPTDI];
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
pa = *(int *) avtopte(va);
|
||||
}
|
||||
@ -392,7 +392,7 @@ pmap_bootstrap(firstaddr, loadaddr)
|
||||
}
|
||||
|
||||
*(int *)CMAP1 = *(int *)CMAP2 = *(int *)PTD = 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
|
||||
}
|
||||
|
||||
@ -750,7 +750,7 @@ get_pt_entry(pmap)
|
||||
} else {
|
||||
if ( frame != ((int) APTDpde & PG_FRAME)) {
|
||||
APTDpde = pmap->pm_pdir[PTDPTDI];
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
ptp=APTmap;
|
||||
}
|
||||
@ -865,7 +865,7 @@ pmap_remove(pmap, sva, eva)
|
||||
pmap_remove_entry(pmap, pv, sva);
|
||||
pmap_unuse_pt(pmap, sva);
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -956,7 +956,7 @@ pmap_remove(pmap, sva, eva)
|
||||
pmap_unuse_pt(pmap, va);
|
||||
++sva;
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1031,7 +1031,7 @@ pmap_remove_all(pa)
|
||||
}
|
||||
splx(s);
|
||||
if (anyvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
|
||||
@ -1123,7 +1123,7 @@ pmap_protect(pmap, sva, eva, prot)
|
||||
va += PAGE_SIZE;
|
||||
}
|
||||
if (anyvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1282,7 +1282,7 @@ pmap_enter(pmap, va, pa, prot, wired)
|
||||
*pte = npte;
|
||||
}
|
||||
if (ptevalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1310,7 +1310,7 @@ pmap_qenter(va, m, count)
|
||||
*pte = (pt_entry_t) ( (int) (VM_PAGE_TO_PHYS(m[i]) | PG_RW | PG_V | PG_W));
|
||||
}
|
||||
if (anyvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
/*
|
||||
* this routine jerks page mappings from the
|
||||
@ -1327,13 +1327,13 @@ pmap_qremove(va, count)
|
||||
pte = vtopte(va + i * NBPG);
|
||||
*pte = 0;
|
||||
}
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
* add a wired page to the kva
|
||||
* note that in order for the mapping to take effect -- you
|
||||
* should do a tlbflush after doing the pmap_kenter...
|
||||
* should do a pmap_update after doing the pmap_kenter...
|
||||
*/
|
||||
void
|
||||
pmap_kenter(va, pa)
|
||||
@ -1351,7 +1351,7 @@ pmap_kenter(va, pa)
|
||||
*pte = (pt_entry_t) ( (int) (pa | PG_RW | PG_V | PG_W));
|
||||
|
||||
if (wasvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1365,7 +1365,7 @@ pmap_kremove( va)
|
||||
pte = vtopte(va);
|
||||
|
||||
*pte = (pt_entry_t) 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1517,7 +1517,7 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
|
||||
}
|
||||
|
||||
if (anyvalid)
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1575,19 +1575,6 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
|
||||
vm_offset_t src_addr;
|
||||
{
|
||||
}
|
||||
/*
|
||||
* Require that all active physical maps contain no
|
||||
* incorrect entries NOW. [This update includes
|
||||
* forcing updates of any address map caching.]
|
||||
*
|
||||
* Generally used to insure that a thread about
|
||||
* to run will see a semantically correct world.
|
||||
*/
|
||||
void
|
||||
pmap_update()
|
||||
{
|
||||
tlbflush();
|
||||
}
|
||||
|
||||
/*
|
||||
* Routine: pmap_kernel
|
||||
@ -1617,7 +1604,7 @@ pmap_zero_page(phys)
|
||||
bzero(CADDR2,NBPG);
|
||||
|
||||
*(int *)CMAP2 = 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1644,7 +1631,7 @@ pmap_copy_page(src, dst)
|
||||
#endif
|
||||
*(int *)CMAP1 = 0;
|
||||
*(int *)CMAP2 = 0;
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
|
||||
@ -1819,7 +1806,7 @@ pmap_changebit(pa, bit, setem)
|
||||
}
|
||||
}
|
||||
splx(s);
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -38,7 +38,7 @@
|
||||
*
|
||||
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
|
||||
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
|
||||
* $Id: vm_machdep.c,v 1.26 1994/08/07 14:53:11 davidg Exp $
|
||||
* $Id: vm_machdep.c,v 1.27 1994/08/31 06:17:33 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -817,7 +817,7 @@ cpu_reset() {
|
||||
bzero((caddr_t) PTD, NBPG);
|
||||
|
||||
/* "good night, sweet prince .... <THUNK!>" */
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
/* NOTREACHED */
|
||||
while(1);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cpufunc.h,v 1.18 1994/08/23 11:57:19 paul Exp $
|
||||
* $Id: cpufunc.h,v 1.19 1994/08/23 13:41:37 paul Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -93,7 +93,7 @@ outb(u_int port, u_char data)
|
||||
}
|
||||
|
||||
static inline void
|
||||
tlbflush()
|
||||
pmap_update()
|
||||
{
|
||||
__asm __volatile("movl %%cr3, %%eax; movl %%eax, %%cr3" : : : "ax");
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
|
||||
*
|
||||
* $Id: sd.c,v 1.28 1994/08/30 14:31:38 ache Exp $
|
||||
* $Id: sd.c,v 1.29 1994/08/31 06:17:45 davidg Exp $
|
||||
*/
|
||||
|
||||
#define SPLSD splbio
|
||||
@ -1002,7 +1002,7 @@ sddump(dev_t dev)
|
||||
while (num > 0) {
|
||||
*(int *)CMAP1 =
|
||||
PG_V | PG_KW | trunc_page(addr);
|
||||
tlbflush();
|
||||
pmap_update();
|
||||
/*
|
||||
* Fill out the scsi command
|
||||
*/
|
||||
|
@ -61,7 +61,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: pmap.h,v 1.2 1994/08/02 07:55:12 davidg Exp $
|
||||
* $Id: pmap.h,v 1.3 1994/08/06 10:25:49 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -116,7 +116,6 @@ void pmap_qremove __P((vm_offset_t, int));
|
||||
void pmap_reference __P((pmap_t));
|
||||
void pmap_release __P((pmap_t));
|
||||
void pmap_remove __P((pmap_t, vm_offset_t, vm_offset_t));
|
||||
void pmap_update __P((void));
|
||||
void pmap_zero_page __P((vm_offset_t));
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user