diff options
author | Tom Rini <trini@konsulko.com> | 2016-10-12 08:32:09 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-12 13:59:26 -0400 |
commit | 5ebd27d860ec0c6e36f1b0f973653fe66a7360be (patch) | |
tree | 71ba0f39cc03c131889ce51803d85cf4c49b2941 /arch/x86/cpu/interrupts.c | |
parent | f812574e61e9bfe37e76e620606fd1a65cc9cdc2 (diff) | |
parent | 00bcaedd5c4063c677d16af264bbcb991fb9675c (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'arch/x86/cpu/interrupts.c')
-rw-r--r-- | arch/x86/cpu/interrupts.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index dd2819a12c..5f6cdd36ac 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -182,8 +182,8 @@ static inline void load_idt(const struct desc_ptr *dtr) void set_vector(u8 intnum, void *routine) { - idt[intnum].base_high = (u16)((u32)(routine) >> 16); - idt[intnum].base_low = (u16)((u32)(routine) & 0xffff); + idt[intnum].base_high = (u16)((ulong)(routine) >> 16); + idt[intnum].base_low = (u16)((ulong)(routine) & 0xffff); } /* @@ -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; } |