summaryrefslogtreecommitdiff
path: root/debian/patches/fix-locking0002-i386-enable-assertions.patch
blob: 271ad0818da4dcc76e01ec9dd2d9babf13ea897b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From cf2eb5d84928952dbef9f9388139599d54217dab Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Wed, 19 Aug 2015 16:22:25 +0200
Subject: [PATCH gnumach 2/5] i386: enable assertions

* i386/intel/pmap.c (pmap_page_protect): Enable assertions.
(phys_attribute_clear, phys_attribute_test): Likewise.
---
 i386/intel/pmap.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 5cfffb5..cf7a736 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -1585,8 +1585,8 @@ void pmap_page_protect(
 		/*
 		 * Consistency checks.
 		 */
-		/* assert(*pte & INTEL_PTE_VALID); XXX */
-		/* assert(pte_to_phys(*pte) == phys); */
+		assert(*pte & INTEL_PTE_VALID);
+		assert(pte_to_pa(*pte) == phys);
 
 		/*
 		 * Remove the mapping if new protection is NONE
@@ -2463,13 +2463,11 @@ phys_attribute_clear(
 		va = pv_e->va;
 		pte = pmap_pte(pmap, va);
 
-#if	0
 		/*
 		 * Consistency checks.
 		 */
 		assert(*pte & INTEL_PTE_VALID);
-		/* assert(pte_to_phys(*pte) == phys); */
-#endif
+		assert(pte_to_pa(*pte) == phys);
 
 		/*
 		 * Clear modify or reference bits.
@@ -2556,13 +2554,11 @@ phys_attribute_test(
 		    va = pv_e->va;
 		    pte = pmap_pte(pmap, va);
 
-#if	0
 		    /*
 		     * Consistency checks.
 		     */
 		    assert(*pte & INTEL_PTE_VALID);
-		    /* assert(pte_to_phys(*pte) == phys); */
-#endif
+		    assert(pte_to_pa(*pte) == phys);
 		}
 
 		/*
-- 
2.1.4