From 5467ca32a6f301465d43272bee7c5a6fab5e0440 Mon Sep 17 00:00:00 2001
From: Ghanim Fodi <gfodi@codeaurora.org>
Date: Tue, 1 Nov 2016 00:09:10 +0200
Subject: [PATCH] msm: ipa: use GFP_ATOMIC for DMA memory allocation during SSR
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.
Bug: 36779136
CRs-fixed: 1077811
Change-Id: Ie06b85d1f9d0a230c3d3832b6f0bbcdefc520c1e
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
Signed-off-by: Siqi Lin <siqilin@google.com>
---
drivers/platform/msm/ipa/ipa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/msm/ipa/ipa.c b/drivers/platform/msm/ipa/ipa.c
index 1985b35d779d..f7889e672bd1 100644
--- a/drivers/platform/msm/ipa/ipa.c
+++ b/drivers/platform/msm/ipa/ipa.c
@@ -1431,7 +1431,7 @@ static int ipa_q6_clean_q6_tables(void)
u32 *entry;
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 %d\n", mem.size);
return -ENOMEM;
--
GitLab