mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 17:14:14 +08:00
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 <robdclark@chromium.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230320144356.803762-21-robdclark@gmail.com
This commit is contained in:
parent
c78ad8597e
commit
5808c532ca
@ -113,7 +113,7 @@ int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
|
||||
if (WARN_ON(size >= 256))
|
||||
return -EINVAL;
|
||||
|
||||
pkt = kmalloc(size, GFP_KERNEL);
|
||||
pkt = kmalloc(size, GFP_ATOMIC);
|
||||
if (!pkt)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user