OSDN Git Service

msm: ipa: use GFP_ATOMIC for DMA memory allocation during SSR
authorGhanim Fodi <gfodi@codeaurora.org>
Mon, 31 Oct 2016 22:09:10 +0000 (00:09 +0200)
committerUtkarsh Saxena <usaxena@codeaurora.org>
Mon, 13 Feb 2017 17:34:06 +0000 (23:04 +0530)
SSR logic is executed during device shutdown. During device
shutdown the Linux tasks (processes) are moving to SIGKILL
state. If a DMA allocation from the kernel happens
in a context of a process in SIGKILL state and page migration
is needed, the allocation will fail.
Use GFP_ATOMIC allocation flag during SSR. This will
utilize the atomic memory pool and will not require page
migration.

CRs-fixed: 1077811
Change-Id: Ie06b85d1f9d0a230c3d3832b6f0bbcdefc520c1e
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
drivers/platform/msm/ipa/ipa_v2/ipa.c

index 1e79fd9..fde087f 100644 (file)
@@ -1827,7 +1827,7 @@ static int ipa_q6_clean_q6_tables(void)
        u32 max_cmds = ipa_get_max_flt_rt_cmds(ipa_ctx->ipa_num_pipes);
 
        mem.base = dma_alloc_coherent(ipa_ctx->pdev, 4, &mem.phys_base,
-               GFP_KERNEL);
+               GFP_ATOMIC);
        if (!mem.base) {
                IPAERR("failed to alloc DMA buff of size 4\n");
                return -ENOMEM;