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>] [day] [month] [year] [list]
Message-Id: <1446041822-10767-1-git-send-email-konrad.wilk@oracle.com>
Date:	Wed, 28 Oct 2015 10:17:02 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	airlied@...ux.ie, linux-kernel@...r.kernel.org
Cc:	mcgrof@...not-panic.com,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: [PATCH] agp/intel-gtt: Make it use DMA API dynamically.

It is 2015 and DMA API is pretty much a MUST in the x86 world.

Make the fake AGP driver choose dynamically whether to use
the DMA API based on the GTT version instead of having
an dependency on Intel IOMMU being compiled in.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
---
 drivers/char/agp/intel-gtt.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 1341a94..f38c4d4 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -26,18 +26,6 @@
 #include "intel-agp.h"
 #include <drm/intel-gtt.h>
 
-/*
- * If we have Intel graphics, we're not going to have anything other than
- * an Intel IOMMU. So make the correct use of the PCI DMA API contingent
- * on the Intel IOMMU support (CONFIG_INTEL_IOMMU).
- * Only newer chipsets need to bother with this, of course.
- */
-#ifdef CONFIG_INTEL_IOMMU
-#define USE_PCI_DMA_API 1
-#else
-#define USE_PCI_DMA_API 0
-#endif
-
 struct intel_gtt_driver {
 	unsigned int gen : 8;
 	unsigned int is_g33 : 1;
@@ -650,7 +638,7 @@ static int intel_gtt_init(void)
 
 	intel_private.stolen_size = intel_gtt_stolen_size();
 
-	intel_private.needs_dmar = USE_PCI_DMA_API && INTEL_GTT_GEN > 2;
+	intel_private.needs_dmar = INTEL_GTT_GEN > 2;
 
 	ret = intel_gtt_setup_scratch_page();
 	if (ret != 0) {
-- 
2.1.0

--
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