From: Andrew Cooper Date: Tue, 14 Apr 2015 13:29:19 +0000 (+0200) Subject: x86: use real assert frames for ASSERT_INTERRUPTS_{EN,DIS}ABLED X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3432 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=881d6bf2d16a7d6a900d7de8ae83d1e8eb2f3f3b;p=xen.git x86: use real assert frames for ASSERT_INTERRUPTS_{EN,DIS}ABLED Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/asm-x86/asm_defns.h index 1674c7c143..7c8c2c0bc7 100644 --- a/xen/include/asm-x86/asm_defns.h +++ b/xen/include/asm-x86/asm_defns.h @@ -6,6 +6,7 @@ /* NB. Auto-generated from arch/.../asm-offsets.c */ #include #endif +#include #include #include #include @@ -26,18 +27,20 @@ void ret_from_intr(void); #endif #ifndef NDEBUG -#define ASSERT_INTERRUPT_STATUS(x) \ +#define ASSERT_INTERRUPT_STATUS(x, msg) \ pushf; \ testb $X86_EFLAGS_IF>>8,1(%rsp); \ j##x 1f; \ - ud2a; \ + ASSERT_FAILED(msg); \ 1: addq $8,%rsp; #else -#define ASSERT_INTERRUPT_STATUS(x) +#define ASSERT_INTERRUPT_STATUS(x, msg) #endif -#define ASSERT_INTERRUPTS_ENABLED ASSERT_INTERRUPT_STATUS(nz) -#define ASSERT_INTERRUPTS_DISABLED ASSERT_INTERRUPT_STATUS(z) +#define ASSERT_INTERRUPTS_ENABLED \ + ASSERT_INTERRUPT_STATUS(nz, "INTERRUPTS ENABLED") +#define ASSERT_INTERRUPTS_DISABLED \ + ASSERT_INTERRUPT_STATUS(z, "INTERRUPTS DISABLED") /* * This flag is set in an exception frame when registers R12-R15 did not get