From: Hugo Lefeuvre <hle@owl.eu.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-arch <linux-arch@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/4] iomap: fix multiple consistency issues, interface cleanup
Date: Mon, 18 Feb 2019 21:30:07 +0100 [thread overview]
Message-ID: <20190218203007.GB18457@behemoth.owl.eu.com.local> (raw)
In-Reply-To: <CAK8P3a3de3ti6B3A0Mgy_eVv8SmNyCLx7AvwYRK2k8rxtBG-3g@mail.gmail.com>
Hi,
> Nice cleanup! Applied to my asm-generic tree now.
Thanks!
> I notice that you did not add a 'volatile' qualifier in addition to 'const'.
> Is that something you considered doing? I think the traditional
> readl/writel style accessors have them partly for historic reasons,
> and partly to simply the trivial implementation that is based on
> a volatile pointer dereference. Neither is needed here, and I don't
> think we have any drivers that pass volatile pointers into ioread()/iowrite()
> (which would cause a warning), so we can probably leave it at that,
> but it's still a bit inconsistent.
Right, I intentionally omitted the volatile qualifier here.
Adding it to the definitions from asm-generic/iomap.h would require to
also update lib/iomap.c and arch/ implementations. This should, imo, only
be done if really necessary.
From what I've seen, almost all ioread() implementations simply redirect
to readl style accessors. I could not find one implementation that does
something with the addr argument which requires the volatile qualifier.
Also, I'm not even sure to understand why we need the volatile qualifier
in the ioread() definitions from asm-generic/io.h...
Drivers wishing to pass volatile pointers to ioread() should probably use
a more low level api.
regards,
Hugo
--
Hugo Lefeuvre (hle) | www.owl.eu.com
RSA4096_ 360B 03B3 BF27 4F4D 7A3F D5E8 14AA 1EB8 A247 3DFD
ed25519_ 37B2 6D38 0B25 B8A2 6B9F 3A65 A36F 5357 5F2D DC4C
WARNING: multiple messages have this Message-ID (diff)
From: Hugo Lefeuvre <hle@owl.eu.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-arch <linux-arch@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/4] iomap: fix multiple consistency issues, interface cleanup
Date: Mon, 18 Feb 2019 21:30:07 +0100 [thread overview]
Message-ID: <20190218203007.GB18457@behemoth.owl.eu.com.local> (raw)
Message-ID: <20190218203007.Dmdeu26pIPD4VCGNniDDPV2LCwXjmmdq-tT6aMXnMr8@z> (raw)
In-Reply-To: <CAK8P3a3de3ti6B3A0Mgy_eVv8SmNyCLx7AvwYRK2k8rxtBG-3g@mail.gmail.com>
Hi,
> Nice cleanup! Applied to my asm-generic tree now.
Thanks!
> I notice that you did not add a 'volatile' qualifier in addition to 'const'.
> Is that something you considered doing? I think the traditional
> readl/writel style accessors have them partly for historic reasons,
> and partly to simply the trivial implementation that is based on
> a volatile pointer dereference. Neither is needed here, and I don't
> think we have any drivers that pass volatile pointers into ioread()/iowrite()
> (which would cause a warning), so we can probably leave it at that,
> but it's still a bit inconsistent.
Right, I intentionally omitted the volatile qualifier here.
Adding it to the definitions from asm-generic/iomap.h would require to
also update lib/iomap.c and arch/ implementations. This should, imo, only
be done if really necessary.
next prev parent reply other threads:[~2019-02-18 20:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-18 10:53 [PATCH 0/4] iomap: fix multiple consistency issues, interface cleanup Hugo Lefeuvre
2019-02-18 10:53 ` Hugo Lefeuvre
2019-02-18 10:53 ` [PATCH 1/4] iomap: add missing function args identifier names Hugo Lefeuvre
2019-02-18 10:53 ` Hugo Lefeuvre
2019-02-18 10:54 ` [PATCH 2/4] iomap: add missing const to ioread*/iowrite addr arg Hugo Lefeuvre
2019-02-18 10:54 ` Hugo Lefeuvre
2019-02-18 10:54 ` [PATCH 3/4] io: change io*_rep definitions to take ulong count Hugo Lefeuvre
2019-02-18 10:54 ` Hugo Lefeuvre
2019-02-18 10:54 ` [PATCH 4/4] lib/iomap: add missing const to mmio_ins* addr arg Hugo Lefeuvre
2019-02-18 10:54 ` Hugo Lefeuvre
2019-02-18 14:11 ` [PATCH 0/4] iomap: fix multiple consistency issues, interface cleanup Arnd Bergmann
2019-02-18 14:11 ` Arnd Bergmann
2019-02-18 20:30 ` Hugo Lefeuvre [this message]
2019-02-18 20:30 ` Hugo Lefeuvre
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=20190218203007.GB18457@behemoth.owl.eu.com.local \
--to=hle@owl.eu.com \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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