From: Greg Kroah-Hartman Date: Tue, 26 Mar 2013 20:36:21 +0000 (-0700) Subject: 3.8-stable patches X-Git-Tag: v3.0.71~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46509c07f7f867fddfc6ce850b8de0cbb7414c06;p=thirdparty%2Fkernel%2Fstable-queue.git 3.8-stable patches added patches: arm-dma-mapping-add-missing-gfp_dma-flag-for-atomic-buffer-allocation.patch --- diff --git a/queue-3.8/arm-dma-mapping-add-missing-gfp_dma-flag-for-atomic-buffer-allocation.patch b/queue-3.8/arm-dma-mapping-add-missing-gfp_dma-flag-for-atomic-buffer-allocation.patch new file mode 100644 index 00000000000..65d55960734 --- /dev/null +++ b/queue-3.8/arm-dma-mapping-add-missing-gfp_dma-flag-for-atomic-buffer-allocation.patch @@ -0,0 +1,42 @@ +From 9d1400cf79afb49584b4873eb22cd5130cb341db Mon Sep 17 00:00:00 2001 +From: Marek Szyprowski +Date: Tue, 26 Feb 2013 07:46:24 +0100 +Subject: ARM: DMA-mapping: add missing GFP_DMA flag for atomic buffer allocation + +From: Marek Szyprowski + +commit 9d1400cf79afb49584b4873eb22cd5130cb341db upstream. + +Atomic pool should always be allocated from DMA zone if such zone is +available in the system to avoid issues caused by limited dma mask of +any of the devices used for making an atomic allocation. + +Reported-by: Krzysztof Halasa +Signed-off-by: Marek Szyprowski +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mm/dma-mapping.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/arch/arm/mm/dma-mapping.c ++++ b/arch/arm/mm/dma-mapping.c +@@ -330,6 +330,7 @@ static int __init atomic_pool_init(void) + { + struct dma_pool *pool = &atomic_pool; + pgprot_t prot = pgprot_dmacoherent(pgprot_kernel); ++ gfp_t gfp = GFP_KERNEL | GFP_DMA; + unsigned long nr_pages = pool->size >> PAGE_SHIFT; + unsigned long *bitmap; + struct page *page; +@@ -348,8 +349,8 @@ static int __init atomic_pool_init(void) + if (IS_ENABLED(CONFIG_CMA)) + ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page); + else +- ptr = __alloc_remap_buffer(NULL, pool->size, GFP_KERNEL, prot, +- &page, NULL); ++ ptr = __alloc_remap_buffer(NULL, pool->size, gfp, prot, &page, ++ NULL); + if (ptr) { + int i; + diff --git a/queue-3.8/series b/queue-3.8/series index 9a8129107cf..17e0e0a33aa 100644 --- a/queue-3.8/series +++ b/queue-3.8/series @@ -94,3 +94,4 @@ udf-fix-bitmap-overflow-on-large-filesystems-with-small-block-size.patch usb-garmin_gps-fix-memory-leak-on-disconnect.patch usb-io_ti-fix-get_icount-for-two-port-adapters.patch usb-musb-da8xx-fix-build-breakage-due-to-typo.patch +arm-dma-mapping-add-missing-gfp_dma-flag-for-atomic-buffer-allocation.patch