All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Borneo <borneo.antonio@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	netdev@vger.kernel.org, linux-next@vger.kernel.org,
	Alexey Charkov <alchark@gmail.com>
Subject: Re: [PATCH] net: via/Kconfig: GENERIC_PCI_IOMAP required if PCI not selected
Date: Thu, 23 Jul 2015 09:35:51 +0800	[thread overview]
Message-ID: <CAAj6DX3WpzogwYFa4EQ-b1o+n-4kE0iXOokYQA5NpV=3YBmM_A@mail.gmail.com> (raw)
In-Reply-To: <20150722.110836.422018977846427052.davem@davemloft.net>

On Thu, Jul 23, 2015 at 2:08 AM, David Miller <davem@davemloft.net> wrote:
> From: Antonio Borneo <borneo.antonio@gmail.com>
> Date: Thu, 23 Jul 2015 00:34:14 +0800
>
>> -     depends on (PCI || OF_IRQ)
>> +     depends on (PCI || (OF_IRQ && GENERIC_PCI_IOMAP))
>
> Having GENERIC_PCI_IOMAP withut PCI makes absolutely no sense to me.
>
> I can't see why a platform would provide GENERIC_PCI_IOMAP when it
> does not have PCI enabled.

My understanding for GENERIC_PCI_IOMAP is to enable providing empty
pci_iomap/pci_iounmap.
Digging in git log, arch that used to provide such empty instances
moved to a centralized implementation by using GENERIC_PCI_IOMAP.
For me such empty functions should be available by default when PCI is
not set, but this is not the case today.

So there are cases that set GENERIC_PCI_IOMAP without setting PCI. E.g.
make ARCH=mips workpad_defconfig
make ARCH=microblaze allnoconfig

Moreover, in lib/Kconfig GENERIC_PCI_IOMAP is selected when
GENERIC_IOMAP is set, without dependencies from PCI.

You can also check
https://lkml.org/lkml/2013/9/11/76
already upstream in commit
78857614104a26cdada4c53eea104752042bf5a1

Anyway, no other Kconfig uses GENERIC_PCI_IOMAP within conditionals,
which makes this patch quite unusual.

If you think this is not the way to go, we can consider to revert both
0f8b6cea1f3271ccc37dd2847b39e235461e0ced
b7d3282a245f44286b88e436b1d08c518cdf4569
and take some more time for a different solution.

Regards,
Antonio

> You need to explain this.
>
> When PCI is not enabled, you should not be using any interface
> pci_*() whatsoever.  Especially such a core interface as pci_iomap().
>
> ALTERNATIVELY, NOP versions of pci_iomap() and friends should be
> provided when PCI is disabled, which just return errors and
> non-success statuses.

  reply	other threads:[~2015-07-23  1:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22 16:34 [PATCH] net: via/Kconfig: GENERIC_PCI_IOMAP required if PCI not selected Antonio Borneo
2015-07-22 18:08 ` David Miller
2015-07-23  1:35   ` Antonio Borneo [this message]
2015-07-23 15:33     ` Alexey Charkov
2015-07-26 23:36     ` David Miller
2015-09-24 10:16 Sudip Mukherjee
2015-09-25 18:03 ` Sergei Shtylyov
2015-09-25 19:37   ` David Miller

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='CAAj6DX3WpzogwYFa4EQ-b1o+n-4kE0iXOokYQA5NpV=3YBmM_A@mail.gmail.com' \
    --to=borneo.antonio@gmail.com \
    --cc=alchark@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-next@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.