Skip to content

Commit 5808c53

Browse files
robclarkandersson
authored andcommitted
soc: qcom: smd-rpm: Use GFP_ATOMIC in write path
Preparing for better lockdep annotations for things that happen in runpm suspend/resume path vs shrinker/reclaim in the following patches, we need to avoid allocations that can trigger reclaim in the icc_set_bw() path. In the RPMh case, rpmh_write_batch() already uses GFP_ATOMIC, so it should be reasonable to use in the smd-rpm case as well. Alternatively, 256bytes is small enough for a function that isn't called recursively to allocate on-stack. Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c78ad85 commit 5808c53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/qcom/smd-rpm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
113113
if (WARN_ON(size >= 256))
114114
return -EINVAL;
115115

116-
pkt = kmalloc(size, GFP_KERNEL);
116+
pkt = kmalloc(size, GFP_ATOMIC);
117117
if (!pkt)
118118
return -ENOMEM;
119119

0 commit comments

Comments
 (0)