From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 06/15] lib/x86/smp: Fix compiler warnings Date: Tue, 17 Dec 2013 11:35:03 +0100 Message-ID: <52B028D7.6060405@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm , Arthur Chunqi Li To: Jan Kiszka Return-path: Received: from mail-ea0-f180.google.com ([209.85.215.180]:40355 "EHLO mail-ea0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751274Ab3LQKfH (ORCPT ); Tue, 17 Dec 2013 05:35:07 -0500 Received: by mail-ea0-f180.google.com with SMTP id f15so2810568eak.39 for ; Tue, 17 Dec 2013 02:35:05 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 16/12/2013 10:57, Jan Kiszka ha scritto: > Add missing include of desc.h for prototypes of setup_idt and > set_idt_entry and cast away the volatile of ipi_data - it's not volatile > while we run the IPI handler. > > Signed-off-by: Jan Kiszka The right fix is to change the declaration from static volatile void *ipi_data; // Pointer to volatile void to static void *volatile ipi_data; // Volatile pointer to void Paolo > --- > lib/x86/smp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/x86/smp.c b/lib/x86/smp.c > index d4c8106..75ac081 100644 > --- a/lib/x86/smp.c > +++ b/lib/x86/smp.c > @@ -3,6 +3,7 @@ > #include "smp.h" > #include "apic.h" > #include "fwcfg.h" > +#include "desc.h" > > #define IPI_VECTOR 0x20 > > @@ -18,7 +19,7 @@ static int _cpu_count; > static __attribute__((used)) void ipi() > { > void (*function)(void *data) = ipi_function; > - void *data = ipi_data; > + void *data = (void *)ipi_data; > bool wait = ipi_wait; > > if (!wait) { >