Pārlūkot izejas kodu

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>
Simon Glass 8 gadi atpakaļ
vecāks
revīzija
21b3b66ace
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      arch/x86/cpu/interrupts.c

+ 2 - 2
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)
 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);
 }
 }
 
 
 /*
 /*