public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel@ffwll.ch>,
	freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	Rob Clark <robdclark@chromium.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v2 20/23] soc: qcom: smd-rpm: Use GFP_ATOMIC in write path
Date: Mon, 20 Mar 2023 07:43:42 -0700	[thread overview]
Message-ID: <20230320144356.803762-21-robdclark@gmail.com> (raw)
In-Reply-To: <20230320144356.803762-1-robdclark@gmail.com>

From: Rob Clark <robdclark@chromium.org>

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>
---
 drivers/soc/qcom/smd-rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/smd-rpm.c b/drivers/soc/qcom/smd-rpm.c
index 7e3b6a7ea34c..478da981d9fb 100644
--- a/drivers/soc/qcom/smd-rpm.c
+++ b/drivers/soc/qcom/smd-rpm.c
@@ -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;
 
-- 
2.39.2


  parent reply	other threads:[~2023-03-20 14:46 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 14:43 [PATCH v2 00/23] drm/msm+PM+icc: Make job_run() reclaim-safe Rob Clark
2023-03-20 14:43 ` [PATCH v2 01/23] drm/msm: Pre-allocate hw_fence Rob Clark
2023-03-20 16:52   ` Christian König
2023-03-20 20:32     ` Rob Clark
2023-03-20 14:43 ` [PATCH v2 02/23] drm/msm: Move submit bo flags update from obj lock Rob Clark
2023-03-20 14:43 ` [PATCH v2 03/23] drm/msm/gem: Tidy up VMA API Rob Clark
2023-03-20 14:43 ` [PATCH v2 04/23] drm/msm: Decouple vma tracking from obj lock Rob Clark
2023-03-20 14:43 ` [PATCH v2 05/23] drm/msm/gem: Simplify vmap vs LRU tracking Rob Clark
2023-03-20 14:43 ` [PATCH v2 06/23] drm/gem: Export drm_gem_lru_move_tail_locked() Rob Clark
2023-03-20 14:43 ` [PATCH v2 07/23] drm/msm/gem: Move update_lru() Rob Clark
2023-03-20 14:43 ` [PATCH v2 08/23] drm/msm/gem: Protect pin_count/madv by LRU lock Rob Clark
2023-03-20 14:43 ` [PATCH v2 09/23] drm/msm/gem: Avoid obj lock in job_run() Rob Clark
2023-03-20 14:43 ` [PATCH v2 10/23] drm/msm: Switch idr_lock to spinlock Rob Clark
2023-03-20 14:43 ` [PATCH v2 11/23] drm/msm: Use idr_preload() Rob Clark
2023-03-20 14:43 ` [PATCH v2 12/23] drm/msm/gpu: Move fw loading out of hw_init() path Rob Clark
2023-03-20 14:43 ` [PATCH v2 13/23] drm/msm/gpu: Move BO allocation out of hw_init Rob Clark
2023-03-20 14:43 ` [PATCH v2 14/23] drm/msm/a6xx: Move ioremap out of hw_init path Rob Clark
2023-03-20 14:43 ` [PATCH v2 15/23] PM / devfreq: Drop unneed locking to appease lockdep Rob Clark
2023-03-20 14:43 ` [PATCH v2 16/23] PM / devfreq: Teach lockdep about locking order Rob Clark
2023-03-20 14:43 ` [PATCH v2 17/23] PM / QoS: Fix constraints alloc vs reclaim locking Rob Clark
2023-03-27 17:53   ` Rafael J. Wysocki
2023-03-27 19:52     ` Rob Clark
2023-03-20 14:43 ` [PATCH v2 18/23] PM / QoS: Decouple request alloc from dev_pm_qos_mtx Rob Clark
2023-03-20 20:13   ` kernel test robot
2023-03-20 20:34   ` kernel test robot
2023-03-21  4:53   ` Dan Carpenter
2023-03-20 14:43 ` [PATCH v2 19/23] PM / QoS: Teach lockdep about dev_pm_qos_mtx locking order Rob Clark
2023-03-20 14:43 ` Rob Clark [this message]
2023-03-20 14:43 ` [PATCH v2 21/23] interconnect: Fix locking for runpm vs reclaim Rob Clark
2023-03-20 14:43 ` [PATCH v2 22/23] interconnect: Teach lockdep about icc_bw_lock order Rob Clark
2023-03-20 14:43 ` [PATCH v2 23/23] drm/sched: Add (optional) fence signaling annotation Rob Clark
2023-03-21  2:55   ` Luben Tuikov
2023-04-07 17:41 ` (subset) [PATCH v2 00/23] drm/msm+PM+icc: Make job_run() reclaim-safe Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230320144356.803762-21-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox