diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-03-04 16:44:10 +0800 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-03-04 16:44:10 +0800 |
commit | dab2310d9d90eded48625c5382c6a60389bf8ca9 (patch) | |
tree | 9327cc815d69dec23aebf03407e3fa82b6d2fbaa /arch/x86/kernel/pci-dma.c | |
parent | a3dbeb5b45af5b6113385db89fce2a8279278e8b (diff) | |
parent | 0414855fdc4a40da05221fc6062cccbc0c30f169 (diff) |
Merge tag 'v3.14-rc5' into HEAD
Linux 3.14-rc5
Diffstat (limited to 'arch/x86/kernel/pci-dma.c')
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 872079a67e4d..f7d0672481fd 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@ -100,8 +100,10 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size, flag |= __GFP_ZERO; again: page = NULL; - if (!(flag & GFP_ATOMIC)) + /* CMA can be used only in the context which permits sleeping */ + if (flag & __GFP_WAIT) page = dma_alloc_from_contiguous(dev, count, get_order(size)); + /* fallback */ if (!page) page = alloc_pages_node(dev_to_node(dev), flag, get_order(size)); if (!page) |