[PATCH kvm-unit-tests 2/2] lib/x86/apic: fix 32-bit compilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the proper name, as the improper one isn't defined... Also
cleanup some trailing spaces.

Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
---
 lib/x86/apic.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/x86/apic.c b/lib/x86/apic.c
index aec968ea5a65..6b5b06806923 100644
--- a/lib/x86/apic.c
+++ b/lib/x86/apic.c
@@ -120,8 +120,8 @@ uint8_t apic_get_tpr(void)
 #ifdef __x86_64__
 	asm volatile ("mov %%cr8, %0" : "=r"(tpr));
 #else
-	tpr = apic_read(APIC_TPR) >> 4;
-#endif	
+	tpr = apic_read(APIC_TASKPRI) >> 4;
+#endif
 	return tpr;
 }
 
@@ -130,8 +130,8 @@ void apic_set_tpr(uint8_t tpr)
 #ifdef __x86_64__
 	asm volatile ("mov %0, %%cr8" : : "r"((unsigned long) tpr));
 #else
-	apic_write(APIC_TPR, tpr << 4);
-#endif	
+	apic_write(APIC_TASKPRI, tpr << 4);
+#endif
 }
 
 int enable_x2apic(void)
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux