Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1349593

Overlapping ioremap() calls, set_memory_*() semantics

From "Luis R. Rodriguez" <mcgrof@kernel.org>
Newsgroups linux.kernel
Subject Overlapping ioremap() calls, set_memory_*() semantics
Date 2016-03-03 22:30 +0100
Message-ID <r8IYO-4Fu-21@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


At kernel summit, during the semantics of ioremap() session, Paul
mentioned we'd write something up to help get some notes out on what
we need to do and help clarify things. I've run into an issue (just a
warning) with a user on some odd system that I suspect may be the
result of a driver using overlapping ioremap() calls on conflicting
memory regions, so I'm a bit interested to see a resolution to some of
these lingering discussions now.

Although we spoke of quite a bit of things, I raised in particular the
'semantics of overlapping ioremap()' calls as one item of interest we
should address across architectures. At least on x86 it seems we would
not get an error if this is done and in fact its expected behavior;
Toshi had determined we could not enable error'ing out on overlapping
ioremap() calls given we have a few users that use it intentionally,
for instance the /dev/mem setup code. I had suggested long ago then
that one possible resolution was for us to add an API that *enables*
overlapping ioremap() calls, and only use it on select locations in
the kernel. This means we only have to convert a few users to that
call to white list such semantics, and by default we'd disable
overlapping calls. To kick things off -- is this strategy agreeable
for all other architectures?

The problem is that without this it remains up to the developer of the
driver to avoid overlapping calls, and a user may just get sporadic
errors if this happens.  As another problem case, set_memor_*() will
not fail on MMIO even though set_memor_*() is designed only for RAM.
If the above strategy on avoiding overlapping is agreeable, could the
next step, or an orthogonal step be to error out on set_memory_*() on
IO memory?

  Luis

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Overlapping ioremap() calls, set_memory_*() semantics "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-03-03 22:30 +0100
  Re: Overlapping ioremap() calls, set_memory_*() semantics Ingo Molnar <mingo@kernel.org> - 2016-03-04 10:50 +0100
    Re: Overlapping ioremap() calls, set_memory_*() semantics Toshi Kani <toshi.kani@hpe.com> - 2016-03-04 18:30 +0100
      Re: Overlapping ioremap() calls, set_memory_*() semantics "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-03-04 20:00 +0100
        Re: Overlapping ioremap() calls, set_memory_*() semantics Toshi Kani <toshi.kani@hpe.com> - 2016-03-04 21:50 +0100
        Re: Overlapping ioremap() calls, set_memory_*() semantics Ingo Molnar <mingo@kernel.org> - 2016-03-05 12:50 +0100
      Re: Overlapping ioremap() calls, set_memory_*() semantics Ingo Molnar <mingo@kernel.org> - 2016-03-05 12:50 +0100
        Re: Overlapping ioremap() calls, set_memory_*() semantics Toshi Kani <toshi.kani@hpe.com> - 2016-03-07 17:20 +0100
          Re: Overlapping ioremap() calls, set_memory_*() semantics Ingo Molnar <mingo@kernel.org> - 2016-03-08 13:20 +0100
            Re: Overlapping ioremap() calls, set_memory_*() semantics Toshi Kani <toshi.kani@hpe.com> - 2016-03-09 00:40 +0100
              Re: Overlapping ioremap() calls, set_memory_*() semantics Ingo Molnar <mingo@kernel.org> - 2016-03-09 10:20 +0100
                Re: Overlapping ioremap() calls, set_memory_*() semantics Toshi Kani <toshi.kani@hpe.com> - 2016-03-11 22:30 +0100
                Re: Overlapping ioremap() calls, set_memory_*() semantics "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-03-16 02:50 +0100
          Re: Overlapping ioremap() calls, set_memory_*() semantics Andy Lutomirski <luto@amacapital.net> - 2016-03-11 07:50 +0100
            Re: Overlapping ioremap() calls, set_memory_*() semantics Toshi Kani <toshi.kani@hpe.com> - 2016-03-11 22:50 +0100
              Re: Overlapping ioremap() calls, set_memory_*() semantics Andy Lutomirski <luto@amacapital.net> - 2016-03-13 02:10 +0100

csiph-web