All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [drm-misc:drm-misc-next 16/19] drivers/accel/amdxdna/aie4_ctx.c:590:3-9: preceding lock on line 588
Date: Sat, 07 Nov 2026 10:56:45 +0100	[thread overview]
Message-ID: <202611071025.zVVvi2NB-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: dri-devel@lists.freedesktop.org
TO: David Zhang <yidong.zhang@amd.com>
CC: Lizhi Hou <lizhi.hou@amd.com>
CC: Max Zhen <max.zhen@amd.com>
CC: Wendy Liang <wendy.liang@amd.com>

tree:   https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next
head:   2d5a8313d9cf989b8f53a5689a96e891bf99fb2c
commit: b6feda618bd9250dde71c3a30c962d26138ea743 [16/19] accel/amdxdna: Implement AIE4 command packet building and submission
:::::: branch date: 15 hours ago
:::::: commit date: 2 weeks ago
config: x86_64-randconfig-2105-20261107 (https://download.01.org/0day-ci/archive/20261107/202611071025.zVVvi2NB-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202611071025.zVVvi2NB-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/accel/amdxdna/aie4_ctx.c:590:3-9: preceding lock on line 588
   drivers/accel/amdxdna/aie4_ctx.c:594:3-9: preceding lock on line 588

vim +590 drivers/accel/amdxdna/aie4_ctx.c

b6feda618bd925 David Zhang 2026-10-19  564  
b6feda618bd925 David Zhang 2026-10-19  565  static int wait_till_connected_hsa_not_full(struct amdxdna_hwctx *hwctx)
b6feda618bd925 David Zhang 2026-10-19  566  {
b6feda618bd925 David Zhang 2026-10-19  567  	struct amdxdna_dev *xdna = hwctx->client->xdna;
b6feda618bd925 David Zhang 2026-10-19  568  	struct amdxdna_hwctx_priv *priv = hwctx->priv;
b6feda618bd925 David Zhang 2026-10-19  569  	u64 wi = READ_ONCE(priv->write_index);
b6feda618bd925 David Zhang 2026-10-19  570  	bool hsa_not_full = !!(wi < CTX_MAX_CMDS);
b6feda618bd925 David Zhang 2026-10-19  571  	int ret;
b6feda618bd925 David Zhang 2026-10-19  572  
b6feda618bd925 David Zhang 2026-10-19  573  	do {
b6feda618bd925 David Zhang 2026-10-19  574  		mutex_unlock(&priv->io_lock);
b6feda618bd925 David Zhang 2026-10-19  575  		if (!hsa_not_full) {
b6feda618bd925 David Zhang 2026-10-19  576  			ret = wait_till_seq_completed(hwctx, wi - CTX_MAX_CMDS,
b6feda618bd925 David Zhang 2026-10-19  577  						      MAX_SCHEDULE_TIMEOUT);
b6feda618bd925 David Zhang 2026-10-19  578  			if (ret && ret != -EAGAIN) {
b6feda618bd925 David Zhang 2026-10-19  579  				mutex_lock(&priv->io_lock);
b6feda618bd925 David Zhang 2026-10-19  580  				return ret;
b6feda618bd925 David Zhang 2026-10-19  581  			}
b6feda618bd925 David Zhang 2026-10-19  582  			if (!ret)
b6feda618bd925 David Zhang 2026-10-19  583  				hsa_not_full = true;
b6feda618bd925 David Zhang 2026-10-19  584  		}
b6feda618bd925 David Zhang 2026-10-19  585  		ret = wait_event_freezable(priv->job_list_wq,
b6feda618bd925 David Zhang 2026-10-19  586  					   aie4_hwctx_connected(hwctx) ||
b6feda618bd925 David Zhang 2026-10-19  587  					   aie4_hwctx_has_error(hwctx));
b6feda618bd925 David Zhang 2026-10-19 @588  		mutex_lock(&priv->io_lock);
b6feda618bd925 David Zhang 2026-10-19  589  		if (ret)
b6feda618bd925 David Zhang 2026-10-19 @590  			return ret;
b6feda618bd925 David Zhang 2026-10-19  591  		if (aie4_hwctx_has_error(hwctx)) {
b6feda618bd925 David Zhang 2026-10-19  592  			XDNA_DBG(xdna, "ctx %s in error; unwinding -ENODEV",
b6feda618bd925 David Zhang 2026-10-19  593  				 hwctx->name);
b6feda618bd925 David Zhang 2026-10-19  594  			return -ENODEV;
b6feda618bd925 David Zhang 2026-10-19  595  		}
b6feda618bd925 David Zhang 2026-10-19  596  	} while (!hsa_not_full || !aie4_hwctx_connected(hwctx));
b6feda618bd925 David Zhang 2026-10-19  597  
b6feda618bd925 David Zhang 2026-10-19  598  	return 0;
b6feda618bd925 David Zhang 2026-10-19  599  }
b6feda618bd925 David Zhang 2026-10-19  600  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-11-07  9:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202611071025.zVVvi2NB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.