summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2024-02-23 14:06:34 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-02-23 14:09:30 +0100
commit082831b9a62c7582635c564791d329e2477e2de4 (patch)
tree54d977bb994b38f45446eb3d116bfb98280763c6 /i386
parent68e9c64926264a0bb926372b16f0dbf9c0d35224 (diff)
spl: Introduce assert_splvm and use it in process_pmap_updates
Suggested-by: Damien Zammit <damien@zamaudio.com>
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/spl.h1
-rw-r--r--i386/intel/pmap.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/i386/i386/spl.h b/i386/i386/spl.h
index 41ad225d..834204c4 100644
--- a/i386/i386/spl.h
+++ b/i386/i386/spl.h
@@ -55,6 +55,7 @@ extern spl_t (spl6)(void);
extern spl_t (spltty)(void);
extern spl_t (splimp)(void);
extern spl_t (splvm)(void);
+#define assert_splvm() assert(splvm() == SPL7)
extern spl_t (spl7)(void);
extern spl_t (splclock)(void);
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index e43b06c1..21f75eeb 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -3114,6 +3114,7 @@ void process_pmap_updates(pmap_t my_pmap)
pmap_t pmap;
update_list_p = &cpu_update_list[my_cpu];
+ assert_splvm();
simple_lock_nocheck(&update_list_p->lock);
for (j = 0; j < update_list_p->count; j++) {