diff options
Diffstat (limited to 'sys/arm/include')
-rw-r--r-- | sys/arm/include/cpufunc.h | 4 | ||||
-rw-r--r-- | sys/arm/include/profile.h | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/sys/arm/include/cpufunc.h b/sys/arm/include/cpufunc.h index 2199beb..f5de80a 100644 --- a/sys/arm/include/cpufunc.h +++ b/sys/arm/include/cpufunc.h @@ -50,13 +50,11 @@ #include <machine/cpuconf.h> #include <machine/katelib.h> /* For in[bwl] and out[bwl] */ -void disable_intr(void); -void enable_intr(void); - static __inline void breakpoint(void) { } + static __inline register_t intr_disable(void) { diff --git a/sys/arm/include/profile.h b/sys/arm/include/profile.h index 28faab5..efd3003 100644 --- a/sys/arm/include/profile.h +++ b/sys/arm/include/profile.h @@ -61,11 +61,11 @@ #define MCOUNT_DECL(s) u_long s; #ifdef SMP extern int mcount_lock; -#define MCOUNT_ENTER(s) { s = read_eflags(); disable_intr(); \ +#define MCOUNT_ENTER(s) { s = intr_disable(); \ while (!atomic_cmpset_acq_int(&mcount_lock, 0, 1)) \ /* nothing */ ; } #define MCOUNT_EXIT(s) { atomic_store_rel_int(&mcount_lock, 0); \ - write_eflags(s); } + intr_restore(s); } #else #define MCOUNT_ENTER(s) { s = read_eflags(); disable_intr(); } #define MCOUNT_EXIT(s) (write_eflags(s)) |