From: kernel test robot <lkp@intel.com>
To: "Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>,
"Bjorn Helgaas" <helgaas@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Rob Herring" <robh@kernel.org>,
"Johannes Berg" <johannes@sipsolutions.net>,
"Jeff Johnson" <jjohnson@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, mhi@lists.linux.dev,
linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
quic_jjohnson@quicinc.com, quic_pyarlaga@quicinc.com,
quic_vbadigan@quicinc.com, quic_vpernami@quicinc.com,
quic_mrana@quicinc.com,
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Subject: Re: [PATCH 6/8] bus: mhi: host: Add support for Bandwidth scale
Date: Mon, 17 Feb 2025 18:55:43 +0800 [thread overview]
Message-ID: <202502171823.5VC7a1E6-lkp@intel.com> (raw)
In-Reply-To: <20250217-mhi_bw_up-v1-6-9bad1e42bdb1@oss.qualcomm.com>
Hi Krishna,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 0ad2507d5d93f39619fc42372c347d6006b64319]
url: https://github.com/intel-lab-lkp/linux/commits/Krishna-Chaitanya-Chundru/PCI-update-current-bus-speed-as-part-of-pci_bus_add_devices/20250217-144050
base: 0ad2507d5d93f39619fc42372c347d6006b64319
patch link: https://lore.kernel.org/r/20250217-mhi_bw_up-v1-6-9bad1e42bdb1%40oss.qualcomm.com
patch subject: [PATCH 6/8] bus: mhi: host: Add support for Bandwidth scale
config: x86_64-buildonly-randconfig-006-20250217 (https://download.01.org/0day-ci/archive/20250217/202502171823.5VC7a1E6-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250217/202502171823.5VC7a1E6-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/202502171823.5VC7a1E6-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/bus/mhi/host/init.c:682:6: warning: variable 'doorbell' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
682 | if (mhi_cntrl->get_misc_doorbell)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bus/mhi/host/init.c:685:6: note: uninitialized use occurs here
685 | if (doorbell > 0) {
| ^~~~~~~~
drivers/bus/mhi/host/init.c:682:2: note: remove the 'if' if its condition is always true
682 | if (mhi_cntrl->get_misc_doorbell)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
683 | doorbell = mhi_cntrl->get_misc_doorbell(mhi_cntrl, MHI_ER_BW_SCALE);
drivers/bus/mhi/host/init.c:548:22: note: initialize the variable 'doorbell' to silence this warning
548 | int i, ret, doorbell;
| ^
| = 0
1 warning generated.
vim +682 drivers/bus/mhi/host/init.c
544
545 int mhi_init_mmio(struct mhi_controller *mhi_cntrl)
546 {
547 u32 val;
548 int i, ret, doorbell;
549 struct mhi_chan *mhi_chan;
550 struct mhi_event *mhi_event;
551 void __iomem *base = mhi_cntrl->regs;
552 struct device *dev = &mhi_cntrl->mhi_dev->dev;
553 struct {
554 u32 offset;
555 u32 val;
556 } reg_info[] = {
557 {
558 CCABAP_HIGHER,
559 upper_32_bits(mhi_cntrl->mhi_ctxt->chan_ctxt_addr),
560 },
561 {
562 CCABAP_LOWER,
563 lower_32_bits(mhi_cntrl->mhi_ctxt->chan_ctxt_addr),
564 },
565 {
566 ECABAP_HIGHER,
567 upper_32_bits(mhi_cntrl->mhi_ctxt->er_ctxt_addr),
568 },
569 {
570 ECABAP_LOWER,
571 lower_32_bits(mhi_cntrl->mhi_ctxt->er_ctxt_addr),
572 },
573 {
574 CRCBAP_HIGHER,
575 upper_32_bits(mhi_cntrl->mhi_ctxt->cmd_ctxt_addr),
576 },
577 {
578 CRCBAP_LOWER,
579 lower_32_bits(mhi_cntrl->mhi_ctxt->cmd_ctxt_addr),
580 },
581 {
582 MHICTRLBASE_HIGHER,
583 upper_32_bits(mhi_cntrl->iova_start),
584 },
585 {
586 MHICTRLBASE_LOWER,
587 lower_32_bits(mhi_cntrl->iova_start),
588 },
589 {
590 MHIDATABASE_HIGHER,
591 upper_32_bits(mhi_cntrl->iova_start),
592 },
593 {
594 MHIDATABASE_LOWER,
595 lower_32_bits(mhi_cntrl->iova_start),
596 },
597 {
598 MHICTRLLIMIT_HIGHER,
599 upper_32_bits(mhi_cntrl->iova_stop),
600 },
601 {
602 MHICTRLLIMIT_LOWER,
603 lower_32_bits(mhi_cntrl->iova_stop),
604 },
605 {
606 MHIDATALIMIT_HIGHER,
607 upper_32_bits(mhi_cntrl->iova_stop),
608 },
609 {
610 MHIDATALIMIT_LOWER,
611 lower_32_bits(mhi_cntrl->iova_stop),
612 },
613 {0, 0}
614 };
615
616 dev_dbg(dev, "Initializing MHI registers\n");
617
618 /* Read channel db offset */
619 ret = mhi_get_channel_doorbell_offset(mhi_cntrl, &val);
620 if (ret)
621 return ret;
622
623 if (val >= mhi_cntrl->reg_len - (8 * MHI_DEV_WAKE_DB)) {
624 dev_err(dev, "CHDB offset: 0x%x is out of range: 0x%zx\n",
625 val, mhi_cntrl->reg_len - (8 * MHI_DEV_WAKE_DB));
626 return -ERANGE;
627 }
628
629 /* Setup wake db */
630 mhi_cntrl->wake_db = base + val + (8 * MHI_DEV_WAKE_DB);
631 mhi_cntrl->wake_set = false;
632
633 /* Setup channel db address for each channel in tre_ring */
634 mhi_chan = mhi_cntrl->mhi_chan;
635 for (i = 0; i < mhi_cntrl->max_chan; i++, val += 8, mhi_chan++)
636 mhi_chan->tre_ring.db_addr = base + val;
637
638 /* Read event ring db offset */
639 ret = mhi_read_reg(mhi_cntrl, base, ERDBOFF, &val);
640 if (ret) {
641 dev_err(dev, "Unable to read ERDBOFF register\n");
642 return -EIO;
643 }
644
645 if (val >= mhi_cntrl->reg_len - (8 * mhi_cntrl->total_ev_rings)) {
646 dev_err(dev, "ERDB offset: 0x%x is out of range: 0x%zx\n",
647 val, mhi_cntrl->reg_len - (8 * mhi_cntrl->total_ev_rings));
648 return -ERANGE;
649 }
650
651 /* Setup event db address for each ev_ring */
652 mhi_event = mhi_cntrl->mhi_event;
653 for (i = 0; i < mhi_cntrl->total_ev_rings; i++, val += 8, mhi_event++) {
654 if (mhi_event->offload_ev)
655 continue;
656
657 mhi_event->ring.db_addr = base + val;
658 }
659
660 /* Setup DB register for primary CMD rings */
661 mhi_cntrl->mhi_cmd[PRIMARY_CMD_RING].ring.db_addr = base + CRDB_LOWER;
662
663 /* Write to MMIO registers */
664 for (i = 0; reg_info[i].offset; i++)
665 mhi_write_reg(mhi_cntrl, base, reg_info[i].offset,
666 reg_info[i].val);
667
668 ret = mhi_write_reg_field(mhi_cntrl, base, MHICFG, MHICFG_NER_MASK,
669 mhi_cntrl->total_ev_rings);
670 if (ret) {
671 dev_err(dev, "Unable to write MHICFG register\n");
672 return ret;
673 }
674
675 ret = mhi_write_reg_field(mhi_cntrl, base, MHICFG, MHICFG_NHWER_MASK,
676 mhi_cntrl->hw_ev_rings);
677 if (ret) {
678 dev_err(dev, "Unable to write MHICFG register\n");
679 return ret;
680 }
681
> 682 if (mhi_cntrl->get_misc_doorbell)
683 doorbell = mhi_cntrl->get_misc_doorbell(mhi_cntrl, MHI_ER_BW_SCALE);
684
685 if (doorbell > 0) {
686 ret = mhi_init_bw_scale(mhi_cntrl, doorbell);
687 if (!ret)
688 mhi_cntrl->bw_scale_db = base + val + (8 * doorbell);
689 else
690 dev_warn(dev, "BW scale setup failure\n");
691 }
692 return 0;
693 }
694
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-02-17 10:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 6:34 [PATCH 0/8] bus: mhi: host: Add support for mhi bus bw Krishna Chaitanya Chundru
2025-02-17 6:34 ` [PATCH 1/8] PCI: update current bus speed as part of pci_bus_add_devices() Krishna Chaitanya Chundru
2025-02-17 6:34 ` [PATCH 2/8] PCI/bwctrl: Add support to scale bandwidth before & after link re-training Krishna Chaitanya Chundru
2025-02-17 9:28 ` Ilpo Järvinen
2025-02-19 17:57 ` Krishna Chaitanya Chundru
2025-02-17 6:34 ` [PATCH 3/8] PCI: dwc: Implement .pre_scale_bus_bw() & .post_scale_bus_bw hook Krishna Chaitanya Chundru
2025-02-17 6:34 ` [PATCH 4/8] PCI: dwc: qcom: Update ICC & OPP votes based upon the requested speed Krishna Chaitanya Chundru
2025-02-18 0:36 ` kernel test robot
2025-02-18 22:07 ` Bjorn Helgaas
2025-02-19 17:58 ` Krishna Chaitanya Chundru
2025-02-19 18:27 ` Bjorn Helgaas
2025-02-17 6:34 ` [PATCH 5/8] bus: mhi: host: Add support to read MHI capabilities Krishna Chaitanya Chundru
2025-02-17 6:34 ` [PATCH 6/8] bus: mhi: host: Add support for Bandwidth scale Krishna Chaitanya Chundru
2025-02-17 9:17 ` Ilpo Järvinen
2025-02-19 18:02 ` Krishna Chaitanya Chundru
2025-02-17 10:55 ` kernel test robot [this message]
2025-02-17 6:34 ` [PATCH 7/8] PCI: Make pcie_link_speed variable public & export pci_set_target_speed() Krishna Chaitanya Chundru
2025-02-19 17:36 ` Jeff Johnson
2025-02-17 6:34 ` [PATCH 8/8] wifi: ath11k: add support for MHI bandwidth scaling Krishna Chaitanya Chundru
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=202502171823.5VC7a1E6-lkp@intel.com \
--to=lkp@intel.com \
--cc=ath11k@lists.infradead.org \
--cc=helgaas@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jingoohan1@gmail.com \
--cc=jjohnson@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=kw@linux.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mhi@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_jjohnson@quicinc.com \
--cc=quic_mrana@quicinc.com \
--cc=quic_pyarlaga@quicinc.com \
--cc=quic_vbadigan@quicinc.com \
--cc=quic_vpernami@quicinc.com \
--cc=robh@kernel.org \
/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