From: Paolo Bonzini Subject: Re: [PATCH kvm-unit-tests 2/2] lib/x86/apic: fix 32-bit compilation Date: Thu, 12 Jan 2017 13:32:33 +0100 Message-ID: <41a87fc0-55eb-c5d5-18a0-567570b23de6@redhat.com> References: <20170111142445.5186-1-drjones@redhat.com> <20170111142445.5186-3-drjones@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Andrew Jones , kvm@vger.kernel.org Return-path: Received: from mail-wj0-f193.google.com ([209.85.210.193]:34744 "EHLO mail-wj0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750920AbdALMdZ (ORCPT ); Thu, 12 Jan 2017 07:33:25 -0500 Received: by mail-wj0-f193.google.com with SMTP id qs7so1713145wjc.1 for ; Thu, 12 Jan 2017 04:32:34 -0800 (PST) In-Reply-To: <20170111142445.5186-3-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/01/2017 15:24, Andrew Jones wrote: > 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) > Queued both, thanks and sorry. Paolo