linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Walls <awalls@md.metrocast.net>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "Luis R. Rodriguez" <mcgrof@suse.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>,
	"Mike Marciniszyn" <mike.marciniszyn@intel.com>,
	"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 development list" <linux-fbdev@vger.kernel.org>,
	linux-media@vger.kernel.org, "X86 ML" <x86@kernel.org>
Subject: Re: ioremap_uc() followed by set_memory_wc() - burrying MTRR
Date: Wed, 15 Apr 2015 21:01:23 -0400	[thread overview]
Message-ID: <1429146083.1899.94.camel@palomino.walls.org> (raw)
In-Reply-To: <CALCETrWRjGYqcYPNizrbiVFwFHhrLf=8NTTCLVZh7Q6MgAWj=Q@mail.gmail.com>

On Wed, 2015-04-15 at 17:58 -0700, Andy Lutomirski wrote:
> On Wed, Apr 15, 2015 at 4:59 PM, Andy Walls <awalls@md.metrocast.net> wrote:
> > On Wed, 2015-04-15 at 16:42 -0700, Andy Lutomirski wrote:
> >> On Wed, Apr 15, 2015 at 3:38 PM, Andy Walls <awalls@md.metrocast.net> wrote:
> >
> >> >
> >>
> >> IMO the right solution would be to avoid ioremapping the whole bar at
> >> startup.  Instead ioremap pieces once the driver learns what they are.
> >> This wouldn't have any of these problems -- you'd ioremap() register
> >> regions and you'd ioremap_wc() the framebuffer once you find it.  If
> >> there are regions of unknown purpose, just don't map them all.
> >>
> >> Would this be feasible?
> >
> > Feasible? Maybe.
> >
> > Worth the time and effort for end-of-life, convential PCI hardware so I
> > can have an optimally performing X display on a Standard Def Analog TV
> > screen?   Nope. I don't have that level of nostalgia.
> >
> 
> The point is actually to let us unexport or delete mtrr_add.

Understood.


>   We can
> either severely regress performance on ivtv on PAT-capable hardware if
> we naively switch it to arch_phys_wc_add or we can do something else.
> The something else remains to be determined.

Maybe ioremap the decoder register area as UC, and ioremap the rest of
the decoder region to WC. (Does that suck up too many PAT resources?)
Then add PCI reads following any sort of singleton PCI writes in the WC
region.  I assume PCI rules about write postings before reads still
apply when WC is set.

> >
> > We sort of know where some things are in the MMIO space due to
> > experimentation and past efforts examining the firmware binary.
> >
> > Documentation/video4linux/cx2341x/fw-*.txt documents some things.  The
> > driver code actually codifies a little bit more knowledge.
> >
> > The driver code for doing transfers between host and card is complex and
> > fragile with some streams that use DMA, other streams that use PIO,
> > digging VBI data straight out of card memory, and scatter-gather being
> > broken on newer firmwares.  Playing around with ioremapping will be hard
> > to get right and likely cause something in the code to break for the
> > primary use case of the ivtv supported cards.
> 
> Ick.

Yeah.

> If the only thing that really wants WC is the esoteric framebuffer
> thing,

That appears to be it.

>  could we just switch to arch_phys_wc_add and assume that no one
> will care about the regression on new CPUs with ivtv cards?

That's on the table in my mind.  Not sure if it is the friendliest thing
to do to users.  Quite honestly though, modern graphics cards have much
better ouput resolution and performance.  Anyone with a modern system
really should be using one.  (i.e. MythTV gave up on support for PVR-350
output for video playback years ago in May 2010.)


BTW, my 2005 system with multiple conventional PCI slots in it shows a
'pat' flag in /proc/cpuinfo.  (AMD Athlon(tm) 64 X2 Dual Core Processor
4200+)  I didn't know it was considered "new". :)

Regards,
Andy



  reply	other threads:[~2015-04-16  1:55 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 [this message]
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

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=1429146083.1899.94.camel@palomino.walls.org \
    --to=awalls@md.metrocast.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=jgross@suse.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mcgrof@suse.com \
    --cc=mchehab@osg.samsung.com \
    --cc=mgorman@suse.de \
    --cc=mike.marciniszyn@intel.com \
    --cc=mingo@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 \
    --cc=x86@kernel.org \
    /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).