linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Arnd Bergmann <arnd@arndb.de>, Rob Herring <robh@kernel.org>
Cc: Lee Jones <lee.jones@linaro.org>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/2] asm-generic/io.h: provide default ioremap/iounmap for !HAS_IOMEM
Date: Tue, 29 Mar 2016 21:50:15 +0200	[thread overview]
Message-ID: <56FADC77.1060703@nod.at> (raw)
In-Reply-To: <3074778.3TElYrXjM1@wuerfel>

Am 29.03.2016 um 21:37 schrieb Arnd Bergmann:
> On Tuesday 29 March 2016 13:23:00 Rob Herring wrote:
>> Drivers shouldn't have to care about HAS_IOMEM to compile and having to
>> causes a Kconfig mess:
>>
>> warning: (MEDIA_SUBDRV_AUTOSELECT && VIDEO_CX231XX && INV_MPU6050_I2C) selects I2C_MUX which has unmet direct dependencies (I2C && HAS_IOMEM)
>> warning: (ST_IRQCHIP && STMMAC_PLATFORM && DWMAC_IPQ806X && DWMAC_LPC18XX && DWMAC_ROCKCHIP && DWMAC_SOCFPGA && DWMAC_STI && TI_CPSW && PINCTRL_ROCKCHIP && PINCTRL_DOVE && POWER_RESET_KEYSTONE && S3C2410_WATCHDOG && VIDEO_OMAP3 && VIDEO_S5P_FIMC && USB_XHCI_MTK && RTC_DRV_AT91SAM9 && LPC18XX_DMAMUX && VIDEO_OMAP4 && HWSPINLOCK_QCOM && ATMEL_ST && QCOM_GSBI && PHY_HI6220_USB) selects MFD_SYSCON which has unmet direct dependencies (HAS_IOMEM)
>>
>> Reuse the !MMU variants for !HAS_IOMEM as they are sufficient for our
>> needs. This fixes build errors for UM allyesconfig:
>>
>> drivers/mfd/syscon.c:89:2: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration]
>>      iounmap(base);
>>
>> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: linux-arch@vger.kernel.org
>> Signed-off-by: Rob Herring <robh@kernel.org>
> 
> (adding Richard and the UML list to cc)

For the above error I've sent already a fix:
https://lkml.org/lkml/2016/3/25/321

> I actually prototyped a patch that did the opposite: remove the readl/writel/...
> definitions when HAS_IOMEM is unset. I didn't get far enough to submit it,
> but see below for what I did.
> 
> I think it makes sense to do either one or the other.
> 
> 	Arnd
> 
> diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
> index a043107..f6dc17a 100644
> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig
> @@ -8,6 +8,7 @@ source "drivers/tty/Kconfig"
>  
>  config DEVMEM
>  	bool "/dev/mem virtual device support"
> +	depends on HAS_IOMEM

Hmm, this means no /dev/mem device for UML? (And some s390 variants).
Not sure if this a good idea.
But I like it more than having ioremap/iounmap stubs for !HAS_IOMEM. :)

Thanks,
//richard

  reply	other threads:[~2016-03-29 19:50 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 [this message]
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: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: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
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=56FADC77.1060703@nod.at \
    --to=richard@nod.at \
    --cc=arnd@arndb.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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).