drivers/remoteproc/qcom_q6v5_pas.c:137:46: sparse: sparse: incorrect type in argument 2 (different address spaces)
From: kernel test robot
Date: Sun Dec 08 2024 - 23:34:27 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7503345ac5f5e82fd9a36d6e6b447c016376403a
commit: 0110feaaf6d0610d0089ae4897387df9a963b5f0 arm64: Use new fallback IO memcpy/memset
date: 6 weeks ago
config: arm64-randconfig-r131-20241208 (https://download.01.org/0day-ci/archive/20241208/202412080800.7u41CGUl-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241208/202412080800.7u41CGUl-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412080800.7u41CGUl-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
>> drivers/remoteproc/qcom_q6v5_pas.c:137:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *src @@ got void * @@
drivers/remoteproc/qcom_q6v5_pas.c:137:46: sparse: expected void const volatile [noderef] __iomem *src
drivers/remoteproc/qcom_q6v5_pas.c:137:46: sparse: got void *
drivers/remoteproc/qcom_q6v5_pas.c:575:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *mem_region @@ got void [noderef] __iomem * @@
drivers/remoteproc/qcom_q6v5_pas.c:575:26: sparse: expected void *mem_region
drivers/remoteproc/qcom_q6v5_pas.c:575:26: sparse: got void [noderef] __iomem *
drivers/remoteproc/qcom_q6v5_pas.c:600:30: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *dtb_mem_region @@ got void [noderef] __iomem * @@
drivers/remoteproc/qcom_q6v5_pas.c:600:30: sparse: expected void *dtb_mem_region
drivers/remoteproc/qcom_q6v5_pas.c:600:30: sparse: got void [noderef] __iomem *
vim +137 drivers/remoteproc/qcom_q6v5_pas.c
b9e718e950c3df drivers/remoteproc/qcom_adsp_pil.c Bjorn Andersson 2016-08-22 121
181da4bcc3d4bb drivers/remoteproc/qcom_q6v5_pas.c Krzysztof Kozlowski 2023-05-07 122 static void adsp_segment_dump(struct rproc *rproc, struct rproc_dump_segment *segment,
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 123 void *dest, size_t offset, size_t size)
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 124 {
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 125 struct qcom_adsp *adsp = rproc->priv;
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 126 int total_offset;
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 127
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 128 total_offset = segment->da + segment->offset + offset - adsp->mem_phys;
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 129 if (total_offset < 0 || total_offset + size > adsp->mem_size) {
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 130 dev_err(adsp->dev,
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 131 "invalid copy request for segment %pad with offset %zu and size %zu)\n",
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 132 &segment->da, offset, size);
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 133 memset(dest, 0xff, size);
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 134 return;
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 135 }
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 136
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 @137 memcpy_fromio(dest, adsp->mem_region + total_offset, size);
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 138 }
a376c10d45a8e6 drivers/remoteproc/qcom_q6v5_pas.c Yogesh Lal 2022-11-02 139
:::::: The code at line 137 was first introduced by commit
:::::: a376c10d45a8e6ee5ea55791193f90625b35e156 remoteproc: qcom: pas: Adjust the phys addr wrt the mem region
:::::: TO: Yogesh Lal <quic_ylal@xxxxxxxxxxx>
:::::: CC: Bjorn Andersson <andersson@xxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki