From: tip-bot for Christoph Hellwig <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, konrad.wilk@oracle.com, hch@lst.de,
linux-kernel@vger.kernel.org, hpa@zytor.com,
torvalds@linux-foundation.org, tglx@linutronix.de,
mingo@kernel.org, linux@dominikbrodowski.net
Subject: [tip:x86/urgent] swiotlb: Use dma_direct_supported() for swiotlb_ops
Date: Mon, 9 Apr 2018 10:10:30 -0700 [thread overview]
Message-ID: <tip-66bdb1478fd1a66d5b8b81e4e28e0ed3df63ed37@git.kernel.org> (raw)
In-Reply-To: <20180409091517.6619-2-hch@lst.de>
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 */
next prev parent reply other threads:[~2018-04-09 17:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 9:15 fix x86 swiotlb regression Christoph Hellwig
2018-04-09 9:15 ` [PATCH] swiotlb: use dma_direct_supported for swiotlb_ops Christoph Hellwig
2018-04-09 17:10 ` tip-bot for Christoph Hellwig [this message]
2018-04-15 15:03 ` [tip:x86/urgent] swiotlb: Use dma_direct_supported() " Christoph Hellwig
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=tip-66bdb1478fd1a66d5b8b81e4e28e0ed3df63ed37@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hch@lst.de \
--cc=hpa@zytor.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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