[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



On Sat, Apr 17, 2010 at 09:46:18PM -0700, Jeremy Fitzhardinge wrote:
> 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

So this #else is for the CONFIG_XEN_DOM0_PCI..
> > static inline int xen_register_gsi(u32 gsi, int triggering, int polarity)
> > {
> >         return -1;
> > }

perhaps add:

#else /* This is for CONFIG_XEN */

static inline int xen_register_gsi(...)
{

}
#endif

Or maybe better take out the xen_register_gsi out of this double
#ifdef and move it to its own. Say:


#if !defined(CONFIG_XEN)
static int xen_register_gsi(..)

#endif


> > ...
> >   
> 
> This is a good way of handling it.

The header file change or the #ifdef in the acpi/boot.c file?
> 
>     J
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.