| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: uvm_map.c,v 1.284 2009/11/07 07:27:49 cegger Exp $ */ | | 1 | /* $NetBSD: uvm_map.c,v 1.285 2009/12/14 21:19:47 matt Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1997 Charles D. Cranor and Washington University. | | 4 | * Copyright (c) 1997 Charles D. Cranor and Washington University. |
5 | * Copyright (c) 1991, 1993, The Regents of the University of California. | | 5 | * Copyright (c) 1991, 1993, The Regents of the University of California. |
6 | * | | 6 | * |
7 | * All rights reserved. | | 7 | * All rights reserved. |
8 | * | | 8 | * |
9 | * This code is derived from software contributed to Berkeley by | | 9 | * This code is derived from software contributed to Berkeley by |
10 | * The Mach Operating System project at Carnegie-Mellon University. | | 10 | * The Mach Operating System project at Carnegie-Mellon University. |
11 | * | | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | | 12 | * Redistribution and use in source and binary forms, with or without |
13 | * modification, are permitted provided that the following conditions | | 13 | * modification, are permitted provided that the following conditions |
14 | * are met: | | 14 | * are met: |
| @@ -61,27 +61,27 @@ | | | @@ -61,27 +61,27 @@ |
61 | * School of Computer Science | | 61 | * School of Computer Science |
62 | * Carnegie Mellon University | | 62 | * Carnegie Mellon University |
63 | * Pittsburgh PA 15213-3890 | | 63 | * Pittsburgh PA 15213-3890 |
64 | * | | 64 | * |
65 | * any improvements or extensions that they make and grant Carnegie the | | 65 | * any improvements or extensions that they make and grant Carnegie the |
66 | * rights to redistribute these changes. | | 66 | * rights to redistribute these changes. |
67 | */ | | 67 | */ |
68 | | | 68 | |
69 | /* | | 69 | /* |
70 | * uvm_map.c: uvm map operations | | 70 | * uvm_map.c: uvm map operations |
71 | */ | | 71 | */ |
72 | | | 72 | |
73 | #include <sys/cdefs.h> | | 73 | #include <sys/cdefs.h> |
74 | __KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.284 2009/11/07 07:27:49 cegger Exp $"); | | 74 | __KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.285 2009/12/14 21:19:47 matt Exp $"); |
75 | | | 75 | |
76 | #include "opt_ddb.h" | | 76 | #include "opt_ddb.h" |
77 | #include "opt_uvmhist.h" | | 77 | #include "opt_uvmhist.h" |
78 | #include "opt_uvm.h" | | 78 | #include "opt_uvm.h" |
79 | #include "opt_sysv.h" | | 79 | #include "opt_sysv.h" |
80 | | | 80 | |
81 | #include <sys/param.h> | | 81 | #include <sys/param.h> |
82 | #include <sys/systm.h> | | 82 | #include <sys/systm.h> |
83 | #include <sys/mman.h> | | 83 | #include <sys/mman.h> |
84 | #include <sys/proc.h> | | 84 | #include <sys/proc.h> |
85 | #include <sys/malloc.h> | | 85 | #include <sys/malloc.h> |
86 | #include <sys/pool.h> | | 86 | #include <sys/pool.h> |
87 | #include <sys/kernel.h> | | 87 | #include <sys/kernel.h> |
| @@ -562,27 +562,27 @@ _uvm_tree_sanity(struct vm_map *map) | | | @@ -562,27 +562,27 @@ _uvm_tree_sanity(struct vm_map *map) |
562 | printf("nentries: %d vs %d\n", n, map->nentries); | | 562 | printf("nentries: %d vs %d\n", n, map->nentries); |
563 | goto error; | | 563 | goto error; |
564 | } | | 564 | } |
565 | | | 565 | |
566 | trtmp = NULL; | | 566 | trtmp = NULL; |
567 | for (tmp = map->header.next; tmp != &map->header; tmp = tmp->next) { | | 567 | for (tmp = map->header.next; tmp != &map->header; tmp = tmp->next) { |
568 | if (tmp->maxgap != uvm_rb_maxgap(tmp)) { | | 568 | if (tmp->maxgap != uvm_rb_maxgap(tmp)) { |
569 | printf("maxgap %lx != %lx\n", | | 569 | printf("maxgap %lx != %lx\n", |
570 | (ulong)tmp->maxgap, | | 570 | (ulong)tmp->maxgap, |
571 | (ulong)uvm_rb_maxgap(tmp)); | | 571 | (ulong)uvm_rb_maxgap(tmp)); |
572 | goto error; | | 572 | goto error; |
573 | } | | 573 | } |
574 | if (trtmp != NULL && trtmp->start >= tmp->start) { | | 574 | if (trtmp != NULL && trtmp->start >= tmp->start) { |
575 | printf("corrupt: 0x%lx >= 0x%lx\n", | | 575 | printf("corrupt: 0x%"PRIxVADDR"x >= 0x%"PRIxVADDR"x\n", |
576 | trtmp->start, tmp->start); | | 576 | trtmp->start, tmp->start); |
577 | goto error; | | 577 | goto error; |
578 | } | | 578 | } |
579 | | | 579 | |
580 | trtmp = tmp; | | 580 | trtmp = tmp; |
581 | } | | 581 | } |
582 | | | 582 | |
583 | for (tmp = map->header.next; tmp != &map->header; | | 583 | for (tmp = map->header.next; tmp != &map->header; |
584 | tmp = tmp->next, i++) { | | 584 | tmp = tmp->next, i++) { |
585 | trtmp = (void *) rb_tree_iterate(&map->rb_tree, &tmp->rb_node, | | 585 | trtmp = (void *) rb_tree_iterate(&map->rb_tree, &tmp->rb_node, |
586 | RB_DIR_LEFT); | | 586 | RB_DIR_LEFT); |
587 | if (trtmp == NULL) | | 587 | if (trtmp == NULL) |
588 | trtmp = &map->header; | | 588 | trtmp = &map->header; |