Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1227073
| From | tip-bot for Junichi Nomura <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:x86/urgent] x86/pci/dma: Fix gfp flags for coherent DMA memory allocation |
| Date | 2015-09-17 16:30 +0200 |
| Message-ID | <q9Ime-6cb-35@gated-at.bofh.it> (permalink) |
| References | <q8wGv-8aY-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 590f07874e8e3c83729b919312c65aea2533c8cf
Gitweb: http://git.kernel.org/tip/590f07874e8e3c83729b919312c65aea2533c8cf
Author: Junichi Nomura <j-nomura@ce.jp.nec.com>
AuthorDate: Mon, 14 Sep 2015 07:38:36 +0000
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 17 Sep 2015 16:22:11 +0200
x86/pci/dma: Fix gfp flags for coherent DMA memory allocation
Commit 6894258eda2f reversed the order of gfp_flags adjustment in
dma_alloc_attrs() for x86 [arch/x86/kernel/pci-dma.c] As a result,
relevant flags set by dma_alloc_coherent_gfp_flags() are just
discarded and cause coherent DMA memory allocation failure on some
devices.
Fixes: 6894258eda2f ("dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}")
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Link: http://lkml.kernel.org/r/20150914073834.GA13077@xzibit.linux.bs1.fc.nec.co.jp
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/pci-dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 84b8ef8..1b55de1 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -131,8 +131,8 @@ void dma_generic_free_coherent(struct device *dev, size_t size, void *vaddr,
bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp)
{
- *gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp);
*gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
+ *gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp);
if (!*dev)
*dev = &x86_dma_fallback_dev;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] x86: Fix gfp flags for coherent DMA memory allocation Junichi Nomura <j-nomura@ce.jp.nec.com> - 2015-09-14 09:50 +0200 Re: [PATCH] x86: Fix gfp flags for coherent DMA memory allocation Junichi Nomura <j-nomura@ce.jp.nec.com> - 2015-09-15 11:40 +0200 Re: [PATCH] x86: Fix gfp flags for coherent DMA memory allocation Tony Luck <tony.luck@gmail.com> - 2015-09-16 23:50 +0200 Re: [PATCH] x86: Fix gfp flags for coherent DMA memory allocation Christoph Hellwig <hch@lst.de> - 2015-09-17 02:10 +0200 [tip:x86/urgent] x86/pci/dma: Fix gfp flags for coherent DMA memory allocation tip-bot for Junichi Nomura <tipbot@zytor.com> - 2015-09-17 16:30 +0200
csiph-web