From: Andrew Jones Subject: [PATCH kvm-unit-tests 2/2] lib/x86/apic: fix 32-bit compilation Date: Wed, 11 Jan 2017 15:24:45 +0100 Message-ID: <20170111142445.5186-3-drjones@redhat.com> References: <20170111142445.5186-1-drjones@redhat.com> Cc: pbonzini@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:50096 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761412AbdAKOYu (ORCPT ); Wed, 11 Jan 2017 09:24:50 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C875CC0567B2 for ; Wed, 11 Jan 2017 14:24:50 +0000 (UTC) In-Reply-To: <20170111142445.5186-1-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Use the proper name, as the improper one isn't defined... Also cleanup some trailing spaces. Cc: Paolo Bonzini Signed-off-by: Andrew Jones --- 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