From: Simon Glass Date: Mon, 26 Sep 2016 03:33:25 +0000 (-0600) Subject: x86: Correct address casts in interrupt code X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=21b3b66acece160c12166b8bcb5511af5c065cef;p=u-boot.git x86: Correct address casts in interrupt code We should cast an address to unsigned long, not u32. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index 46babe00fa..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); } /*