P[GD]_SHIFT --> P[GD]SHIFT

This commit is contained in:
mycroft 1993-12-15 00:50:45 +00:00
parent dd9637d671
commit cbe3d33b6d
4 changed files with 11 additions and 11 deletions

View File

@ -8,7 +8,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)i386bsd-dep.c 6.10 (Berkeley) 6/26/91";*/
static char rcsid[] = "$Id: i386bsd-dep.c,v 1.4 1993/12/06 09:40:27 cgd Exp $";
static char rcsid[] = "$Id: i386bsd-dep.c,v 1.5 1993/12/15 00:52:27 mycroft Exp $";
#endif /* not lint */
/* Low level interface to ptrace, for GDB when running on the Intel 386.
@ -615,14 +615,14 @@ vtophys(addr)
/*
* Read the first-level page table (ptd).
*/
v = current_ptd + ((unsigned)addr >> PD_SHIFT) * sizeof pte;
v = current_ptd + ((unsigned)addr >> PDSHIFT) * sizeof pte;
if (physrd(v, (char *)&pte, sizeof pte) || pte.pg_v == 0)
return (~0);
/*
* Read the second-level page table.
*/
v = i386_ptob(pte.pg_pfnum) + ((addr&PT_MASK) >> PG_SHIFT) * sizeof pte;
v = i386_ptob(pte.pg_pfnum) + ((addr&PT_MASK) >> PGSHIFT) * sizeof pte;
if (physrd(v, (char *) &pte, sizeof(pte)) || pte.pg_v == 0)
return (~0);

View File

@ -34,7 +34,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "from: @(#)kvm.c 5.18 (Berkeley) 5/7/91";*/
static char rcsid[] = "$Id: kvm.c,v 1.21 1993/12/05 00:33:30 cgd Exp $";
static char rcsid[] = "$Id: kvm.c,v 1.22 1993/12/15 00:53:29 mycroft Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -982,7 +982,7 @@ Vtophys(loc)
struct pte pte;
int p;
pde = PTD[loc >> PD_SHIFT];
pde = PTD[loc >> PDSHIFT];
if (pde.pd_v == 0) {
seterr("vtophys: page directory entry not valid");
return((off_t) -1);

View File

@ -34,7 +34,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "from: @(#)kvm.c 5.18 (Berkeley) 5/7/91";*/
static char rcsid[] = "$Id: kvm.c,v 1.21 1993/12/05 00:33:30 cgd Exp $";
static char rcsid[] = "$Id: kvm.c,v 1.22 1993/12/15 00:53:29 mycroft Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -982,7 +982,7 @@ Vtophys(loc)
struct pte pte;
int p;
pde = PTD[loc >> PD_SHIFT];
pde = PTD[loc >> PDSHIFT];
if (pde.pd_v == 0) {
seterr("vtophys: page directory entry not valid");
return((off_t) -1);

View File

@ -308,14 +308,14 @@ kernacc(addr, count, rw)
if (count <= 0)
return(0);
pde = (struct pde *)((u_int)u.u_procp->p_p0br + u.u_procp->p_szpt * NBPG);
ix = (addr & PD_MASK) >> PD_SHIFT;
cnt = ((addr + count + (1 << PD_SHIFT) - 1) & PD_MASK) >> PD_SHIFT;
ix = (addr & PD_MASK) >> PDSHIFT;
cnt = ((addr + count + (1 << PDSHIFT) - 1) & PD_MASK) >> PDSHIFT;
cnt -= ix;
for (pde += ix; cnt; cnt--, pde++)
if (pde->pd_v == 0)
return(0);
ix = btop(addr-0xfe000000);
cnt = btop(addr-0xfe000000+count+NBPG-1);
ix = btop(addr-KERNBASE);
cnt = btop(addr-KERNBASE+count+NBPG-1);
if (cnt > (int)&Syssize)
return(0);
cnt -= ix;