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: Thu, 22 Apr 2010 12:05:03 +0800 Message-ID: <4BCFCAEF.1000206@cn.fujitsu.com> References: <4BC7C657.3010609@cn.fujitsu.com> <20100416145604.GC29398@phenom.dumpdata.com> <4BCA82FF.20901@cn.fujitsu.com> <4BCA8E9A.6090209@goop.org> <20100419133026.GA17501@phenom.dumpdata.com> <4BCD3C2B.3030706@cn.fujitsu.com> <20100420183301.GA32720@phenom.dumpdata.com> <4BCE7120.7020004@cn.fujitsu.com> <20100421130045.GA24393@phenom.dumpdata.com> <4BCF0352.50909@cn.fujitsu.com> <4BCF28BE.4000206@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4BCF28BE.4000206@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: "xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org Hi jeremy, Jeremy Fitzhardinge wrote: >> #endif >> + >> +#if !defined(CONFIG_XEN) || (defined(CONFIG_XEN) && !defined(CONFIG_XEN_DOM0_PCI)) >> > > As I mentioned in the other mail, there's no need to test CONFIG_XEN. > Indeed, thanks for your hint. Correct now, please refer to the following. ------------------------ routines 'xen_register_gsi' and 'xen_setup_msi_irqs' cannot be used unless macro 'CONFIG_XEN' is defined, otherwise build error occurs. So fix them in the header file. Signed-off-by: Yu Zhiguo --- arch/x86/include/asm/xen/pci.h | 54 +++++++++++++++++++++------------------ 1 files changed, 29 insertions(+), 25 deletions(-) diff --git a/arch/x86/include/asm/xen/pci.h b/arch/x86/include/asm/xen/pci.h index 650645d..56b15d1 100644 --- a/arch/x86/include/asm/xen/pci.h +++ b/arch/x86/include/asm/xen/pci.h @@ -14,36 +14,12 @@ void xen_teardown_msi_dev(struct pci_dev *dev); int xen_find_device_domain_owner(struct pci_dev *dev); int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain); int xen_unregister_device_domain_owner(struct pci_dev *dev); - -#else -static inline int xen_register_gsi(u32 gsi, int triggering, int polarity) -{ - return -1; -} -static inline int xen_find_device_domain_owner(struct pci_dev *dev) -{ - return -1; -} -static inline int xen_register_device_domain_owner(struct pci_dev *dev, - uint16_t domain) -{ - return -1; -} -static inline int xen_unregister_device_domain_owner(struct pci_dev *dev) -{ - return -1; -} -static inline void xen_teardown_msi_dev(struct pci_dev *dev) { } #endif #if defined(CONFIG_PCI_MSI) && defined(CONFIG_XEN_DOM0_PCI) int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); -#else -static inline int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) -{ - return -1; -} #endif + #if defined(CONFIG_PCI_MSI) /* The drivers/pci/xen-pcifront.c sets this structure to @@ -97,4 +73,32 @@ static inline int xen_create_msi_irq(struct pci_dev *dev, return -1; } #endif + +#ifndef CONFIG_XEN_DOM0_PCI +static inline int xen_register_gsi(u32 gsi, int triggering, int polarity) +{ + return -1; +} +static inline int xen_find_device_domain_owner(struct pci_dev *dev) +{ + return -1; +} +static inline int xen_register_device_domain_owner(struct pci_dev *dev, + uint16_t domain) +{ + return -1; +} +static inline int xen_unregister_device_domain_owner(struct pci_dev *dev) +{ + return -1; +} +static inline void xen_teardown_msi_dev(struct pci_dev *dev) { } +#endif + +#if (!defined(CONFIG_PCI_MSI) || !defined(CONFIG_XEN_DOM0_PCI)) +static inline int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) +{ + return -1; +} +#endif #endif /* _ASM_X86_XEN_PCI_H */ -- 1.5.4.2