forked from luck/tmp_suning_uos_patched
Merge branch 'fixes-for-3.9' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull DMA-mapping fix from Marek Szyprowski: "An important fix for all ARM architectures which use ZONE_DMA. Without it dma_alloc_* calls with GFP_ATOMIC flag might have allocated buffers outsize DMA zone." * 'fixes-for-3.9' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping: ARM: DMA-mapping: add missing GFP_DMA flag for atomic buffer allocation
This commit is contained in:
commit
c7f17deb31
|
@ -342,6 +342,7 @@ static int __init atomic_pool_init(void)
|
||||||
{
|
{
|
||||||
struct dma_pool *pool = &atomic_pool;
|
struct dma_pool *pool = &atomic_pool;
|
||||||
pgprot_t prot = pgprot_dmacoherent(pgprot_kernel);
|
pgprot_t prot = pgprot_dmacoherent(pgprot_kernel);
|
||||||
|
gfp_t gfp = GFP_KERNEL | GFP_DMA;
|
||||||
unsigned long nr_pages = pool->size >> PAGE_SHIFT;
|
unsigned long nr_pages = pool->size >> PAGE_SHIFT;
|
||||||
unsigned long *bitmap;
|
unsigned long *bitmap;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
|
@ -361,8 +362,8 @@ static int __init atomic_pool_init(void)
|
||||||
ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page,
|
ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page,
|
||||||
atomic_pool_init);
|
atomic_pool_init);
|
||||||
else
|
else
|
||||||
ptr = __alloc_remap_buffer(NULL, pool->size, GFP_KERNEL, prot,
|
ptr = __alloc_remap_buffer(NULL, pool->size, gfp, prot, &page,
|
||||||
&page, atomic_pool_init);
|
atomic_pool_init);
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user