summaryrefslogtreecommitdiff
path: root/sys/arch/m68k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-01-14 19:57:49 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-01-14 19:57:49 +0000
commit00c0ffb862836558128125bf053d7d842636d2ce (patch)
treeaf203ee855f534d3bb65e201ddd60b022fc3faa4 /sys/arch/m68k
parentd39c2d626a3dbb3ae102a3358028604e48967c8a (diff)
Even better nptpages computation without unnecessary extra roundings; allows
extra large iomaps to work correctly.
Diffstat (limited to 'sys/arch/m68k')
-rw-r--r--sys/arch/m68k/m68k/pmap_bootstrap.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/arch/m68k/m68k/pmap_bootstrap.c b/sys/arch/m68k/m68k/pmap_bootstrap.c
index e6175b332ee..9d8f6cc3c98 100644
--- a/sys/arch/m68k/m68k/pmap_bootstrap.c
+++ b/sys/arch/m68k/m68k/pmap_bootstrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.10 2005/01/04 18:38:33 miod Exp $ */
+/* $OpenBSD: pmap_bootstrap.c,v 1.11 2005/01/14 19:57:48 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -164,9 +164,6 @@ pmap_bootstrap(nextpa, firstpa)
nextpa += kstsize * NBPG;
kptpa = nextpa;
- nptpages =
- (MACHINE_IIOMAPSIZE + MACHINE_EIOMAPSIZE + NPTEPG - 1) / NPTEPG;
-
iiopa = nextpa + RELOC(Sysptsize, int) * NBPG;
iiobase = m68k_ptob(RELOC(Sysptsize, int) * NPTEPG);
eiopa = iiopa + MACHINE_IIOMAPSIZE * sizeof(pt_entry_t);
@@ -176,12 +173,9 @@ pmap_bootstrap(nextpa, firstpa)
* We need to be able to map a whole UPT here as well. Adjust
* nptpages if necessary.
*/
- num = RELOC(Sysptsize, int) +
- (m68k_btop(MACHINE_MAX_PTSIZE) * sizeof(pt_entry_t) + NPTEPG - 1) /
- NPTEPG;
- if (nptpages < num)
- nptpages = num;
-
+ nptpages = (MACHINE_IIOMAPSIZE + MACHINE_EIOMAPSIZE +
+ m68k_btop(MACHINE_MAX_PTSIZE) * sizeof(pt_entry_t) + NPTEPG - 1) /
+ NPTEPG;
nextpa += nptpages * NBPG;
kptmpa = nextpa;