From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from server19320154104.serverpool.info ([193.201.54.104]:55421 "EHLO hauke-m.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756561Ab3GaOjH (ORCPT ); Wed, 31 Jul 2013 10:39:07 -0400 Message-ID: <51F92183.2010203@hauke-m.de> (sfid-20130731_163910_230883_4B60B6F2) Date: Wed, 31 Jul 2013 16:38:59 +0200 From: Hauke Mehrtens MIME-Version: 1.0 To: Patrick Ziegler CC: "Luis R. Rodriguez" , backports@vger.kernel.org Subject: Re: [RFC v2 1/8] backports: disable PCI functions for kernels without PCI support References: <51F8CD2A.2090101@fh-kl.de> In-Reply-To: <51F8CD2A.2090101@fh-kl.de> Content-Type: text/plain; charset=ISO-8859-15 Sender: backports-owner@vger.kernel.org List-ID: Nice work, what kernel version(s) without PCI support have you tested this against? There are also PCI(e) functions in backport/compat/compat-3.7.c and backport/compat/compat-2.6.27.c On 07/31/2013 10:39 AM, Patrick Ziegler wrote: > Signed-off-by: Patrick Ziegler > --- > backport/compat/compat-2.6.25.c | 2 ++ > backport/compat/compat-2.6.28.c | 4 ++++ > 2 files changed, 6 insertions(+) > > diff --git a/backport/compat/compat-2.6.25.c b/backport/compat/compat-2.6.25.c > index b3597ea..37407a4 100644 > --- a/backport/compat/compat-2.6.25.c > +++ b/backport/compat/compat-2.6.25.c > @@ -210,6 +210,7 @@ EXPORT_SYMBOL_GPL(sg_alloc_table); > * to it. We implement a sloppy work around for backporting > * this. > */ > +#ifdef CONFIG_PCI > int pci_enable_device_mem(struct pci_dev *dev) > { > int bars = pci_select_bars(dev, IORESOURCE_MEM); > @@ -217,6 +218,7 @@ int pci_enable_device_mem(struct pci_dev *dev) > return pci_enable_device_bars(dev, bars); > } > EXPORT_SYMBOL_GPL(pci_enable_device_mem); > +#endif > > /** > * The following things are out of ./lib/vsprintf.c > diff --git a/backport/compat/compat-2.6.28.c b/backport/compat/compat-2.6.28.c > index e47626b..9c21de8 100644 > --- a/backport/compat/compat-2.6.28.c > +++ b/backport/compat/compat-2.6.28.c > @@ -238,6 +238,7 @@ EXPORT_SYMBOL_GPL(usb_anchor_empty); > #endif /* CONFIG_USB */ > #endif > > +#ifdef CONFIG_PCI > void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar) > { > /* > @@ -251,6 +252,7 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar) > pci_resource_len(pdev, bar)); > } > EXPORT_SYMBOL_GPL(pci_ioremap_bar); > +#endif > > static unsigned long round_jiffies_common(unsigned long j, int cpu, > bool force_up) > @@ -455,6 +457,7 @@ EXPORT_SYMBOL_GPL(n_tty_ioctl_helper); > * generating PME# from both D3_hot and D3_cold, and the platform is unable to > * enable wake-up power for it. > */ > +#ifdef CONFIG_PCI > int pci_wake_from_d3(struct pci_dev *dev, bool enable) > { > return pci_pme_capable(dev, PCI_D3cold) ? > @@ -462,4 +465,5 @@ int pci_wake_from_d3(struct pci_dev *dev, bool enable) > pci_enable_wake(dev, PCI_D3hot, enable); > } > EXPORT_SYMBOL_GPL(pci_wake_from_d3); > +#endif The mainline Linux kernel uses a empty pci_wake_from_d3() function if CONFIG_PCI is not set in include/linux/pci.h Hauke