From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Add ifdef in irqchip struct for x86 only structures Date: Mon, 26 Nov 2007 18:50:25 +0200 Message-ID: <474AF951.5030603@qumranet.com> References: <474AE413.2080905@qumranet.com> <1196093608.16469.35.camel@thinkpad> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org Return-path: In-Reply-To: <1196093608.16469.35.camel@thinkpad> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Jerone Young wrote: > Hmm... so now begins the conflict with userspace and kernel space header > sharing ;-) > > So the issue (which can be easily fixed) is that CONFIG_X86 is not > recognized in any userspace apps. While __i386__ & __x86_64__ are. Now > this can easily be added to our build system. But it does show the > problem. > > Also there are other headers in include/linux that use the same if > defined method that I used (actually checked to see if anyone had done > it in there). > > there is an unifdef-y= statement in include/linux/Kbuild that takes care of that. The amended patch uses it. > On Mon, 2007-11-26 at 17:19 +0200, Avi Kivity wrote: > >> Jerone Young wrote: >> >>> # HG changeset patch >>> # User Jerone Young >>> # Date 1196087575 21600 >>> # Node ID ccf9dd8a8e0a4513090d44d52c879fb9dfbb79dd >>> # Parent 32d8bd91d9441d2a3655593a0aaf99f6c403d70f >>> Add ifdef in irqchip struct for x86 only structures. >>> >>> This patch fixes a small issue where sturctures: >>> kvm_pic_state >>> kvm_ioapic_state >>> >>> are defined inside x86 specific code and may or may not >>> be defined in anyway for other architectures. The problem >>> caused is one cannot compile userspace apps (ex. libkvm) >>> for other archs since a size cannot be determined for these >>> structures. >>> >>> >>> >> Applied, but changed >> >> >>> +#if defined(__i386__) || defined(__x86_64__) >>> >>> >> to >> >> #ifdef CONFIG_X86 >> >> . >> >> > > -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/