Don't use apic->write for x2apic ICR
authorJack Miller <jack@codezen.org>
Fri, 25 Mar 2016 00:40:17 +0000 (19:40 -0500)
committerJack Miller <jack@codezen.org>
Fri, 25 Mar 2016 21:59:17 +0000 (16:59 -0500)
Will strip high bytes going through the ->write cast

kernel/apic.c

index 4cea9ba..16cc57f 100644 (file)
@@ -238,7 +238,7 @@ static void x2apic_ipi_wait(void)
 
 static void x2apic_write_icr(u32 dest, u32 val)
 {
-       apic->write(APIC_ICRL, ((u64) dest << 32) + val);
+       wrmsr(MSR_OFFSET(APIC_ICRL), ((u64) dest << 32) | val);
 }
 
 static u8 x2apic_get_id(void)