From: kernel test robot <lkp@intel.com>
To: Mukesh Ojha <quic_mojha@quicinc.com>,
Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Komal Bajaj <quic_kbajaj@quicinc.com>,
Mukesh Ojha <quic_mojha@quicinc.com>
Subject: Re: [PATCH 2/6] remoteproc: qcom: Add iommu map_unmap helper function
Date: Sun, 6 Oct 2024 10:04:09 +0800 [thread overview]
Message-ID: <202410060943.UAdM2uKn-lkp@intel.com> (raw)
In-Reply-To: <20241004212359.2263502-3-quic_mojha@quicinc.com>
Hi Mukesh,
kernel test robot noticed the following build warnings:
[auto build test WARNING on remoteproc/rproc-next]
[also build test WARNING on robh/for-next linus/master v6.12-rc1 next-20241004]
[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/Mukesh-Ojha/dt-bindings-remoteproc-qcom-pas-common-Introduce-iommus-and-qcom-devmem-property/20241005-052733
base: https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rproc-next
patch link: https://lore.kernel.org/r/20241004212359.2263502-3-quic_mojha%40quicinc.com
patch subject: [PATCH 2/6] remoteproc: qcom: Add iommu map_unmap helper function
config: arm-defconfig (https://download.01.org/0day-ci/archive/20241006/202410060943.UAdM2uKn-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241006/202410060943.UAdM2uKn-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/202410060943.UAdM2uKn-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/remoteproc/qcom_common.c:645:24: warning: shift count >= width of type [-Wshift-count-overflow]
iova |= (sid_def_val << 32);
^ ~~
1 warning generated.
vim +645 drivers/remoteproc/qcom_common.c
611
612 /**
613 * qcom_map_unmap_carveout() - iommu map and unmap carveout region
614 *
615 * @rproc: rproc handle
616 * @mem_phys: starting physical address of carveout region
617 * @mem_size: size of carveout region
618 * @map: if true, map otherwise, unmap
619 * @use_sid: decision to append sid to iova
620 * @sid: SID value
621 */
622 int qcom_map_unmap_carveout(struct rproc *rproc, phys_addr_t mem_phys, size_t mem_size,
623 bool map, bool use_sid, unsigned long sid)
624 {
625 unsigned long iova = mem_phys;
626 unsigned long sid_def_val;
627 int ret;
628
629 if (!rproc->has_iommu)
630 return 0;
631
632 if (!rproc->domain)
633 return -EINVAL;
634
635 /*
636 * Remote processor like ADSP supports upto 36 bit device
637 * address space and some of its clients like fastrpc uses
638 * upper 32-35 bits to keep lower 4 bits of its SID to use
639 * larger address space. To keep this consistent across other
640 * use cases add remoteproc SID configuration for firmware
641 * to IOMMU for carveouts.
642 */
643 if (use_sid && sid) {
644 sid_def_val = sid & SID_MASK_DEFAULT;
> 645 iova |= (sid_def_val << 32);
646 }
647
648 if (map)
649 ret = iommu_map(rproc->domain, iova, mem_phys, mem_size, IOMMU_READ | IOMMU_WRITE, GFP_KERNEL);
650 else
651 ret = iommu_unmap(rproc->domain, iova, mem_size);
652
653 if (ret)
654 dev_err(&rproc->dev, "Unable to %s IOVA Memory, ret: %d\n",
655 map ? "map" : "unmap", ret);
656
657 return ret;
658 }
659 EXPORT_SYMBOL_GPL(qcom_map_unmap_carveout);
660
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-10-06 2:04 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-04 21:23 [PATCH 0/6] Peripheral Image Loader support for Qualcomm SoCs Mukesh Ojha
2024-10-04 21:23 ` [PATCH 1/6] dt-bindings: remoteproc: qcom,pas-common: Introduce iommus and qcom,devmem property Mukesh Ojha
2024-10-06 19:38 ` Dmitry Baryshkov
2024-10-07 15:35 ` Mukesh Ojha
2024-10-07 16:25 ` Dmitry Baryshkov
2024-10-09 14:04 ` Shiraz Hashim
2024-10-10 7:15 ` Krzysztof Kozlowski
2024-10-10 8:30 ` Shiraz Hashim
2024-10-04 21:23 ` [PATCH 2/6] remoteproc: qcom: Add iommu map_unmap helper function Mukesh Ojha
2024-10-06 2:04 ` kernel test robot [this message]
2024-10-06 4:29 ` kernel test robot
2024-10-04 21:23 ` [PATCH 3/6] remoteproc: qcom: Add helper function to support IOMMU devmem translation Mukesh Ojha
2024-10-07 8:08 ` neil.armstrong
2024-10-07 14:37 ` Mukesh Ojha
2024-10-10 6:59 ` neil.armstrong
2024-10-17 21:25 ` Konrad Dybcio
2024-10-04 21:23 ` [PATCH 4/6] remoteproc: qcom: Add support to parse qcom,devmem property Mukesh Ojha
2024-10-04 21:23 ` [PATCH 5/6] remoteproc: qcom: Add support of SHM bridge to enable memory protection Mukesh Ojha
2024-10-05 22:26 ` kernel test robot
2024-10-25 19:03 ` Konrad Dybcio
2024-10-04 21:23 ` [PATCH 6/6] remoteproc: qcom: Enable map/unmap and SHM bridge support Mukesh Ojha
2024-10-07 8:05 ` neil.armstrong
2024-10-07 14:52 ` Mukesh Ojha
2024-10-08 6:21 ` Mukesh Ojha
2024-10-10 6:57 ` neil.armstrong
2024-10-11 5:05 ` Shiraz Hashim
2024-10-11 6:23 ` Dmitry Baryshkov
2024-10-11 7:09 ` Shiraz Hashim
2024-10-11 7:12 ` Dmitry Baryshkov
2024-10-14 12:31 ` Shiraz Hashim
2024-10-14 12:38 ` Dmitry Baryshkov
2024-10-11 7:11 ` Mukesh Ojha
2024-10-11 7:09 ` neil.armstrong
2024-10-14 12:29 ` Shiraz Hashim
2024-10-25 19:07 ` Konrad Dybcio
2024-10-06 19:34 ` [PATCH 0/6] Peripheral Image Loader support for Qualcomm SoCs Dmitry Baryshkov
2024-10-07 18:39 ` Mukesh Ojha
2024-10-09 13:50 ` Shiraz Hashim
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=202410060943.UAdM2uKn-lkp@intel.com \
--to=lkp@intel.com \
--cc=andersson@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mathieu.poirier@linaro.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_kbajaj@quicinc.com \
--cc=quic_mojha@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 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.