Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Rob Clark <rob.clark@oss.qualcomm.com>
Cc: lumag@kernel.org, abhinav.kumar@linux.dev,
	jessica.zhang@oss.qualcomm.com, sean@poorly.run,
	marijn.suijten@somainline.org, airlied@gmail.com,
	simona@ffwll.ch, antomani103@gmail.com,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/msm: Fix objtool warning in submit_lock_objects()
Date: Thu, 7 Aug 2025 09:03:28 -0400	[thread overview]
Message-ID: <aJSkIJPbvj5xuu77@lappy> (raw)
In-Reply-To: <CACSVV02Z=4Saw=-MA6zz-Dsye8T=AcARWs1AhUbWnyA8sY7fdQ@mail.gmail.com>

On Wed, Aug 06, 2025 at 04:38:19PM -0700, Rob Clark wrote:
>On Tue, Aug 5, 2025 at 3:56 PM Sasha Levin <sashal@kernel.org> wrote:
>>
>> Restructure submit_lock_objects() to use a single loop with break
>> statements 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.
>
>Maybe we should instead just split out a separate
>submit_lock_objects_vmbind() and restore the error path 'goto error'
>instead of returning from within the loop?  Ie. basically revert
>submit_lock_objects to the way it was before commit 92395af63a99
>("drm/msm: Add VM_BIND submitqueue"), and then move the rest into a
>new fxn (with 'goto error' instead of 'return ret'?  In retrospect the
>vmbind case is kinda just shoehorned into the existing fxn.
>
>I can type up this version if you have better things to do.

I'll send it out :)

-- 
Thanks,
Sasha

      reply	other threads:[~2025-08-07 13:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05 22:55 [PATCH] drm/msm: Fix objtool warning in submit_lock_objects() Sasha Levin
2025-08-06 23:38 ` Rob Clark
2025-08-07 13:03   ` Sasha Levin [this message]

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=aJSkIJPbvj5xuu77@lappy \
    --to=sashal@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=antomani103@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jessica.zhang@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=rob.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    /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