drm/msm: Fix objtool warning in submit_lock_objects()
authorSasha Levin <sashal@kernel.org>
Thu, 7 Aug 2025 13:10:58 +0000 (09:10 -0400)
committerRob Clark <robin.clark@oss.qualcomm.com>
Thu, 7 Aug 2025 16:22:53 +0000 (09:22 -0700)
commit42464c51ccccb6343a932a7ea8bc9181e589f270
tree77a2cb0a2daade008046e8d4cc5fb135487490ee
parentfe2f3b1c702f0e02906419c662ca9446cc789354
drm/msm: Fix objtool warning in submit_lock_objects()

Split the vmbind case into a separate helper function
submit_lock_objects_vmbind() to fix objtool warning:

  drivers/gpu/drm/msm/msm.o: warning: objtool: submit_lock_objects+0x451:
  sibling call from callable instruction with modified stack frame

The drm_exec_until_all_locked() macro uses computed gotos internally
for its retry loop. Having return statements inside this macro, or
immediately after it in certain code paths, confuses objtool's static
analysis of stack frames, causing it to incorrectly flag tail call
optimizations.

Fixes: 92395af63a99 ("drm/msm: Add VM_BIND submitqueue")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Patchwork: https://patchwork.freedesktop.org/patch/667539/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
drivers/gpu/drm/msm/msm_gem_submit.c