From 18c0d15c5b63fc2345c63a78f5586ff47eda706f Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 12 Aug 2023 18:57:09 +0200 Subject: simple lock: check that the non-_irq variants are not called from IRQ --- x86_64/locore.S | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'x86_64') diff --git a/x86_64/locore.S b/x86_64/locore.S index 070644bd..1ac7575e 100644 --- a/x86_64/locore.S +++ b/x86_64/locore.S @@ -820,12 +820,20 @@ ENTRY(all_intrs) TIME_INT_ENTRY /* do timing */ #endif - call EXT(interrupt) /* call generic interrupt routine */ +#ifdef MACH_LDEBUG + CPU_NUMBER(%ecx) + incl CX(EXT(in_interrupt),%rcx) +#endif - .globl EXT(return_to_iret) -LEXT(return_to_iret) /* ( label for kdb_kintr and hardclock) */ + call EXT(interrupt) /* call generic interrupt routine */ + .globl EXT(return_to_iret) /* ( label for kdb_kintr and hardclock */ +LEXT(return_to_iret) /* to find the return from calling interrupt) */ CPU_NUMBER(%edx) +#ifdef MACH_LDEBUG + decl CX(EXT(in_interrupt),%rdx) +#endif + #if STAT_TIME #else TIME_INT_EXIT /* do timing */ -- cgit v1.2.3