From: kernel test robot <lkp@intel.com>
To: "Jason-JH.Lin" <jason-jh.lin@mediatek.com>,
Jassi Brar <jassisinghbrar@gmail.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Chun-Kuang Hu <chunkuang.hu@kernel.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: oe-kbuild-all@lists.linux.dev, Conor Dooley <conor+dt@kernel.org>,
Jason-ch Chen <jason-ch.chen@mediatek.com>,
"Jason-JH . Lin" <jason-jh.lin@mediatek.com>,
Singo Chang <singo.chang@mediatek.com>,
Nancy Lin <nancy.lin@mediatek.com>,
Shawn Sung <shawn.sung@mediatek.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
dri-devel@lists.freedesktop.org,
Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH v6 6/8] mailbox: mediatek: Add CMDQ secure mailbox driver
Date: Sun, 26 May 2024 09:59:51 +0800 [thread overview]
Message-ID: <202405260953.uzQ4Rwg2-lkp@intel.com> (raw)
In-Reply-To: <20240525230810.24623-7-jason-jh.lin@mediatek.com>
Hi Jason-JH.Lin,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on next-20240523]
[cannot apply to robh/for-next krzk-dt/for-next fujitsu-integration/mailbox-for-next v6.9]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jason-JH-Lin/dt-bindings-gce-mt8195-Add-CMDQ_SYNC_TOKEN_SECURE_THR_EOF-event-id/20240526-071102
base: linus/master
patch link: https://lore.kernel.org/r/20240525230810.24623-7-jason-jh.lin%40mediatek.com
patch subject: [PATCH v6 6/8] mailbox: mediatek: Add CMDQ secure mailbox driver
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20240526/202405260953.uzQ4Rwg2-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240526/202405260953.uzQ4Rwg2-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405260953.uzQ4Rwg2-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/mailbox/mtk-cmdq-sec-mailbox.c: In function 'cmdq_sec_task_exec_work':
>> drivers/mailbox/mtk-cmdq-sec-mailbox.c:619:31: warning: variable 'data' set but not used [-Wunused-but-set-variable]
619 | struct cmdq_sec_data *data;
| ^~~~
vim +/data +619 drivers/mailbox/mtk-cmdq-sec-mailbox.c
611
612 static void cmdq_sec_task_exec_work(struct work_struct *work_item)
613 {
614 struct cmdq_sec_task *sec_task = container_of(work_item,
615 struct cmdq_sec_task, exec_work);
616 struct cmdq_sec_thread *sec_thread = container_of(sec_task->task.thread,
617 struct cmdq_sec_thread, thread);
618 struct cmdq_sec *cmdq = container_of(sec_thread->dev, struct cmdq_sec, dev);
> 619 struct cmdq_sec_data *data;
620 unsigned long flags;
621 int err;
622
623 dev_dbg(&cmdq->dev, "%s gce:%#lx sec_task:%p pkt:%p thread:%u",
624 __func__, (unsigned long)cmdq->base_pa,
625 sec_task, sec_task->task.pkt, sec_thread->idx);
626
627 if (!sec_task->task.pkt->sec_data) {
628 dev_err(&cmdq->dev, "pkt:%p without sec_data", sec_task->task.pkt);
629 return;
630 }
631 data = (struct cmdq_sec_data *)sec_task->task.pkt->sec_data;
632
633 mutex_lock(&cmdq->exec_lock);
634
635 spin_lock_irqsave(&sec_thread->thread.chan->lock, flags);
636 if (!sec_thread->task_cnt) {
637 mod_timer(&sec_thread->timeout, jiffies +
638 msecs_to_jiffies(sec_thread->timeout_ms));
639 sec_thread->wait_cookie = 1;
640 sec_thread->next_cookie = 1;
641 sec_thread->task_cnt = 0;
642 __raw_writel(0, (void __iomem *)cmdq->shared_mem->va +
643 CMDQ_SEC_SHARED_THR_CNT_OFFSET + sec_thread->idx * sizeof(u32));
644 }
645
646 sec_task->reset_exec = sec_thread->task_cnt ? false : true;
647 sec_task->wait_cookie = sec_thread->next_cookie;
648 sec_thread->next_cookie = (sec_thread->next_cookie + 1) % CMDQ_MAX_COOKIE_VALUE;
649 list_add_tail(&sec_task->task.list_entry, &sec_thread->thread.task_busy_list);
650 sec_thread->task_cnt += 1;
651 spin_unlock_irqrestore(&sec_thread->thread.chan->lock, flags);
652 sec_task->trigger = sched_clock();
653
654 if (!atomic_cmpxchg(&cmdq_path_res, 0, 1)) {
655 err = cmdq_sec_task_submit(cmdq, NULL, CMD_CMDQ_IWC_PATH_RES_ALLOCATE,
656 CMDQ_INVALID_THREAD);
657 if (err) {
658 atomic_set(&cmdq_path_res, 0);
659 goto task_end;
660 }
661 }
662
663 if (sec_thread->task_cnt > CMDQ_MAX_TASK_IN_SECURE_THREAD) {
664 dev_err(&cmdq->dev, "task_cnt:%u cannot more than %u sec_task:%p thread:%u",
665 sec_thread->task_cnt, CMDQ_MAX_TASK_IN_SECURE_THREAD,
666 sec_task, sec_thread->idx);
667 err = -EMSGSIZE;
668 goto task_end;
669 }
670
671 err = cmdq_sec_task_submit(cmdq, sec_task, CMD_CMDQ_IWC_SUBMIT_TASK,
672 sec_thread->idx);
673 if (err)
674 dev_err(&cmdq->dev, "cmdq_sec_task_submit err:%d sec_task:%p thread:%u",
675 err, sec_task, sec_thread->idx);
676
677 task_end:
678 if (err) {
679 struct cmdq_cb_data cb_data;
680
681 cb_data.sta = err;
682 cb_data.pkt = sec_task->task.pkt;
683 mbox_chan_received_data(sec_thread->thread.chan, &cb_data);
684
685 spin_lock_irqsave(&sec_thread->thread.chan->lock, flags);
686 if (!sec_thread->task_cnt)
687 dev_err(&cmdq->dev, "thread:%u task_cnt:%u cannot below zero",
688 sec_thread->idx, sec_thread->task_cnt);
689 else
690 sec_thread->task_cnt -= 1;
691
692 sec_thread->next_cookie = (sec_thread->next_cookie - 1 +
693 CMDQ_MAX_COOKIE_VALUE) % CMDQ_MAX_COOKIE_VALUE;
694 list_del(&sec_task->task.list_entry);
695 dev_dbg(&cmdq->dev, "gce:%#lx err:%d sec_task:%p pkt:%p",
696 (unsigned long)cmdq->base_pa, err, sec_task, sec_task->task.pkt);
697 dev_dbg(&cmdq->dev, "thread:%u task_cnt:%u wait_cookie:%u next_cookie:%u",
698 sec_thread->idx, sec_thread->task_cnt,
699 sec_thread->wait_cookie, sec_thread->next_cookie);
700 spin_unlock_irqrestore(&sec_thread->thread.chan->lock, flags);
701
702 kfree(sec_task);
703 }
704
705 mutex_unlock(&cmdq->exec_lock);
706 }
707
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-05-26 2:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-25 23:08 [PATCH v6 0/8] Add CMDQ secure driver for SVP Jason-JH.Lin
2024-05-25 23:08 ` [PATCH v6 1/8] dt-bindings: gce: mt8195: Add CMDQ_SYNC_TOKEN_SECURE_THR_EOF event id Jason-JH.Lin
2024-05-25 23:08 ` [PATCH v6 2/8] dt-bindings: mailbox: Add property for CMDQ secure driver Jason-JH.Lin
2024-05-26 0:31 ` Rob Herring (Arm)
2024-05-28 10:24 ` AngeloGioacchino Del Regno
2024-05-25 23:08 ` [PATCH v6 3/8] soc: mediatek: cmdq: Add cmdq_pkt_logic_command to support math operation Jason-JH.Lin
2024-05-28 10:24 ` AngeloGioacchino Del Regno
2024-05-28 15:52 ` Jason-JH Lin (林睿祥)
2024-06-24 11:39 ` AngeloGioacchino Del Regno
2024-06-25 5:59 ` Jason-JH Lin (林睿祥)
2024-05-25 23:08 ` [PATCH v6 4/8] mailbox: mtk-cmdq: Support GCE loop packets in interrupt handler Jason-JH.Lin
2024-05-28 10:24 ` AngeloGioacchino Del Regno
2024-05-25 23:08 ` [PATCH v6 5/8] mailbox: mediatek: Move reuseable definition to header for secure driver Jason-JH.Lin
2024-05-25 23:08 ` [PATCH v6 6/8] mailbox: mediatek: Add CMDQ secure mailbox driver Jason-JH.Lin
2024-05-26 1:59 ` kernel test robot [this message]
2024-05-25 23:08 ` [PATCH v6 7/8] mailbox: mediatek: Add secure CMDQ driver support for CMDQ driver Jason-JH.Lin
2024-05-25 23:08 ` [PATCH v6 8/8] soc: mediatek: mtk-cmdq: Add secure cmdq_pkt APIs Jason-JH.Lin
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=202405260953.uzQ4Rwg2-lkp@intel.com \
--to=lkp@intel.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jason-ch.chen@mediatek.com \
--cc=jason-jh.lin@mediatek.com \
--cc=jassisinghbrar@gmail.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=nancy.lin@mediatek.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh+dt@kernel.org \
--cc=shawn.sung@mediatek.com \
--cc=singo.chang@mediatek.com \
/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;
as well as URLs for NNTP newsgroup(s).