From: Simon Glass Date: Mon, 26 Sep 2016 03:33:23 +0000 (-0600) Subject: x86: Allow interrupts to be disabled in 64-bit mode X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=35233da98a53eb95a28d16d3fd836801b84015a9;p=u-boot.git x86: Allow interrupts to be disabled in 64-bit mode Update the code to support both 32-bit and 64-bit modes. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index dd2819a12c..46babe00fa 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -238,8 +238,11 @@ int disable_interrupts(void) { long flags; +#ifdef CONFIG_X86_64 + asm volatile ("pushfq ; popq %0 ; cli\n" : "=g" (flags) : ); +#else asm volatile ("pushfl ; popl %0 ; cli\n" : "=g" (flags) : ); - +#endif return flags & X86_EFLAGS_IF; }