linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: ioremap_uc() followed by set_memory_wc() - burrying MTRR
@ 2015-04-15 20:42 Andy Lutomirski
  2015-04-15 20:56 ` H. Peter Anvin
                   ` (3 more replies)
  0 siblings, 4 replies; 40+ messages in thread
From: Andy Lutomirski @ 2015-04-15 20:42 UTC (permalink / raw)
  To: Luis R. Rodriguez, linux-rdma
  Cc: Toshi Kani, H. Peter Anvin, Ingo Molnar, linux-kernel,
	Hal Rosenstock, Sean Hefty, Suresh Siddha, Rickard Strandqvist,
	Mike Marciniszyn, Roland Dreier, Juergen Gross,
	Mauro Carvalho Chehab, Andy Walls, Borislav Petkov, Mel Gorman,
	Vlastimil Babka, Davidlohr Bueso, Dave Hansen,
	Jean-Christophe Plagniol-Villard, Thomas Gleixner,
	Ville Syrjälä,
	Linux Fbdev development list, linux-media, X86 ML

On Mon, Apr 13, 2015 at 10:49 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:

> c) ivtv: the driver does not have the PCI space mapped out separately, and
> in fact it actually does not do the math for the framebuffer, instead it lets
> the device's own CPU do that and assume where its at, see
> ivtvfb_get_framebuffer() and CX2341X_OSD_GET_FRAMEBUFFER, it has a get
> but not a setter. Its not clear if the firmware would make a split easy.
> We'd need ioremap_ucminus() here too and __arch_phys_wc_add().
>

IMO this should be conceptually easy to split.  Once we get the
framebuffer address, just unmap it (or don't prematurely map it) and
then ioremap the thing.

> From the beginning it seems only framebuffer devices used MTRR/WC, lately it
> seems infiniband drivers also find good use for for it for PIO TX buffers to
> blast some sort of data, in the future I would not be surprised if other
> devices found use for it.

IMO the Infiniband maintainers should fix their code.  Especially in
the server space, there aren't that many MTRRs to go around.  I wrote
arch_phys_wc_add in the first place because my server *ran out of
MTRRs*.

Hey, IB people: can you fix your drivers to use arch_phys_wc_add
(which is permitted to be a no-op) along with ioremap_wc?  Your users
will thank you.

> It may be true that the existing drivers that
> requires the above type of work are corner cases -- but I wouldn't hold my
> breath for that. The ivtv device is a good example of the worst type of
> situations and these days. So perhap __arch_phys_wc_add() and a
> ioremap_ucminus() might be something more than transient unless hardware folks
> get a good memo or already know how to just Do The Right Thing (TM).

I disagree.  We should try to NACK any new code that can't function
without MTRRs.

(Plus, ARM is growing in popularity in the server space, and ARM quite
sensibly doesn't have MTRRs.)

--Andy

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

end of thread, other threads:[~2015-04-22 20:59 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20150410171750.GA5622@wotan.suse.de>
     [not found] ` <CALCETrUG=RiG8S9Gpiqm_0CxvxurxLTNKyuyPoFNX46EAauA+g@mail.gmail.com>
     [not found]   ` <CAB=NE6XgNgu7i2OiDxFVJLWiEjbjBY17-dV7L3yi2+yzgMhEbw@mail.gmail.com>
     [not found]     ` <1428695379.6646.69.camel@misato.fc.hp.com>
     [not found]       ` <20150410210538.GB5622@wotan.suse.de>
     [not found]         ` <1428699490.21794.5.camel@misato.fc.hp.com>
     [not found]           ` <CALCETrUP688aNjckygqO=AXXrNYvLQX6F0=b5fjmsCqqZU78+Q@mail.gmail.com>
     [not found]             ` <20150411012938.GC5622@wotan.suse.de>
     [not found]               ` <CALCETrXd19C6pARde3pv-4pt-i52APtw5xs20itwROPq9VmCfg@mail.gmail.com>
2015-04-13 17:49                 ` ioremap_uc() followed by set_memory_wc() - burrying MTRR Luis R. Rodriguez
2015-04-15 22:38                   ` Andy Walls
2015-04-15 23:42                     ` Andy Lutomirski
2015-04-15 23:59                       ` Andy Walls
2015-04-16  0:58                         ` Andy Lutomirski
2015-04-16  1:01                           ` Andy Walls
2015-04-16 19:19                             ` Andy Lutomirski
2015-04-21 17:35                           ` Luis R. Rodriguez
2015-04-15 23:58                     ` Luis R. Rodriguez
2015-04-16  1:07                       ` Andy Walls
2015-04-21 22:02                         ` Luis R. Rodriguez
2015-04-21 22:08                           ` Luis R. Rodriguez
2015-04-21 22:09                             ` Andy Lutomirski
     [not found]                               ` <5536d47a.95968c0a.1d12.ffffbf85@mx.google.com>
2015-04-21 23:14                                 ` Luis R. Rodriguez
2015-04-16  4:18                       ` Hyong-Youb Kim
2015-04-16 18:54                         ` Luis R. Rodriguez
2015-04-17  8:00                           ` Hyong-Youb Kim
2015-04-15 20:42 Andy Lutomirski
2015-04-15 20:56 ` H. Peter Anvin
2015-04-15 22:15 ` Luis R. Rodriguez
2015-04-15 22:50 ` Andy Walls
2015-04-15 23:52   ` Andy Lutomirski
2015-04-16  0:33     ` Andy Walls
2015-04-21 22:46 ` Luis R. Rodriguez
2015-04-21 22:57   ` Jason Gunthorpe
2015-04-21 23:39     ` Luis R. Rodriguez
2015-04-22  5:39       ` Jason Gunthorpe
2015-04-22 15:23         ` Luis R. Rodriguez
2015-04-22 15:54           ` Luis R. Rodriguez
2015-04-22 15:59             ` Luis R. Rodriguez
2015-04-22 16:17           ` Jason Gunthorpe
2015-04-22 16:51             ` Luis R. Rodriguez
2015-04-22 18:53             ` Doug Ledford
2015-04-22 19:05               ` Luis R. Rodriguez
2015-04-22 19:10                 ` Doug Ledford
2015-04-22 19:14                   ` Luis R. Rodriguez
2015-04-22 20:46               ` Jason Gunthorpe
2015-04-22 20:58                 ` Doug Ledford
2015-04-22 16:53           ` Andy Lutomirski
2015-04-22 17:07             ` Luis R. Rodriguez

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