linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] x86 swiotlb: Verify we can perform the remapping requested.
@ 2011-10-17 21:19 Eric W. Biederman
  2011-10-17 21:20 ` [PATCH 2/2] x86 amd_gart_64: " Eric W. Biederman
  2011-10-21  0:40 ` [PATCH 1/2] x86 swiotlb: " Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 10+ messages in thread
From: Eric W. Biederman @ 2011-10-17 21:19 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86; +Cc: linux-kernel


Recently I had a driver try with a peculiar 2G dma memory limit.
It failed in weird and strange ways because my bounce buffers were
being allocated above 2G where the driver could not reach, and
no error was reported when the mappings were setup.

Use the swiotlb_dma_supported to avoid silent problems like this
in the future.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/x86/kernel/pci-swiotlb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index 8f972cb..6a802fa 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -38,7 +38,7 @@ static struct dma_map_ops swiotlb_dma_ops = {
 	.unmap_sg = swiotlb_unmap_sg_attrs,
 	.map_page = swiotlb_map_page,
 	.unmap_page = swiotlb_unmap_page,
-	.dma_supported = NULL,
+	.dma_supported = swiotlb_dma_supported,
 };
 
 /*
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-11-12  9:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 21:19 [PATCH 1/2] x86 swiotlb: Verify we can perform the remapping requested Eric W. Biederman
2011-10-17 21:20 ` [PATCH 2/2] x86 amd_gart_64: " Eric W. Biederman
2011-10-24 10:07   ` Joerg Roedel
2011-11-11 15:31     ` Joerg Roedel
2011-11-11 18:59       ` Eric W. Biederman
2011-11-12  9:02         ` Joerg Roedel
2011-10-21  0:40 ` [PATCH 1/2] x86 swiotlb: " Konrad Rzeszutek Wilk
2011-10-24 15:07   ` Eric W. Biederman
2011-10-27  0:01     ` FUJITA Tomonori
2011-10-27  6:10       ` Eric W. Biederman

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