* fix x86 swiotlb regression
@ 2018-04-09 9:15 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2018-04-09 9:15 UTC (permalink / raw)
To: iommu; +Cc: Dominik Brodowski, Konrad Rzeszutek Wilk, x86, linux-kernel
Hi all,
this patch fixes a regression in the x86 swiotlb conversion. This mostly
happend because swiotlb_dma_support does the wrong thing (and did so for
a long time) and we switched x86 to use it.
There are a few others users of swiotlb_dma_supported that also look
rather broken, but I'll take care of those for the next merge window.
^ permalink raw reply [flat|nested] 6+ messages in thread
* fix x86 swiotlb regression
@ 2018-04-09 9:15 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2018-04-09 9:15 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Cc: x86-DgEjT+Ai2ygdnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
Dominik Brodowski, Konrad Rzeszutek Wilk
Hi all,
this patch fixes a regression in the x86 swiotlb conversion. This mostly
happend because swiotlb_dma_support does the wrong thing (and did so for
a long time) and we switched x86 to use it.
There are a few others users of swiotlb_dma_supported that also look
rather broken, but I'll take care of those for the next merge window.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] swiotlb: use dma_direct_supported for swiotlb_ops
@ 2018-04-09 9:15 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2018-04-09 9:15 UTC (permalink / raw)
To: iommu; +Cc: Dominik Brodowski, Konrad Rzeszutek Wilk, x86, linux-kernel
swiotlb_alloc calls dma_direct_alloc, which can satisfy lower than 32-bit
dma mask requests using GFP_DMA if the architecture supports it. Various
x86 drivers rely on that, so we need to support that. At the same time
the whole kernel expects 32-bit dma mask to just work, so the other magic
in swiotlb_dma_support isn't actually needed either.
Reported-by: Dominik Brodowski <linux@dominikbrodowski.net>
Fixes: 6e4bf5867783 ("x86/dma: Use generic swiotlb_ops")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
lib/swiotlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 47aeb04c1997..32aacd0d56a8 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -1087,6 +1087,6 @@ const 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 = swiotlb_dma_supported,
+ .dma_supported = dma_direct_supported,
};
#endif /* CONFIG_DMA_DIRECT_OPS */
--
2.16.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] swiotlb: use dma_direct_supported for swiotlb_ops
@ 2018-04-09 9:15 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2018-04-09 9:15 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Cc: x86-DgEjT+Ai2ygdnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
Dominik Brodowski, Konrad Rzeszutek Wilk
swiotlb_alloc calls dma_direct_alloc, which can satisfy lower than 32-bit
dma mask requests using GFP_DMA if the architecture supports it. Various
x86 drivers rely on that, so we need to support that. At the same time
the whole kernel expects 32-bit dma mask to just work, so the other magic
in swiotlb_dma_support isn't actually needed either.
Reported-by: Dominik Brodowski <linux-X3ehHDuj6sIIGcDfoQAp7OTW4wlIGRCZ@public.gmane.org>
Fixes: 6e4bf5867783 ("x86/dma: Use generic swiotlb_ops")
Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
lib/swiotlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 47aeb04c1997..32aacd0d56a8 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -1087,6 +1087,6 @@ const 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 = swiotlb_dma_supported,
+ .dma_supported = dma_direct_supported,
};
#endif /* CONFIG_DMA_DIRECT_OPS */
--
2.16.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:x86/urgent] swiotlb: Use dma_direct_supported() for swiotlb_ops
2018-04-09 9:15 ` Christoph Hellwig
(?)
@ 2018-04-09 17:10 ` tip-bot for Christoph Hellwig
2018-04-15 15:03 ` Christoph Hellwig
-1 siblings, 1 reply; 6+ messages in thread
From: tip-bot for Christoph Hellwig @ 2018-04-09 17:10 UTC (permalink / raw)
To: linux-tip-commits
Cc: peterz, konrad.wilk, hch, linux-kernel, hpa, torvalds, tglx,
mingo, linux
Commit-ID: 66bdb1478fd1a66d5b8b81e4e28e0ed3df63ed37
Gitweb: https://git.kernel.org/tip/66bdb1478fd1a66d5b8b81e4e28e0ed3df63ed37
Author: Christoph Hellwig <hch@lst.de>
AuthorDate: Mon, 9 Apr 2018 11:15:17 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 9 Apr 2018 18:20:09 +0200
swiotlb: Use dma_direct_supported() for swiotlb_ops
swiotlb_alloc() calls dma_direct_alloc(), which can satisfy lower than 32-bit
DMA mask requests using GFP_DMA if the architecture supports it. Various
x86 drivers rely on that, so we need to support that. At the same time
the whole kernel expects a 32-bit DMA mask to just work, so the other magic
in swiotlb_dma_supported() isn't actually needed either.
Reported-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: iommu@lists.linux-foundation.org
Fixes: 6e4bf5867783 ("x86/dma: Use generic swiotlb_ops")
Link: http://lkml.kernel.org/r/20180409091517.6619-2-hch@lst.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
lib/swiotlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index c43ec2271469..c67b06261160 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -1130,6 +1130,6 @@ const 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 = swiotlb_dma_supported,
+ .dma_supported = dma_direct_supported,
};
#endif /* CONFIG_DMA_DIRECT_OPS */
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [tip:x86/urgent] swiotlb: Use dma_direct_supported() for swiotlb_ops
2018-04-09 17:10 ` [tip:x86/urgent] swiotlb: Use dma_direct_supported() " tip-bot for Christoph Hellwig
@ 2018-04-15 15:03 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2018-04-15 15:03 UTC (permalink / raw)
To: mingo, linux, hpa, torvalds, tglx, hch, linux-kernel,
konrad.wilk, peterz
Cc: linux-tip-commits
Do you plan to send this on to Linus? Would be great to have this in
for rc1..
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-04-15 15:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09 9:15 fix x86 swiotlb regression Christoph Hellwig
2018-04-09 9:15 ` Christoph Hellwig
2018-04-09 9:15 ` [PATCH] swiotlb: use dma_direct_supported for swiotlb_ops Christoph Hellwig
2018-04-09 9:15 ` Christoph Hellwig
2018-04-09 17:10 ` [tip:x86/urgent] swiotlb: Use dma_direct_supported() " tip-bot for Christoph Hellwig
2018-04-15 15:03 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.