All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: Fix OF build problem on UM
@ 2016-08-16  8:06 Linus Walleij
  2016-08-17  9:03 ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2016-08-16  8:06 UTC (permalink / raw)
  To: linux-gpio, Alexandre Courbot; +Cc: Linus Walleij, stable

The UserMode (UM) Linux build was failing in gpiolib-of as it requires
ioremap()/iounmap() to exist, which is absent from UM. The non-existence
of IO memory is negatively defined as CONFIG_NO_IOMEM so put a reverse
dependency on !NO_IOMEM for OF_GPIO to fix the build.

Cc: stable@vger.kernel.org
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 98dd47a30fc7..a6026f2fe7f5 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -50,6 +50,7 @@ config GPIO_DEVRES
 config OF_GPIO
 	def_bool y
 	depends on OF
+	depends on !NO_IOMEM
 
 config GPIO_ACPI
 	def_bool y
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: Fix OF build problem on UM
  2016-08-16  8:06 [PATCH] gpio: Fix OF build problem on UM Linus Walleij
@ 2016-08-17  9:03 ` Geert Uytterhoeven
  2016-08-19  8:53   ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2016-08-17  9:03 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio, Alexandre Courbot, stable

On Tue, Aug 16, 2016 at 10:06 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> The UserMode (UM) Linux build was failing in gpiolib-of as it requires
> ioremap()/iounmap() to exist, which is absent from UM. The non-existence
> of IO memory is negatively defined as CONFIG_NO_IOMEM so put a reverse
> dependency on !NO_IOMEM for OF_GPIO to fix the build.
>
> Cc: stable@vger.kernel.org
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/gpio/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 98dd47a30fc7..a6026f2fe7f5 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -50,6 +50,7 @@ config GPIO_DEVRES
>  config OF_GPIO
>         def_bool y
>         depends on OF
> +       depends on !NO_IOMEM

depends on HAS_IOMEM?

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: Fix OF build problem on UM
  2016-08-17  9:03 ` Geert Uytterhoeven
@ 2016-08-19  8:53   ` Linus Walleij
  2016-08-19  9:16     ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2016-08-19  8:53 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-gpio, Alexandre Courbot, stable

On Wed, Aug 17, 2016 at 11:03 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Tue, Aug 16, 2016 at 10:06 AM, Linus Walleij
> <linus.walleij@linaro.org> wrote:
>> The UserMode (UM) Linux build was failing in gpiolib-of as it requires
>> ioremap()/iounmap() to exist, which is absent from UM. The non-existence
>> of IO memory is negatively defined as CONFIG_NO_IOMEM so put a reverse
>> dependency on !NO_IOMEM for OF_GPIO to fix the build.
>>
>> Cc: stable@vger.kernel.org
>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>>  drivers/gpio/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
>> index 98dd47a30fc7..a6026f2fe7f5 100644
>> --- a/drivers/gpio/Kconfig
>> +++ b/drivers/gpio/Kconfig
>> @@ -50,6 +50,7 @@ config GPIO_DEVRES
>>  config OF_GPIO
>>         def_bool y
>>         depends on OF
>> +       depends on !NO_IOMEM
>
> depends on HAS_IOMEM?

Apparently not, and that is the scary thing.

HAS_IOMEM depends on !NO_IOMEM indeed but
it also selects GENERIC_IO, and AFAICT there are
some configs out there in the intersection between,
that have IOMEM but are not using GENERIC_IO,
tell me if I'm wrong :/

Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: Fix OF build problem on UM
  2016-08-19  8:53   ` Linus Walleij
@ 2016-08-19  9:16     ` Geert Uytterhoeven
  2016-08-19 12:53       ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2016-08-19  9:16 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio, Alexandre Courbot, stable

On Fri, Aug 19, 2016 at 10:53 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Wed, Aug 17, 2016 at 11:03 AM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> On Tue, Aug 16, 2016 at 10:06 AM, Linus Walleij
>> <linus.walleij@linaro.org> wrote:
>>> The UserMode (UM) Linux build was failing in gpiolib-of as it requires
>>> ioremap()/iounmap() to exist, which is absent from UM. The non-existence
>>> of IO memory is negatively defined as CONFIG_NO_IOMEM so put a reverse
>>> dependency on !NO_IOMEM for OF_GPIO to fix the build.
>>>
>>> Cc: stable@vger.kernel.org
>>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>> ---
>>>  drivers/gpio/Kconfig | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
>>> index 98dd47a30fc7..a6026f2fe7f5 100644
>>> --- a/drivers/gpio/Kconfig
>>> +++ b/drivers/gpio/Kconfig
>>> @@ -50,6 +50,7 @@ config GPIO_DEVRES
>>>  config OF_GPIO
>>>         def_bool y
>>>         depends on OF
>>> +       depends on !NO_IOMEM
>>
>> depends on HAS_IOMEM?
>
> Apparently not, and that is the scary thing.
>
> HAS_IOMEM depends on !NO_IOMEM indeed but
> it also selects GENERIC_IO, and AFAICT there are
> some configs out there in the intersection between,
> that have IOMEM but are not using GENERIC_IO,
> tell me if I'm wrong :/

lib/Kconfig:

    config HAS_IOMEM
            bool
            depends on !NO_IOMEM
            select GENERIC_IO
            default y

Hence if NO_IOMEM is not set, HAS_IOMEM and GENERIC_IO are always set.

UML selects GENERIC_IO, but not HAS_IOMEM (it sets NO_IOMEM).

Perhaps you're confusing GENERIC_IO with GENERIC_IOMAP?

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: Fix OF build problem on UM
  2016-08-19  9:16     ` Geert Uytterhoeven
@ 2016-08-19 12:53       ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2016-08-19 12:53 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-gpio, Alexandre Courbot, stable

On Fri, Aug 19, 2016 at 11:16 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Fri, Aug 19, 2016 at 10:53 AM, Linus Walleij
> <linus.walleij@linaro.org> wrote:
>> On Wed, Aug 17, 2016 at 11:03 AM, Geert Uytterhoeven
>> <geert@linux-m68k.org> wrote:
>>> On Tue, Aug 16, 2016 at 10:06 AM, Linus Walleij
>>> <linus.walleij@linaro.org> wrote:
>>>> The UserMode (UM) Linux build was failing in gpiolib-of as it requires
>>>> ioremap()/iounmap() to exist, which is absent from UM. The non-existence
>>>> of IO memory is negatively defined as CONFIG_NO_IOMEM so put a reverse
>>>> dependency on !NO_IOMEM for OF_GPIO to fix the build.
>>>>
>>>> Cc: stable@vger.kernel.org
>>>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>>> ---
>>>>  drivers/gpio/Kconfig | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
>>>> index 98dd47a30fc7..a6026f2fe7f5 100644
>>>> --- a/drivers/gpio/Kconfig
>>>> +++ b/drivers/gpio/Kconfig
>>>> @@ -50,6 +50,7 @@ config GPIO_DEVRES
>>>>  config OF_GPIO
>>>>         def_bool y
>>>>         depends on OF
>>>> +       depends on !NO_IOMEM
>>>
>>> depends on HAS_IOMEM?
>>
>> Apparently not, and that is the scary thing.
>>
>> HAS_IOMEM depends on !NO_IOMEM indeed but
>> it also selects GENERIC_IO, and AFAICT there are
>> some configs out there in the intersection between,
>> that have IOMEM but are not using GENERIC_IO,
>> tell me if I'm wrong :/
>
> lib/Kconfig:
>
>     config HAS_IOMEM
>             bool
>             depends on !NO_IOMEM
>             select GENERIC_IO
>             default y
>
> Hence if NO_IOMEM is not set, HAS_IOMEM and GENERIC_IO are always set.
>
> UML selects GENERIC_IO, but not HAS_IOMEM (it sets NO_IOMEM).

Ah you're right.

OK sent a new version!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-19 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16  8:06 [PATCH] gpio: Fix OF build problem on UM Linus Walleij
2016-08-17  9:03 ` Geert Uytterhoeven
2016-08-19  8:53   ` Linus Walleij
2016-08-19  9:16     ` Geert Uytterhoeven
2016-08-19 12:53       ` Linus Walleij

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.