Nuke HP_SEG_SIZE. Use NBSEG instead (as used by m68k_trunc_seg() et al),
which takes into account the mmu type.
This commit is contained in:
parent
804b61073e
commit
a5a054f2c9
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.20 2000/03/18 22:33:05 scw Exp $ */
|
||||
/* $NetBSD: param.h,v 1.21 2000/05/27 22:37:47 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -60,7 +60,12 @@
|
|||
#define KERNBASE 0x00000000 /* start of kernel virtual */
|
||||
|
||||
#define SEGSHIFT 22 /* LOG2(NBSEG) */
|
||||
#if defined(M68030) && !defined(M68040) && !defined(M68060)
|
||||
#define NBSEG (1 << SEGSHIFT) /* bytes/segment */
|
||||
#else
|
||||
#define NBSEG ((mmutype == MMU_68040) ? \
|
||||
(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
|
||||
#endif
|
||||
#define SEGOFSET (NBSEG-1) /* byte offset into segment */
|
||||
|
||||
#define UPAGES 3 /* pages of u-area */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.h,v 1.15 2000/03/18 22:33:05 scw Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.16 2000/05/27 22:37:47 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987 Carnegie-Mellon University
|
||||
|
@ -45,12 +45,6 @@
|
|||
|
||||
#include <machine/pte.h>
|
||||
|
||||
#if defined(M68040)
|
||||
#define HP_SEG_SIZE (mmutype == MMU_68040 ? 0x40000 : NBSEG)
|
||||
#else
|
||||
#define HP_SEG_SIZE NBSEG
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Pmap stuff
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.41 2000/03/26 20:42:32 kleink Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.42 2000/05/27 22:37:48 scw Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -889,7 +889,7 @@ pmap_remove(pmap, sva, eva)
|
|||
|
||||
flags = active_pmap(pmap) ? PRM_TFLUSH : 0;
|
||||
while (sva < eva) {
|
||||
nssva = m68k_trunc_seg(sva) + HP_SEG_SIZE;
|
||||
nssva = m68k_trunc_seg(sva) + NBSEG;
|
||||
if (nssva == 0 || nssva > eva)
|
||||
nssva = eva;
|
||||
/*
|
||||
|
@ -1016,7 +1016,7 @@ pmap_protect(pmap, sva, eva, prot)
|
|||
needtflush = active_pmap(pmap);
|
||||
firstpage = TRUE;
|
||||
while (sva < eva) {
|
||||
nssva = m68k_trunc_seg(sva) + HP_SEG_SIZE;
|
||||
nssva = m68k_trunc_seg(sva) + NBSEG;
|
||||
if (nssva == 0 || nssva > eva)
|
||||
nssva = eva;
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue