All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rob Herring <robh@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Lee Jones <lee.jones@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	Richard Weinberger <richard@nod.at>,
	uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: Re: [PATCH 1/2] asm-generic/io.h: provide default ioremap/iounmap for !HAS_IOMEM
Date: Thu, 31 Mar 2016 10:39:49 +0200	[thread overview]
Message-ID: <CAMuHMdWXJU9wnB4zuR3dGt3AVjPzUaNth1FtQ78mneAf-joesA@mail.gmail.com> (raw)
In-Reply-To: <CAL_JsqL+fdh2_UZx=vPuOXMMiLJZEd7AvqZpAucEkwOfPZWgog@mail.gmail.com>

Hi Rob,

On Wed, Mar 30, 2016 at 11:20 PM, Rob Herring <robh@kernel.org> wrote:
> On Wed, Mar 30, 2016 at 3:08 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> On Tue, Mar 29, 2016 at 10:13 PM, Rob Herring <robh@kernel.org> wrote:
>>> Ewww. Why do the opposite of what we do for every other Kconfig symbol
>>> which is provide empty functions? It really only functions as a
>>> disable on UML flag which runs counter to enabling drivers to build
>>> for all arches.
>>
>> Usually the empty function fall into one of two classes:
>>   1. They return an error, so drivers will abort their initialization,
>>   2. They are a plain no-op, for functions with harmless side-effects.
>>
>> The !MMU versions are not dummies, but assume a transparent translation.
>> This may lead to drivers continuing their initialization and crashing the
>> system.
>
> I thought about this, but how could you even get to the point of
> having some physical address passed to the driver? Perhaps some old
> ISA driver, but I'm not sure memory ranges were ever fixed (only i/o).
> We're really only talking about UML here.

Hmm, perhaps it indeed can't happen.

>>> I actually started a patch to remove the HAS_IOMEM dependency
>>> everywhere (or just the per driver cases). It didn't break as bad as I
>>> expected, but became more than I wanted to fix. Mainly, all the devm_
>>> variants also need empty versions or to be always enabled.
>>
>> Should these dependencies on HAS_IOMEM be changed to "HAS_IOMEM ||
>> COMPILE_TEST"?
>
> Why? Most are either HAS_IOMEM or HAS_IOMEM && COMPILE_TEST.

COMPILE_TEST is meant to enable drivers that are not useful, due to missing
infrastructure.
Without having it enabled, you don't want to include useless drivers.
If you have dummies, you still want the HAS_IOMEM dependency to avoid
compiling useless drivers. I.e. it's a hint for distros, who don't want to ship
useless drivers.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2016-03-31  8:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 18:23 [PATCH 1/2] asm-generic/io.h: provide default ioremap/iounmap for !HAS_IOMEM Rob Herring
2016-03-29 18:23 ` [PATCH 2/2] mfd: remove dependency on HAS_IOMEM Rob Herring
2016-03-30  4:23   ` Krzysztof Kozlowski
2016-03-29 19:37 ` [PATCH 1/2] asm-generic/io.h: provide default ioremap/iounmap for !HAS_IOMEM Arnd Bergmann
2016-03-29 19:50   ` Richard Weinberger
2016-03-29 20:13   ` Rob Herring
2016-03-30  7:50     ` Richard Weinberger
2016-03-30  8:04       ` Arnd Bergmann
2016-03-30  8:04         ` [uml-devel] " Arnd Bergmann
2016-03-30  8:13         ` Richard Weinberger
2016-03-30  8:13           ` Richard Weinberger
2016-03-30 10:03           ` Arnd Bergmann
2016-03-30 13:29             ` Rob Herring
2016-03-30 13:51               ` Arnd Bergmann
2016-03-30 20:08     ` Geert Uytterhoeven
2016-03-30 20:35       ` Richard Weinberger
2016-03-30 20:38         ` Arnd Bergmann
2016-03-30 21:20       ` Rob Herring
2016-03-31  8:39         ` Geert Uytterhoeven [this message]
2016-03-30  4:19 ` Krzysztof Kozlowski

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=CAMuHMdWXJU9wnB4zuR3dGt3AVjPzUaNth1FtQ78mneAf-joesA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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.