All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@stratus.com>
To: Toshi Kani <toshi.kani@hpe.com>, "Luis R. Rodriguez" <mcgrof@suse.com>
Cc: Ingo Molnar <mingo@kernel.org>, "bp@suse.de" <bp@suse.de>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"jgross@suse.com" <jgross@suse.com>,
	"paul.gortmaker@windriver.com" <paul.gortmaker@windriver.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andy Lutomirski <luto@amacapital.net>
Subject: Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code
Date: Wed, 16 Mar 2016 11:44:38 -0400	[thread overview]
Message-ID: <56E97F66.9080701@stratus.com> (raw)
In-Reply-To: <1458002240.6393.320.camel@hpe.com>

On 03/14/2016 08:37 PM, Toshi Kani wrote:
[... snip ...]
>> Joe at Stratus also hit this issue but on a system where MTRR is enabled.
>> He sent his report only to me as he thought it was caused by the
>> ioremap_wc() changes and his driver was one that got it. In his case
>> though he modified the driver significantly, and upon inspection of that
>> code saw how it used a secondary backup PCI device for failover for a
>> framebuffer device... The changes to the driver in place are rather
>> complex though and as such it made no sense to further review unless he
>> moved his changes upstream.  It is still worth noting this issue has been
>> seeing elsehwere, but the root cause is still not known.  The error Joe
>> got is:
>>
>> x86/PAT: Xorg:37506 map pfn expected mapping type uncached-minus for [mem
>> 0x9f000000-0x9f7fffff], got write-combining
>>
>> Even though the driver is custom (and actually I even saw another
>> unrelated proprietary driver loaded) I figured its worth noting others
>> have seen this error without MTRR being disabled.
> 
> The error message looks the same.  So, this could be the same issue if WC
> is redirected to UC without disabling PAT properly on his env.  I need a
> whole dmesg output to confirm if this is the case.  Another way to hit this
> error is that the driver called remap_pfn_range() with UC to a range where
> WC map was set by ioremap_wc() already.

As mentioned in the other thread, our driver is very custom and performs
some page table parlor tricks to failover the frame buffer from one PCI
adapter to another.  I need some time to fully digest these
customizations before I can really be of much help here.  My current
theory is that we have bug when do:

  ioremap_wc( backup adapter fb )
  iounmap   ( backup adapter fb )      << I'm unclear why this occurs
  ioremap_wc( primary adapter fb )

to failover, we stop_machine and remap the framebuffer (heavily
summarized: iterate through its pages, lookup_address to get a ptep, get
its __pgprot and then rewrite the pte to the new physical address and
the old pgprot_val.  A tlb flush on the way out of stop_machine).

Since this is all out-of-tree custom work, I'm not asking for any
support.  If we're too far off the reservation to be useful to the
conversation here, no worries.  I'm just trying to help if there is an
upstream bug.

>> The second thread you referred to seems to say that if you built-in the
>> code the error does not come up. What the hell. Joe, can you try building
>> your driver built-in to see if you also see this go away? Even though I
>> don't want to support your custom hacked up driver I do want to know if
>> your issue goes away with built-in as well.
> 
> I do not have sufficient info to support this case, and do not have
> technical explanation for it, either.

Luis -- I tried last night to reproduce (built as a module) without any
luck.  Going back through my test logs, it looks like the warning is
relatively sporadic and may take a few days to hit.  Without having a
better repro case, I think my warning is caused by that dodgy page table
work mentioned above (or at least timing related).  Let me see if I can
try to provoke the warning into happening more frequently first.

Regards,

-- Joe

  parent reply	other threads:[~2016-03-16 15:44 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11  4:45 [PATCH 0/2] Refactor MTRR and PAT initializations Toshi Kani
2016-03-11  4:45 ` [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani
2016-03-11  9:12   ` Borislav Petkov
2016-03-11 16:27     ` Toshi Kani
2016-03-11 15:54       ` Borislav Petkov
2016-03-11 19:28         ` Toshi Kani
2016-03-12 11:55           ` Borislav Petkov
2016-03-14 21:37             ` Toshi Kani
2016-03-15 11:00               ` Borislav Petkov
2016-03-15 22:02                 ` Toshi Kani
2016-03-15  0:29             ` Luis R. Rodriguez
2016-03-15  3:11               ` Toshi Kani
2016-03-15  3:11               ` Toshi Kani
2016-03-15 11:01                 ` Borislav Petkov
2016-03-15 15:43                   ` Toshi Kani
2016-03-15 15:43                   ` Toshi Kani
2016-03-15 15:47                     ` Borislav Petkov
2016-03-15 15:47                     ` Borislav Petkov
2016-03-15 17:11                       ` Toshi Kani
2016-03-15 16:33                         ` Borislav Petkov
2016-03-15 16:33                         ` Borislav Petkov
2016-03-15 17:11                       ` Toshi Kani
2016-03-15 11:01                 ` Borislav Petkov
2016-03-15 21:31                 ` Luis R. Rodriguez
2016-03-15 21:31                 ` Luis R. Rodriguez
2016-03-15  0:29             ` Luis R. Rodriguez
2016-03-11  4:45 ` [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani
2016-03-11  9:01   ` Ingo Molnar
2016-03-11  9:13     ` Ingo Molnar
2016-03-11 18:34       ` Toshi Kani
2016-03-12 16:18         ` Ingo Molnar
2016-03-14 19:47           ` Toshi Kani
2016-03-14 22:50         ` Luis R. Rodriguez
2016-03-15  0:37           ` Toshi Kani
2016-03-15 15:56             ` Borislav Petkov
2016-03-16 15:44             ` Joe Lawrence [this message]
2016-03-11  9:24   ` Borislav Petkov
2016-03-11 18:57     ` Toshi Kani
2016-03-11 22:17       ` Luis R. Rodriguez
2016-03-11 23:56         ` Toshi Kani
2016-03-11 23:34           ` Luis R. Rodriguez
2016-03-12  1:16             ` Toshi Kani
2016-03-15  0:15               ` Luis R. Rodriguez
2016-03-15 23:48                 ` Toshi Kani
2016-03-15 23:29                   ` Luis R. Rodriguez
2016-03-17 21:56                     ` Toshi Kani
2016-03-18  0:06                       ` Luis R. Rodriguez
2016-03-18 21:35                         ` Toshi Kani
2016-03-29 17:14                           ` Luis R. Rodriguez
2016-03-29 21:46                             ` Toshi Kani
2016-03-29 22:12                               ` Luis R. Rodriguez
2016-03-30  0:16                                 ` Toshi Kani
2016-03-29 23:43                                   ` Luis R. Rodriguez
2016-03-30  1:07                                     ` Toshi Kani
2016-03-30  0:34                                       ` Luis R. Rodriguez
2016-04-09  2:04                       ` Luis R. Rodriguez
2016-04-11 14:30                         ` Toshi Kani

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=56E97F66.9080701@stratus.com \
    --to=joe.lawrence@stratus.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mcgrof@suse.com \
    --cc=mingo@kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=tglx@linutronix.de \
    --cc=toshi.kani@hpe.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.