From 082831b9a62c7582635c564791d329e2477e2de4 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 23 Feb 2024 14:06:34 +0100 Subject: spl: Introduce assert_splvm and use it in process_pmap_updates Suggested-by: Damien Zammit --- i386/i386/spl.h | 1 + i386/intel/pmap.c | 1 + 2 files changed, 2 insertions(+) (limited to 'i386') 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++) { -- cgit v1.2.3