linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Enhancing semantics with memremap() - aliasing with memremap()
@ 2016-05-24 23:36 Luis R. Rodriguez
  2016-05-31 16:58 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Luis R. Rodriguez @ 2016-05-24 23:36 UTC (permalink / raw)
  To: Dan Williams, Toshi Kani
  Cc: Paul McKenney, Will Deacon, Christoph Hellwig, X86 ML,
	linux-kernel@vger.kernel.org, linux-arch, Julia Lawall,
	Benjamin Herrenschmidt, Borislav Petkov

Dan, Toshi, Christoph,

I recall a while ago while memremap() was being introduced we
discussed making stronger semantics for memremap() a desirable future
goal [0], along with removal cleanups of ioremap_cache(). This was
when only 2 types were being considered, WB and WT. I see we now have
WC as well for the memremap() family.

Among one of the semantic topics, on the x86 side of things we seem to
have at least concluded we want to at the very least start by
completely discouraging and warning alias uses for different
conflicting types. A recent patch by Toshi helps to find these at run
time, however it may be possible to do this proactively semantically
with Coccinelle as well, but we first need an example test driver with
all known invalid uses cases to write up some grammar rules for the
hunt.

A much much longer term goal would be properly identify only those
valid uses for aliasing, and have a special API for them. This will
take time for the above reaons. During the memremap() review we seemed
to have agreed that making stronger semantics for memremap() was also
desirable, more aimed towards addressing this as a future goal.

Is it a good time for that now? I would hope identifying proper
aliasing uses for memremap() might be a bit easier now than for
ioremap() given its not used as widely. It may be an easier target to
also write some grammar rules for it as well.

[0] http://lkml.kernel.org/r/CAPcyv4g0-CcFRCWPBdKB7h0zZEO5qzT-N9YLYJw9sb=_HYnXiA@mail.gmail.com>

  Luis

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

end of thread, other threads:[~2016-06-01  0:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-24 23:36 Enhancing semantics with memremap() - aliasing with memremap() Luis R. Rodriguez
2016-05-31 16:58 ` Christoph Hellwig
2016-05-31 17:25   ` Luis R. Rodriguez
2016-05-31 17:25     ` Luis R. Rodriguez
2016-05-31 17:27     ` Luis R. Rodriguez
2016-05-31 23:31       ` Kani, Toshimitsu

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).