linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Andy Walls <andy@silverblocksystems.net>
Cc: "Andy Lutomirski" <luto@amacapital.net>,
	"Hyong-Youb Kim" <hykim@myri.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	infinipath@intel.com, jgunthorpe@obsidianresearch.com,
	mike.marciniszyn@intel.com, "Toshi Kani" <toshi.kani@hp.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Ingo Molnar" <mingo@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Hal Rosenstock" <hal.rosenstock@gmail.com>,
	"Sean Hefty" <sean.hefty@intel.com>,
	"Suresh Siddha" <sbsiddha@gmail.com>,
	"Rickard Strandqvist" <rickard_strandqvist@spectrumdigital.se>,
	"Roland Dreier" <roland@purestorage.com>,
	"Juergen Gross" <jgross@suse.com>,
	"Mauro Carvalho Chehab" <mchehab@osg.samsung.com>,
	"Borislav Petkov" <bp@suse.de>, "Mel Gorman" <mgorman@suse.de>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Davidlohr Bueso" <dbueso@suse.de>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Jean-Christophe Plagniol-Villard" <plagnioj@jcrosoft.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ville Syrjälä" <syrjala@sci.fi>,
	linux-fbdev <linux-fbdev@vger.kernel.org>,
	linux-media@vger.kernel.org, X86ML@suse.de
Subject: Re: ioremap_uc() followed by set_memory_wc() - burrying MTRR
Date: Wed, 22 Apr 2015 01:14:56 +0200	[thread overview]
Message-ID: <20150421231456.GZ5622@wotan.suse.de> (raw)
In-Reply-To: <5536d47a.95968c0a.1d12.ffffbf85@mx.google.com>

On Tue, Apr 21, 2015 at 06:51:26PM -0400, Andy Walls wrote:
> Sorry for the top post; mobile work email account.
> 
> Luis,
> 
> You do the changes to remove MTTR and point me to your dev repo and branch.
> Also point me to the new functions/primitives I'll need.

There is nothing new actually needed for ivtv, unless of course
the ivtv driver is bounded to use a large MTRR that includes
the non-framebuffer region, if so then the ioremap_uc() would
be needed, and you can just cherry pick that patch:

https://marc.info/?l=linux-kernel&m=142964809110516&w=1

I'll bounce that patch to you as well. Might help reading this
patch too:

https://marc.info/?l=linux-kernel&m=142964809710517&w=1

If your write-combining area is not restricted by size constraints
so that it also include the non-framebuffer areas then you can just
do a simple conversion of the driver to use ioremap_wc() on the
framebuffer followed by arch_phys_wc_add().

An example driver that required changes to split this with size
contraints is atyfb, here are the changes for it:

https://marc.info/?l=linux-kernel&m=142964818810539&w=1
https://marc.info/?l=linux-kernel&m=142964813610531&w=1
https://marc.info/?l=linux-kernel&m=142964811010524&w=1
https://marc.info/?l=linux-kernel&m=142964814810532&w=1

If you are not constrained by MTRR's limitation on size then
a simple trivial driver conversion is sufficient. For example:

https://marc.info/?l=linux-kernel&m=142964744610286&w=1

I should also note that we are strivoing to also not use overlapping ioremap()
calls as we want to avoid that mess. Overlapping iroemap() calls with different
types could in theory work but its best we just design clean drivers and avoid
this.

As per Andy Lutomirski, what we'd need done on ivtv likely is
for it to ioremap() for an initial bring up of the device, then
infer the framebuffer offset, and only when that is being used
then iounmap and then ioremap() again split areas on the driver,
one with ioremap.

> I'll do the changes to add write-combining back into ivtv and ivtvfb, test
> them with my hardware and push them to my linuxtv.org git repo.

Great! The above sounded like a complexity you did not wish to
take on, but if you're up for the change, that'd be awesome!

> I know there is at least one English speaking user in India using ivtv with
> old PVR hardware, and probably folks in less developed places also using it.

If the above is too much work for that few amount of users I'd hope
we can just have them use older kernels, for the sake of sane APIs and
clean driver architecture.

  Luis

  parent reply	other threads:[~2015-04-21 23:15 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150421231456.GZ5622@wotan.suse.de \
    --to=mcgrof@suse.com \
    --cc=X86ML@suse.de \
    --cc=andy@silverblocksystems.net \
    --cc=bp@suse.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dbueso@suse.de \
    --cc=hal.rosenstock@gmail.com \
    --cc=hpa@zytor.com \
    --cc=hykim@myri.com \
    --cc=infinipath@intel.com \
    --cc=jgross@suse.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mchehab@osg.samsung.com \
    --cc=mgorman@suse.de \
    --cc=mike.marciniszyn@intel.com \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=rickard_strandqvist@spectrumdigital.se \
    --cc=roland@purestorage.com \
    --cc=sbsiddha@gmail.com \
    --cc=sean.hefty@intel.com \
    --cc=syrjala@sci.fi \
    --cc=tglx@linutronix.de \
    --cc=toshi.kani@hp.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).