lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1339142492-13625-4-git-send-email-xudong.hao@intel.com>
Date:	Fri,  8 Jun 2012 16:01:31 +0800
From:	Xudong Hao <xudong.hao@...el.com>
To:	bhelgaas@...gle.com
Cc:	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	kvm@...r.kernel.org, avi@...hat.com, alex.williamson@...hat.com,
	ddutile@...hat.com, myron.stowe@...hat.com,
	xiantao.zhang@...el.com, xudong.hao@...el.com
Subject: [PATCH 3/4] Enable OBFF before device is used by driver

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@...el.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ