[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241008103306.44123824@xps-13>
Date: Tue, 8 Oct 2024 10:33:06 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Julian Vetter <jvetter@...rayinc.com>
Cc: Arnd Bergmann <arnd@...db.de>, Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Guo Ren <guoren@...nel.org>, Huacai Chen <chenhuacai@...nel.org>, WANG
Xuerui <kernel@...0n.name>, Andrew Morton <akpm@...ux-foundation.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>, Richard Henderson
<richard.henderson@...aro.org>, Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>, "James E . J . Bottomley"
<James.Bottomley@...senpartnership.com>, Helge Deller <deller@....de>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>, Rich Felker <dalias@...c.org>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>, Richard
Weinberger <richard@....at>, Anton Ivanov
<anton.ivanov@...bridgegreys.com>, Johannes Berg
<johannes@...solutions.net>, Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>, Christophe Leroy
<christophe.leroy@...roup.eu>, Naveen N Rao <naveen@...nel.org>, Madhavan
Srinivasan <maddy@...ux.ibm.com>, Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>, Alexander Gordeev
<agordeev@...ux.ibm.com>, Christian Borntraeger
<borntraeger@...ux.ibm.com>, Sven Schnelle <svens@...ux.ibm.com>, Niklas
Schnelle <schnelle@...ux.ibm.com>, Manivannan Sadhasivam
<manivannan.sadhasivam@...aro.org>, Vignesh Raghavendra <vigneshr@...com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-csky@...r.kernel.org, loongarch@...ts.linux.dev,
linux-m68k@...ts.linux-m68k.org, linux-alpha@...r.kernel.org,
linux-parisc@...r.kernel.org, linux-sh@...r.kernel.org,
linux-um@...ts.infradead.org, linux-arch@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
mhi@...ts.linux.dev, linux-arm-msm@...r.kernel.org,
linux-mtd@...ts.infradead.org, linux-sound@...r.kernel.org, Yann Sionneau
<ysionneau@...rayinc.com>
Subject: Re: [PATCH v8 13/14] mtd: Add HAS_IOMEM || INDIRECT_IOMEM
dependency
Hi Julian,
jvetter@...rayinc.com wrote on Tue, 8 Oct 2024 09:50:21 +0200:
> The UM arch doesn't have HAS_IOMEM=y, so the build fails because the
> functions memcpy_fromio and memcpy_toio are not defined anymore. These
> functions are only build for targets which have HAS_IOMEM=y or
> INDIRECT_IOMEM=y. So, depend on either of the two.
There are many mtd drivers using memcpy_fromio and memcpy_toio, I'm not
sure I get why only this subset of drivers would be impacted?
Also, from a general standpoint, I don't see with a good eye the
proliferation of the use of || INDIRECT_IOMEM just for the um
architecture:
$ git grep HAS_IOMEM | wc -l
611
$ git grep INDIRECT_IOMEM | wc -l
15
I believe the Kconfig symbol should adapt to reflect the fact that IO
operations are fine, regardless of their type ("direct" or "indirect")
rather than move the load on the individual drivers.
> Reviewed-by: Yann Sionneau <ysionneau@...rayinc.com>
> Signed-off-by: Julian Vetter <jvetter@...rayinc.com>
> ---
> Changes for v8:
> - New patch
> ---
> drivers/mtd/chips/Kconfig | 4 ++++
> drivers/mtd/lpddr/Kconfig | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
> index 19726ebd973d..78afe7ccf005 100644
> --- a/drivers/mtd/chips/Kconfig
> +++ b/drivers/mtd/chips/Kconfig
> @@ -4,6 +4,7 @@ menu "RAM/ROM/Flash chip drivers"
>
> config MTD_CFI
> tristate "Detect flash chips by Common Flash Interface (CFI) probe"
> + depends on HAS_IOMEM || INDIRECT_IOMEM
> select MTD_GEN_PROBE
> select MTD_CFI_UTIL
> help
> @@ -16,6 +17,7 @@ config MTD_CFI
>
> config MTD_JEDECPROBE
> tristate "Detect non-CFI AMD/JEDEC-compatible flash chips"
> + depends on HAS_IOMEM || INDIRECT_IOMEM
> select MTD_GEN_PROBE
> select MTD_CFI_UTIL
> help
> @@ -211,12 +213,14 @@ config MTD_CFI_UTIL
>
> config MTD_RAM
> tristate "Support for RAM chips in bus mapping"
> + depends on HAS_IOMEM || INDIRECT_IOMEM
> help
> This option enables basic support for RAM chips accessed through
> a bus mapping driver.
>
> config MTD_ROM
> tristate "Support for ROM chips in bus mapping"
> + depends on HAS_IOMEM || INDIRECT_IOMEM
> help
> This option enables basic support for ROM chips accessed through
> a bus mapping driver.
> diff --git a/drivers/mtd/lpddr/Kconfig b/drivers/mtd/lpddr/Kconfig
> index 0395aa6b68f1..f35dd8052abc 100644
> --- a/drivers/mtd/lpddr/Kconfig
> +++ b/drivers/mtd/lpddr/Kconfig
> @@ -4,6 +4,7 @@ menu "LPDDR & LPDDR2 PCM memory drivers"
>
> config MTD_LPDDR
> tristate "Support for LPDDR flash chips"
> + depends on HAS_IOMEM || INDIRECT_IOMEM
> select MTD_QINFO_PROBE
> help
> This option enables support of LPDDR (Low power double data rate)
Thanks,
Miquèl
Powered by blists - more mailing lists