public inbox for linux-rdma@vger.kernel.org
 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 22:15 ` Luis R. Rodriguez
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Andy Lutomirski @ 2015-04-15 20:42 UTC (permalink / raw)
  To: Luis R. Rodriguez, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Toshi Kani, H. Peter Anvin, Ingo Molnar,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	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ä

On Mon, Apr 13, 2015 at 10:49 AM, Luis R. Rodriguez <mcgrof-IBi9RG/b67k@public.gmane.org> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-15 20:42 ioremap_uc() followed by set_memory_wc() - burrying MTRR Andy Lutomirski
2015-04-15 22:15 ` Luis R. Rodriguez
2015-04-15 22:50 ` Andy Walls
     [not found]   ` <1429138212.1899.34.camel-xioobY1GIEhKttHedORAlB2eb7JE58TQ@public.gmane.org>
2015-04-15 23:52     ` Andy Lutomirski
2015-04-16  0:33       ` Andy Walls
     [not found] ` <CALCETrV0B7rp08-VYjp5=1CWJp7=xTUTBYo3uGxX317RxAQT+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-15 20:56   ` H. Peter Anvin
2015-04-21 22:46   ` Luis R. Rodriguez
2015-04-21 22:57     ` Jason Gunthorpe
     [not found]       ` <20150421225732.GA17356-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-04-21 23:39         ` Luis R. Rodriguez
     [not found]           ` <20150421233907.GA5622-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
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
     [not found]                 ` <20150422152328.GB5622-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2015-04-22 16:17                   ` Jason Gunthorpe
2015-04-22 16:51                     ` Luis R. Rodriguez
     [not found]                     ` <20150422161755.GA19500-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-04-22 18:53                       ` Doug Ledford
     [not found]                         ` <1429728791.121496.10.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
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