From: Shaohua Li <shaohua.li@intel.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: lkml <linux-kernel@vger.kernel.org>,
linux-pci <linux-pci@atrey.karlin.mff.cuni.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Greg KH <gregkh@suse.de>
Subject: Re: [RFC] disable PCIE 'Enable No Snoop' bit by default
Date: Fri, 07 Sep 2007 08:51:27 +0800 [thread overview]
Message-ID: <1189126287.14845.4.camel@sli10-conroe.sh.intel.com> (raw)
In-Reply-To: <20070906115730.GE14130@parisc-linux.org>
On Thu, 2007-09-06 at 05:57 -0600, Matthew Wilcox wrote:
> On Thu, Sep 06, 2007 at 01:35:08PM +0800, Shaohua Li wrote:
> > PCIE 'Enable No Snoop' bit is set by default per PCIE spec, but OS
> > assumes PCI DMA is snooped, which is legacy PCI device does. Enabling no
> > snoop might cause potential DMA issues. This patch disables it, if a
> > driver can work with no snoop, we can provide a helper to enable it.
>
> I'm not sure your analysis is correct. Here's what my draft copy of
> the pcie 2.0 spec says:
>
> Enble No Snoop If this bit is Set, the Function is permitted to
> Set the No Snoop bit in the Requester Attributes of transactions it
> initiates that do not require hardware enforced cache coherency (see
> Section 2.2.6.5). Note that setting this bit to 1b should not cause
> a Function to Set the No Snoop attribute on all transactions that it
> initiates. Even when this bit is Set, a Function is only permitted
> to Set the No Snoop attribute on a transaction when it can guarantee
> that the address of the transaction is not stored in any cache in
> the system. This bit permitted to be hardwired to 0b if a Function
> would never Set the No Snoop attribute in transactions it initiates.
> Default value of this bit is 1b.
>
> That implies that devices are only allowed to set it when it's safe to
> do so ... and we don't need to turn it off.
Yes, I saw this in spec too. Devices don't know how OS handle DMA, so
it's possible the bit is wrongly set. My point is setting the bit can be
done by driver based. If a driver thinks it's really safe to do so, it
can set the bit.
Thanks,
Shaohua
prev parent reply other threads:[~2007-09-07 1:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-06 5:35 Shaohua Li
2007-09-06 11:57 ` Matthew Wilcox
2007-09-06 12:40 ` David Miller
2007-09-09 16:43 ` Greg KH
2007-09-11 1:29 ` Shaohua Li
2007-09-11 6:15 ` Greg KH
2007-09-11 6:27 ` Shaohua Li
2007-09-07 0:51 ` Shaohua Li [this message]
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=1189126287.14845.4.camel@sli10-conroe.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=matthew@wil.cx \
/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
all inboxes | Powered by JetHome®