From: Patrick Ziegler <patrick.ziegler@fh-kl.de>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>, <backports@vger.kernel.org>
Subject: Re: [RFC v2 1/8] backports: disable PCI functions for kernels without PCI support
Date: Thu, 1 Aug 2013 14:55:13 +0200 [thread overview]
Message-ID: <51FA5AB1.3080208@fh-kl.de> (raw)
In-Reply-To: <51F92183.2010203@hauke-m.de>
On 31.07.2013 16:38, Hauke Mehrtens wrote:
> Nice work,
>
> what kernel version(s) without PCI support have you tested this against?
I'm using this with kernel version 2.6.24.7
>
> There are also PCI(e) functions in backport/compat/compat-3.7.c and
> backport/compat/compat-2.6.27.c
That's true but they do not break the build. The functions which are called
inside these PCI(e) functions have already empty stub functions if PCI
support is not enabled.
>
> On 07/31/2013 10:39 AM, Patrick Ziegler wrote:
>> Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
>> ---
>> 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
>
Indeed, I've just realized that an include of pci.h in compat-2.6.28.c is
enough to make it work with kernel version 2.6.24. I will resend the patch with this change.
Patrick
--
Dipl.-Inf. (FH) Patrick Ziegler
University Of Applied Sciences
Kaiserslautern
Amerikastrasse 1
D-66482 Zweibruecken
Germany
Phone: +49 631 3724 5526
Mail: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
next prev parent reply other threads:[~2013-08-01 12:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1375259597.git.patrick.ziegler@fh-kl.de>
2013-07-31 8:39 ` [RFC v2 1/8] backports: disable PCI functions for kernels without PCI support Patrick Ziegler
2013-07-31 14:38 ` Hauke Mehrtens
2013-08-01 12:55 ` Patrick Ziegler [this message]
2013-07-31 8:39 ` [RFC v2 2/8] backports: add eth_prepare_mac_addr_change() and eth_commit_mac_addr_change() Patrick Ziegler
2013-07-31 8:39 ` [RFC v2 3/8] backports: define PM_EVENT_AUTO Patrick Ziegler
2013-07-31 8:39 ` [RFC v2 4/8] backports: add usb_translate_errors() Patrick Ziegler
2013-07-31 8:39 ` [RFC v2 5/8] backports: add usb_endpoint_maxp() Patrick Ziegler
2013-07-31 8:40 ` [RFC v2 6/8] backports: include headers directly if math64 header is missing Patrick Ziegler
2013-07-31 8:40 ` [RFC v2 7/8] backports: define phys_addr_t for ARM on kernel version < 2.6.25 Patrick Ziegler
2013-07-31 8:40 ` [RFC v2 8/8] backports: add wwan device drivers Patrick Ziegler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51FA5AB1.3080208@fh-kl.de \
--to=patrick.ziegler@fh-kl.de \
--cc=backports@vger.kernel.org \
--cc=hauke@hauke-m.de \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).