From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu Zhiguo Subject: Re: [PATCH] pv-ops: Fix missing 'ifdef CONFIG_XEN' in acpi Date: Sun, 18 Apr 2010 11:56:47 +0800 Message-ID: <4BCA82FF.20901@cn.fujitsu.com> References: <4BC7C657.3010609@cn.fujitsu.com> <20100416145604.GC29398@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100416145604.GC29398@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Konrad Rzeszutek Wilk wrote: > On Fri, Apr 16, 2010 at 10:07:19AM +0800, Yu Zhiguo wrote: >> routines 'xen_register_gsi' and 'xen_teardown_msi_dev' cannot be used >> unless macro 'CONFIG_XEN' is defined, otherwise build error occurs. > > There has to be a better of doing this. Aren't the > xen_register_gsi defined in the header files? How about making in the > header file the #ifdef CONFIG_XEN there? > > In fact, 'xen_register_gsi' is declared in header file 'asm/xen/pci.h' with '#ifdef CONFIG_XEN', please refer to the following code. So 'acpi/boot.c' can use it but should check '#ifdef CONFIG_XEN'. What's your opinion? -----------------------asm/xen/pci.h---------------------- #ifdef CONFIG_XEN ... #ifdef CONFIG_XEN_DOM0_PCI int xen_register_gsi(u32 gsi, int triggering, int polarity); ... #else static inline int xen_register_gsi(u32 gsi, int triggering, int polarity) { return -1; } ... #endif Regards Yu Zhiguo