Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1356203
| From | Toshi Kani <toshi.kani@hpe.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Overlapping ioremap() calls, set_memory_*() semantics |
| Date | 2016-03-11 22:50 +0100 |
| Message-ID | <rbD6x-43l-11@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <r8UwY-4Id-59@gated-at.bofh.it> <r91I6-1ID-23@gated-at.bofh.it> <r9iSC-5Al-13@gated-at.bofh.it> <ra630-57L-15@gated-at.bofh.it> <rbp3z-27t-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 2016-03-10 at 22:47 -0800, Andy Lutomirski wrote: > On Mon, Mar 7, 2016 at 9:03 AM, Toshi Kani <toshi.kani@hpe.com> wrote: > > Let me try to summarize... > > > > The original issue Luis brought up was that drivers written to work > > with MTRR may create a single ioremap range covering multiple cache > > attributes since MTRR can overwrite cache attribute of a certain > > range. Converting such drivers with PAT-based ioremap interfaces, i.e. > > ioremap_wc() and ioremap_nocache(), requires a separate ioremap map for > > each cache attribute, which can be challenging as it may result in > > overlapping ioremap ranges (in his term) with different cache > > attributes. > > > > So, Luis asked about 'sematics of overlapping ioremap()' calls. Hence, > > I responded that aliasing mapping itself is supported, but alias with > > different cache attribute is not. We have checks in place to detect > > such condition. Overlapping ioremap calls with a different cache > > attribute either fails or gets redirected to the existing cache > > attribute on x86. > > A little off-topic, but someone reminded me recently: most recent CPUs > have self-snoop. It's poorly documented, but on self-snooping CPUs, I > think that a lot of the aliasing issues go away. We may be able to > optimize the code quite a bit on these CPUs. Interesting. I wonder how much we can rely on this feature. Yes, by looking at Intel SDM, it is indeed poorly documented. :-( > I also wonder whether we can drop a bunch of the memtype tracking. > After all, if we have aliases of different types on a self-snooping > CPU and /dev/mem is locked down hard enough, we could maybe get away > with letting self-snoop handle all the conflicts. > > (We could also make /dev/mem always do UC if it would help.) It'd be interesting to know how it performs on an aliased map when it works correctly... Thanks, -Toshi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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