From: Johannes Berg <johannes@sipsolutions.net>
To: Julian Vetter <jvetter@kalrayinc.com>,
Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Guo Ren <guoren@kernel.org>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
Andrew Morton <akpm@linux-foundation.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Richard Henderson <richard.henderson@linaro.org>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matt Turner <mattst88@gmail.com>,
"James E . J . Bottomley" <James.Bottomley@hansenpartnership.com>,
Helge Deller <deller@gmx.de>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org,
loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org,
linux-alpha@vger.kernel.org, linux-parisc@vger.kernel.org,
linux-sh@vger.kernel.org, linux-um@lists.infradead.org,
linux-arch@vger.kernel.org,
Yann Sionneau <ysionneau@kalrayinc.com>
Subject: Re: [PATCH v7 09/10] um: Add dummy implementation for IO memcpy/memset
Date: Mon, 07 Oct 2024 10:06:15 +0200 [thread overview]
Message-ID: <529f8d49b048af53b6b7e82197fe487b687241b3.camel@sipsolutions.net> (raw)
In-Reply-To: <54985915-be13-46ee-ad42-7dd5d9d245ac@kalrayinc.com>
On Mon, 2024-10-07 at 09:49 +0200, Julian Vetter wrote:
>
> > > The um arch is the only architecture that sets the config 'NO_IOMEM',
(you did note this, for the comment below)
> No, I think you're understanding the series correctly. It doesn't work.
> I will revert this.
OK.
> > You're adding these inlines unconditionally, so if this included
> > logic_io.h, you should get symbol conflicts?
> >
> > Also not sure these functions should/need to do anything at all, there's
> > no IO memory on ARCH=um in case of not having logic_io.h. Maybe even
> > BUG_ON() or something? It can't be reachable (under correct drivers)
> > since ioremap() always returns NULL (without logic_iomem).
> Thanks. You're right. I added this patch because there was a build robot
> on some mailinglist building a random config with 'ARCH=um' and with
> some MTD drivers that actually use memcpy_fromio or memcpy_toio. These
> drivers are not guarded by a 'depends on HAS_IOMEM'. I thought I could
> simply fix it by adding stub functions to the um arch. Because I saw
> there are A LOT of drivers that use IO functions without being guarded
> by 'depends on HAS_IOMEM'. Not sure though, how to handle this case.
Right, well, as you noted above ARCH=um is the only architecture that
has NO_IOMEM, so I suppose drivers are just broken. But e.g.
kernel/iomem.c is also only ever built if you have HAS_IOMEM, so devm_*
functions related to this are not available.
So I don't know. On the one hand, it feels correct to have NO_IOMEM and
HAS_IOMEM, on the other hand that's a bit of a fight against windmills?
What happens now though? Seems it should _already_ not build with
ARCH=um and memcpy_*io() being used? No, I guess it picked up the asm-
generic version?
Hm. I'm almost thinking we should let such drivers not build, and then
see that they add appropriate HAS_IOMEM dependencies, but ... windmills?
johannes
next prev parent reply other threads:[~2024-10-07 8:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 13:23 [PATCH v7 00/10] Consolidate IO memcpy functions Julian Vetter
2024-09-30 13:23 ` [PATCH v7 01/10] Consolidate IO memcpy/memset into iomap_copy.c Julian Vetter
2024-10-03 4:23 ` kernel test robot
2024-10-03 16:46 ` Richard Henderson
2024-10-06 18:50 ` David Laight
2024-09-30 13:23 ` [PATCH v7 02/10] arm64: Use generic IO memcpy/memset Julian Vetter
2024-09-30 13:23 ` [PATCH v7 03/10] csky: " Julian Vetter
2024-09-30 13:23 ` [PATCH v7 04/10] loongarch: " Julian Vetter
2024-09-30 13:23 ` [PATCH v7 05/10] m68k: Align prototypes of " Julian Vetter
2024-09-30 17:46 ` Geert Uytterhoeven
2024-09-30 13:23 ` [PATCH v7 06/10] alpha: " Julian Vetter
2024-10-03 14:46 ` Richard Henderson
2024-09-30 13:23 ` [PATCH v7 07/10] parisc: " Julian Vetter
2024-10-03 14:49 ` Richard Henderson
2024-09-30 13:23 ` [PATCH v7 08/10] sh: " Julian Vetter
2024-09-30 17:52 ` Geert Uytterhoeven
2024-09-30 13:23 ` [PATCH v7 09/10] um: Add dummy implementation for " Julian Vetter
2024-10-01 12:53 ` Johannes Berg
2024-10-07 7:49 ` Julian Vetter
2024-10-07 8:06 ` Johannes Berg [this message]
2024-09-30 13:23 ` [PATCH v7 10/10] arm: Align prototype of IO memset Julian Vetter
2024-09-30 17:50 ` Geert Uytterhoeven
2024-10-01 12:46 ` [PATCH v7 00/10] Consolidate IO memcpy functions Niklas Schnelle
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=529f8d49b048af53b6b7e82197fe487b687241b3.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=James.Bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=dalias@libc.org \
--cc=deller@gmx.de \
--cc=geert@linux-m68k.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=guoren@kernel.org \
--cc=ink@jurassic.park.msu.ru \
--cc=jvetter@kalrayinc.com \
--cc=kernel@xen0n.name \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=loongarch@lists.linux.dev \
--cc=mattst88@gmail.com \
--cc=richard.henderson@linaro.org \
--cc=richard@nod.at \
--cc=will@kernel.org \
--cc=ysato@users.sourceforge.jp \
--cc=ysionneau@kalrayinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®