aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass2016-09-25 21:33:25 -0600
committerBin Meng2016-10-11 11:55:33 +0800
commit21b3b66acece160c12166b8bcb5511af5c065cef (patch)
tree2257d876b2fc94ba3a6200e49d2fb87f86e0216b /arch
parentd30b3103a56b5340f85dfadfb6ef52626700ee67 (diff)
x86: Correct address casts in interrupt code
We should cast an address to unsigned long, not u32. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/cpu/interrupts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c
index 46babe00fac..5f6cdd36ac1 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);
}
/*