summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c
index d97b8a280ba..46be8e6a088 100644
--- a/sys/arch/sparc64/sparc64/pmap.c
+++ b/sys/arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.64 2008/07/04 17:40:25 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.65 2008/07/05 21:20:48 kettenis Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
/*
@@ -882,12 +882,12 @@ remap_data:
* Hunt for the kernel text segment and figure out it size and
* alignment.
*/
+ ktsize = 0;
for (i = 0; i < prom_map_size; i++)
- if (prom_map[i].vstart == ktext)
- break;
- if (i == prom_map_size)
+ if (prom_map[i].vstart == ktext + ktsize)
+ ktsize += prom_map[i].vsize;
+ if (ktsize == 0)
panic("No kernel text segment!");
- ktsize = prom_map[i].vsize;
ektext = ktext + ktsize;
if (ktextp & (4*MEG-1)) {