From: kernel test robot <lkp@intel.com>
To: Suman Anna <s-anna@ti.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: drivers/remoteproc/ti_k3_r5_remoteproc.c:711:17: sparse: sparse: cast removes address space '__iomem' of expression
Date: Thu, 9 Feb 2023 19:36:53 +0800 [thread overview]
Message-ID: <202302091921.BhcFWgw3-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0983f6bf2bfc0789b51ddf7315f644ff4da50acb
commit: 1168af40b1ad8cb2e78f4a70869fa4a076320e4f remoteproc: k3-r5: Add support for IPC-only mode for all R5Fs
date: 11 months ago
config: arm64-randconfig-s043-20230208 (https://download.01.org/0day-ci/archive/20230209/202302091921.BhcFWgw3-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1168af40b1ad8cb2e78f4a70869fa4a076320e4f
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1168af40b1ad8cb2e78f4a70869fa4a076320e4f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/infiniband/hw/hns/ drivers/remoteproc/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302091921.BhcFWgw3-lkp@intel.com
sparse warnings: (new ones prefixed by >>)
drivers/remoteproc/ti_k3_r5_remoteproc.c:476:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *cpu_addr @@
drivers/remoteproc/ti_k3_r5_remoteproc.c:476:28: sparse: expected void *
drivers/remoteproc/ti_k3_r5_remoteproc.c:476:28: sparse: got void [noderef] __iomem *cpu_addr
drivers/remoteproc/ti_k3_r5_remoteproc.c:479:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *cpu_addr @@
drivers/remoteproc/ti_k3_r5_remoteproc.c:479:28: sparse: expected void *
drivers/remoteproc/ti_k3_r5_remoteproc.c:479:28: sparse: got void [noderef] __iomem *cpu_addr
>> drivers/remoteproc/ti_k3_r5_remoteproc.c:711:17: sparse: sparse: cast removes address space '__iomem' of expression
vim +/__iomem +711 drivers/remoteproc/ti_k3_r5_remoteproc.c
681
682 /*
683 * This function implements the .get_loaded_rsc_table() callback and is used
684 * to provide the resource table for the booted R5F in IPC-only mode. The K3 R5F
685 * firmwares follow a design-by-contract approach and are expected to have the
686 * resource table at the base of the DDR region reserved for firmware usage.
687 * This provides flexibility for the remote processor to be booted by different
688 * bootloaders that may or may not have the ability to publish the resource table
689 * address and size through a DT property. This callback is invoked only in
690 * IPC-only mode.
691 */
692 static struct resource_table *k3_r5_get_loaded_rsc_table(struct rproc *rproc,
693 size_t *rsc_table_sz)
694 {
695 struct k3_r5_rproc *kproc = rproc->priv;
696 struct device *dev = kproc->dev;
697
698 if (!kproc->rmem[0].cpu_addr) {
699 dev_err(dev, "memory-region #1 does not exist, loaded rsc table can't be found");
700 return ERR_PTR(-ENOMEM);
701 }
702
703 /*
704 * NOTE: The resource table size is currently hard-coded to a maximum
705 * of 256 bytes. The most common resource table usage for K3 firmwares
706 * is to only have the vdev resource entry and an optional trace entry.
707 * The exact size could be computed based on resource table address, but
708 * the hard-coded value suffices to support the IPC-only mode.
709 */
710 *rsc_table_sz = 256;
> 711 return (struct resource_table *)kproc->rmem[0].cpu_addr;
712 }
713
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next reply other threads:[~2023-02-09 11:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 11:36 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-05-16 2:43 drivers/remoteproc/ti_k3_r5_remoteproc.c:711:17: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot
2023-02-10 0:16 kernel test robot
2023-02-09 1:19 kernel test robot
2023-02-08 14:33 kernel test robot
2023-02-04 23:48 kernel test robot
2022-12-18 6:25 kernel test robot
2022-10-19 15:16 kernel test robot
2022-08-04 9:43 kernel test robot
2022-04-07 2:26 kernel test robot
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=202302091921.BhcFWgw3-lkp@intel.com \
--to=lkp@intel.com \
--cc=bjorn.andersson@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=s-anna@ti.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).