From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [android-common:android15-6.6-2026-01 28/28] drivers/dma/idxd/device.c:495 idxd_cmd_exec() warn: mixing irqsave and irq
Date: Thu, 23 Apr 2026 12:16:47 +0800 [thread overview]
Message-ID: <202604231234.LuWmruJd-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: cros-kernel-buildreports@googlegroups.com
tree: https://android.googlesource.com/kernel/common android15-6.6-2026-01
head: 53e6e091166efc1ea0348a6aee2b12cc133ad102
commit: c0409dd3d151f661e7e57b901a81a02565df163c [28/28] dmaengine: idxd: use spin_lock_irqsave before wait_event_lock_irq
:::::: branch date: 3 hours ago
:::::: commit date: 2 years, 7 months ago
config: x86_64-randconfig-r071-20260421 (https://download.01.org/0day-ci/archive/20260423/202604231234.LuWmruJd-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
smatch: v0.5.0-9007-gcf3ea02b
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
| Fixes: c0409dd3d151 ("dmaengine: idxd: use spin_lock_irqsave before wait_event_lock_irq")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202604231234.LuWmruJd-lkp@intel.com/
smatch warnings:
drivers/dma/idxd/device.c:495 idxd_cmd_exec() warn: mixing irqsave and irq
vim +495 drivers/dma/idxd/device.c
bfe1d56091c1a40 Dave Jiang 2020-01-21 473
0d5c10b4c84d6ae Dave Jiang 2020-06-26 474 static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
0d5c10b4c84d6ae Dave Jiang 2020-06-26 475 u32 *status)
bfe1d56091c1a40 Dave Jiang 2020-01-21 476 {
bfe1d56091c1a40 Dave Jiang 2020-01-21 477 union idxd_command_reg cmd;
0d5c10b4c84d6ae Dave Jiang 2020-06-26 478 DECLARE_COMPLETION_ONSTACK(done);
53499d1fc11267e Dave Jiang 2021-06-03 479 u32 stat;
c0409dd3d151f66 Rex Zhang 2023-09-16 480 unsigned long flags;
bfe1d56091c1a40 Dave Jiang 2020-01-21 481
89e3becd8f821e5 Dave Jiang 2021-02-01 482 if (idxd_device_is_halted(idxd)) {
89e3becd8f821e5 Dave Jiang 2021-02-01 483 dev_warn(&idxd->pdev->dev, "Device is HALTED!\n");
28ac8e03c43dfc6 Colin Ian King 2021-04-15 484 if (status)
89e3becd8f821e5 Dave Jiang 2021-02-01 485 *status = IDXD_CMDSTS_HW_ERR;
89e3becd8f821e5 Dave Jiang 2021-02-01 486 return;
89e3becd8f821e5 Dave Jiang 2021-02-01 487 }
89e3becd8f821e5 Dave Jiang 2021-02-01 488
bfe1d56091c1a40 Dave Jiang 2020-01-21 489 memset(&cmd, 0, sizeof(cmd));
bfe1d56091c1a40 Dave Jiang 2020-01-21 490 cmd.cmd = cmd_code;
bfe1d56091c1a40 Dave Jiang 2020-01-21 491 cmd.operand = operand;
0d5c10b4c84d6ae Dave Jiang 2020-06-26 492 cmd.int_req = 1;
0d5c10b4c84d6ae Dave Jiang 2020-06-26 493
c0409dd3d151f66 Rex Zhang 2023-09-16 494 spin_lock_irqsave(&idxd->cmd_lock, flags);
0d5c10b4c84d6ae Dave Jiang 2020-06-26 @495 wait_event_lock_irq(idxd->cmd_waitq,
0d5c10b4c84d6ae Dave Jiang 2020-06-26 496 !test_bit(IDXD_FLAG_CMD_RUNNING, &idxd->flags),
53b2ee7f637c4f1 Dave Jiang 2021-04-20 497 idxd->cmd_lock);
0d5c10b4c84d6ae Dave Jiang 2020-06-26 498
bfe1d56091c1a40 Dave Jiang 2020-01-21 499 dev_dbg(&idxd->pdev->dev, "%s: sending cmd: %#x op: %#x\n",
bfe1d56091c1a40 Dave Jiang 2020-01-21 500 __func__, cmd_code, operand);
0d5c10b4c84d6ae Dave Jiang 2020-06-26 501
ff18de55a62f0e8 Dave Jiang 2020-08-28 502 idxd->cmd_status = 0;
0d5c10b4c84d6ae Dave Jiang 2020-06-26 503 __set_bit(IDXD_FLAG_CMD_RUNNING, &idxd->flags);
0d5c10b4c84d6ae Dave Jiang 2020-06-26 504 idxd->cmd_done = &done;
bfe1d56091c1a40 Dave Jiang 2020-01-21 505 iowrite32(cmd.bits, idxd->reg_base + IDXD_CMD_OFFSET);
bfe1d56091c1a40 Dave Jiang 2020-01-21 506
0d5c10b4c84d6ae Dave Jiang 2020-06-26 507 /*
0d5c10b4c84d6ae Dave Jiang 2020-06-26 508 * After command submitted, release lock and go to sleep until
0d5c10b4c84d6ae Dave Jiang 2020-06-26 509 * the command completes via interrupt.
0d5c10b4c84d6ae Dave Jiang 2020-06-26 510 */
c0409dd3d151f66 Rex Zhang 2023-09-16 511 spin_unlock_irqrestore(&idxd->cmd_lock, flags);
0d5c10b4c84d6ae Dave Jiang 2020-06-26 512 wait_for_completion(&done);
53499d1fc11267e Dave Jiang 2021-06-03 513 stat = ioread32(idxd->reg_base + IDXD_CMDSTS_OFFSET);
f9f4082dbc56c40 Dave Jiang 2021-08-24 514 spin_lock(&idxd->cmd_lock);
53499d1fc11267e Dave Jiang 2021-06-03 515 if (status)
53499d1fc11267e Dave Jiang 2021-06-03 516 *status = stat;
53499d1fc11267e Dave Jiang 2021-06-03 517 idxd->cmd_status = stat & GENMASK(7, 0);
ff18de55a62f0e8 Dave Jiang 2020-08-28 518
0d5c10b4c84d6ae Dave Jiang 2020-06-26 519 __clear_bit(IDXD_FLAG_CMD_RUNNING, &idxd->flags);
0d5c10b4c84d6ae Dave Jiang 2020-06-26 520 /* Wake up other pending commands */
0d5c10b4c84d6ae Dave Jiang 2020-06-26 521 wake_up(&idxd->cmd_waitq);
f9f4082dbc56c40 Dave Jiang 2021-08-24 522 spin_unlock(&idxd->cmd_lock);
bfe1d56091c1a40 Dave Jiang 2020-01-21 523 }
bfe1d56091c1a40 Dave Jiang 2020-01-21 524
:::::: The code at line 495 was first introduced by commit
:::::: 0d5c10b4c84d6ae6255129e5f16a0d2119c74334 dmaengine: idxd: add work queue drain support
:::::: TO: Dave Jiang <dave.jiang@intel.com>
:::::: CC: Vinod Koul <vkoul@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-23 4:17 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=202604231234.LuWmruJd-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--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.