WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] pv-ops: Fix missing 'ifdef CONFIG_XEN' in acpi

To: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] pv-ops: Fix missing 'ifdef CONFIG_XEN' in acpi
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Sat, 17 Apr 2010 21:46:18 -0700
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Sun, 18 Apr 2010 11:07:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BCA82FF.20901@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4BC7C657.3010609@xxxxxxxxxxxxxx> <20100416145604.GC29398@xxxxxxxxxxxxxxxxxxx> <4BCA82FF.20901@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.4
On 04/17/2010 08:56 PM, Yu Zhiguo wrote:
> 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;
> }
> ...
>   

This is a good way of handling it.

    J

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel