From: Xudong Hao <xudong.hao@intel.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, avi@redhat.com, alex.williamson@redhat.com,
ddutile@redhat.com, myron.stowe@redhat.com,
xiantao.zhang@intel.com, xudong.hao@intel.com
Subject: [PATCH 3/4] Enable OBFF before device is used by driver
Date: Fri, 8 Jun 2012 16:01:31 +0800 [thread overview]
Message-ID: <1339142492-13625-4-git-send-email-xudong.hao@intel.com> (raw)
In-Reply-To: <1339142492-13625-1-git-send-email-xudong.hao@intel.com>
Enable OBFF(optimized buffer flush/fill) in pci_enable_device() function, make
sure this feature is enabled before device is used by driver.
Signed-off-by: Xudong Hao <xudong.hao@intel.com>
---
drivers/pci/pci.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 5e5e3ad..35127c1 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1144,11 +1144,20 @@ static void pci_enable_dev_caps(struct pci_dev *dev)
* tolerance for snooped & unsnooped memory transactions.
*/
pci_enable_ltr(dev);
+
+ /*
+ * OBFF (optimized buffer flush/fill), where supported,
+ * can help improve energy efficiency by giving devices
+ * information about when interrupts and other activity
+ * will have a reduced power impact.
+ */
+ pci_enable_obff(dev, PCI_EXP_OBFF_SIGNAL_L0);
}
static void pci_disable_dev_caps(struct pci_dev *dev)
{
pci_disable_ltr(dev);
+ pci_disable_obff(dev);
}
static int do_pci_enable_device(struct pci_dev *dev, int bars)
--
1.5.5
next prev parent reply other threads:[~2012-06-08 8:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 8:01 [PATCH 0/4] PCI: Enable LTR/OBFF before device is used by driver Xudong Hao
2012-06-08 8:01 ` [PATCH 1/4] Add pci_obff_supported() function Xudong Hao
2012-06-08 8:01 ` [PATCH 2/4] Enable LTR before device is used by driver Xudong Hao
2012-06-08 8:01 ` Xudong Hao [this message]
2012-06-08 8:01 ` [PATCH 4/4] PCI: save/restore max Latency Value for device LTR Xudong Hao
2012-06-12 17:07 ` Bjorn Helgaas
2012-06-08 17:31 ` [PATCH 0/4] PCI: Enable LTR/OBFF before device is used by driver Bjorn Helgaas
2012-06-08 18:02 ` Myron Stowe
2012-06-08 18:10 ` Don Dutile
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=1339142492-13625-4-git-send-email-xudong.hao@intel.com \
--to=xudong.hao@intel.com \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=bhelgaas@google.com \
--cc=ddutile@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=myron.stowe@redhat.com \
--cc=xiantao.zhang@intel.com \
/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).