projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b11e298
)
x86: Allow interrupts to be disabled in 64-bit mode
author
Simon Glass
<sjg@chromium.org>
Mon, 26 Sep 2016 03:33:23 +0000
(21:33 -0600)
committer
Bin Meng
<bmeng.cn@gmail.com>
Tue, 11 Oct 2016 03:55:33 +0000
(11:55 +0800)
Update the code to support both 32-bit and 64-bit modes.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/interrupts.c
patch
|
blob
|
history
diff --git
a/arch/x86/cpu/interrupts.c
b/arch/x86/cpu/interrupts.c
index dd2819a12c79c2334f2191b498b19812308e9237..46babe00fac017274b297ac3a02b2091465ed85c 100644
(file)
--- 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;
}