drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse: incorrect type in initializer (different address spaces)
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: e6664f2b33db9b6811eb4cec109f06cb2b4f458d commit: 5ae3dc078874693a0a7fd1cf32660bd473fe544d [2763/15982] remoteproc: xlnx: Add crash detection mechanism config: arm64-randconfig-r111-20260818 (https://download.01.org/0day-ci/archive/20260819/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 844a18e753e822736c9805ab779144b647a2c186) rustc: rustc 1.96.0 (ac68faa20 2026-05-25) sparse: v0.6.5-rc1 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260819/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
sparse warnings: (new ones prefixed by >>)
drivers/remoteproc/xlnx_r5_remoteproc.c:571:20: sparse: sparse: cast removes address space '__iomem' of expression drivers/remoteproc/xlnx_r5_remoteproc.c:749:17: sparse: sparse: cast removes address space '__iomem' of expression drivers/remoteproc/xlnx_r5_remoteproc.c:773:24: sparse: sparse: cast removes address space '__iomem' of expression drivers/remoteproc/xlnx_r5_remoteproc.c:797:25: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void *rsc_offset @@ got void [noderef] __iomem * @@
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: expected void *rsc_offset
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: got void [noderef] __iomem *
vim +837 drivers/remoteproc/xlnx_r5_remoteproc.c
832
833 static int zynqmp_r5_handle_rsc(struct rproc *rproc, u32 rsc_type, void *rsc,
834 int offset, int avail)
835 {
836 struct zynqmp_r5_core *r5_core = rproc->priv;
> 837 void *rsc_offset = (r5_core->rsc_tbl_va + offset);
838
839 if (rsc_type != XLNX_RPROC_FW_CRASH_REPORT)
840 return RSC_IGNORED;
841
842 r5_core->crash_report = rsc_offset;
843 /* reset all values */
844 r5_core->crash_report->crashed = false;
845 r5_core->crash_report->crash_reason = 0;
846 r5_core->crash_report->crash_reason_str[0] = '\0';
847
848 return RSC_HANDLED;
849 }
850
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
PATCH 2763/15982 drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse: incorrect type in initializer (different address spaces)
Tanmay - please have a look.
---------- Forwarded message ---------
From: kernel test robot <[email protected]>
Date: Tue, 18 Aug 2026 at 10:59
Subject: [linux-next:master 2763/15982] drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse:
incorrect type in initializer (different address spaces)
To: Tanmay Shah <[email protected]>
Cc: <[email protected]>, Mathieu Poirier <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
master
head: e6664f2b33db9b6811eb4cec109f06cb2b4f458d
commit: 5ae3dc078874693a0a7fd1cf32660bd473fe544d [2763/15982]
remoteproc: xlnx: Add crash detection mechanism
config: arm64-randconfig-r111-20260818
(https://download.01.org/0day-ci/archive/20260819/[email protected]/config)
compiler: clang version 24.0.0git
(https://github.com/llvm/llvm-project844a18e753e822736c9805ab779144b647a2c186)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20260819/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
sparse warnings: (new ones prefixed by >>)
drivers/remoteproc/xlnx_r5_remoteproc.c:571:20: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:749:17: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:773:24: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:797:25: sparse: sparse:
cast removes address space '__iomem' of expression
Quoted 1 line
Quoted 1 line
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void*rsc_offset@@ got void [noderef]__iomem* @@
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse:
expected void *rsc_offset
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: got
void [noderef] __iomem *
vim +837 drivers/remoteproc/xlnx_r5_remoteproc.c
832
833 static int zynqmp_r5_handle_rsc(struct rproc *rproc, u32rsc_type, void *rsc,
834 int offset, int avail)
835 {
836 struct zynqmp_r5_core *r5_core = rproc->priv;
Quoted 1 line
837 void
*rsc_offset= (r5_core->rsc_tbl_va+ offset);
838
839 if (rsc_type != XLNX_RPROC_FW_CRASH_REPORT)
840 return RSC_IGNORED;
841
842 r5_core->crash_report = rsc_offset; 843 /* reset all values */ 844 r5_core->crash_report->crashed = false; 845 r5_core->crash_report->crash_reason = 0; 846 r5_core->crash_report->crash_reason_str[0] = '\0';
847
848 return RSC_HANDLED;
849 }
850
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Quoted 2 lines · Mathieu Poirier
Tanmay - please have a look.
Ack. I will reproduce and send a fix.
Thanks,
Tanmay
Quoted 72 lines
---------- Forwarded message ---------
From: kernel test robot <[email protected]>
Date: Tue, 18 Aug 2026 at 10:59
Subject: [linux-next:master 2763/15982]drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse:
incorrect type in initializer (different address spaces)
To: Tanmay Shah <[email protected]>
Cc: <[email protected]>, Mathieu Poirier <[email protected]>tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
master
head:e6664f2b33db9b6811eb4cec109f06cb2b4f458d
commit:5ae3dc078874693a0a7fd1cf32660bd473fe544d[2763/15982]
remoteproc: xlnx: Add crash detection mechanism
config: arm64-randconfig-r111-20260818
(https://download.01.org/0day-ci/archive/20260819/[email protected]/config)
compiler: clang version 24.0.0git
(https://github.com/llvm/llvm-project844a18e753e822736c9805ab779144b647a2c186)
rustc: rustc 1.96.0 (ac68faa202026-05-25)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20260819/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/sparse warnings: (new ones prefixed by >>)
drivers/remoteproc/xlnx_r5_remoteproc.c:571:20: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:749:17: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:773:24: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:797:25: sparse: sparse:
cast removes address space '__iomem' of expressionQuoted 1 line
Quoted 1 line
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void*rsc_offset@@ got void [noderef]__iomem* @@
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse:
expected void*rsc_offset
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: got
void [noderef]__iomem*vim +837
drivers/remoteproc/xlnx_r5_remoteproc.c832
833 static int zynqmp_r5_handle_rsc(struct rproc *rproc, u32rsc_type, void *rsc,
834 int offset, int avail)835 { 836 struct zynqmp_r5_core *r5_core = rproc->priv;Quoted 1 line
837 void
*rsc_offset= (r5_core->rsc_tbl_va+ offset);838
839 if (rsc_type!=XLNX_RPROC_FW_CRASH_REPORT)840 return RSC_IGNORED; 841 842 r5_core->crash_report = rsc_offset; 843 /* reset all values */ 844 r5_core->crash_report->crashed = false; 845 r5_core->crash_report->crash_reason = 0; 846 r5_core->crash_report->crash_reason_str[0] = '\0'; 847 848 return RSC_HANDLED; 849 } 850--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Quoted 2 lines · Mathieu Poirier
Tanmay - please have a look.
Hello Mathieu,
I looked into this. So, I can silent sparse by using __force sparse annotation, but that's not the full solution. I think to properly address these warnings use of ioremap*() APIs should be replaced with memremap() API. This ensures that DDR reserved memory is not mapped as iomem, and correct pointer type is returned.
However, this needs serious restructure in the driver. It will take me some more time to address this issue. Until then I prefer to keep the sparse warnings.
Thank You,
Tanmay
Quoted 72 lines
---------- Forwarded message ---------
From: kernel test robot <[email protected]>
Date: Tue, 18 Aug 2026 at 10:59
Subject: [linux-next:master 2763/15982]drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse:
incorrect type in initializer (different address spaces)
To: Tanmay Shah <[email protected]>
Cc: <[email protected]>, Mathieu Poirier <[email protected]>tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
master
head:e6664f2b33db9b6811eb4cec109f06cb2b4f458d
commit:5ae3dc078874693a0a7fd1cf32660bd473fe544d[2763/15982]
remoteproc: xlnx: Add crash detection mechanism
config: arm64-randconfig-r111-20260818
(https://download.01.org/0day-ci/archive/20260819/[email protected]/config)
compiler: clang version 24.0.0git
(https://github.com/llvm/llvm-project844a18e753e822736c9805ab779144b647a2c186)
rustc: rustc 1.96.0 (ac68faa202026-05-25)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20260819/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/sparse warnings: (new ones prefixed by >>)
drivers/remoteproc/xlnx_r5_remoteproc.c:571:20: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:749:17: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:773:24: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:797:25: sparse: sparse:
cast removes address space '__iomem' of expressionQuoted 1 line
Quoted 1 line
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void*rsc_offset@@ got void [noderef]__iomem* @@
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse:
expected void*rsc_offset
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: got
void [noderef]__iomem*vim +837
drivers/remoteproc/xlnx_r5_remoteproc.c832
833 static int zynqmp_r5_handle_rsc(struct rproc *rproc, u32rsc_type, void *rsc,
834 int offset, int avail)835 { 836 struct zynqmp_r5_core *r5_core = rproc->priv;Quoted 1 line
837 void
*rsc_offset= (r5_core->rsc_tbl_va+ offset);838
839 if (rsc_type!=XLNX_RPROC_FW_CRASH_REPORT)840 return RSC_IGNORED; 841 842 r5_core->crash_report = rsc_offset; 843 /* reset all values */ 844 r5_core->crash_report->crashed = false; 845 r5_core->crash_report->crash_reason = 0; 846 r5_core->crash_report->crash_reason_str[0] = '\0'; 847 848 return RSC_HANDLED; 849 } 850--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Quoted 7 lines · Tanmay
Quoted 2 lines · Mathieu Poirier
Tanmay - please have a look.
Quoted 8 lines
Hello Mathieu,
I looked into this. So, I can silent sparse by using
__forcesparse annotation, but that's not the full solution. I think to properly address these warnings use of ioremap*() APIs should be replaced withmemremap()API. This ensures that DDR reserved memory is not mapped as iomem, and correct pointer type is returned.
Sparse complains when an __iomem * gets typecasted to anything other than a void *. I don't think there is a need to use the memremap() API because all that does is assigned the value of ioremap_xyz() to a void * before returning the value.
Looking at the errors reported herein, it is possible to use a void * and then casting that to another type to keep sparse happy.
Quoted 80 lines
However, this needs serious restructure in the driver. It will take me some more time to address this issue. Until then I prefer to keep the sparse warnings.
Thank You,
TanmayQuoted 72 lines
---------- Forwarded message ---------
From: kernel test robot <[email protected]>
Date: Tue, 18 Aug 2026 at 10:59
Subject: [linux-next:master 2763/15982]drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse:
incorrect type in initializer (different address spaces)
To: Tanmay Shah <[email protected]>
Cc: <[email protected]>, Mathieu Poirier <[email protected]>tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
master
head:e6664f2b33db9b6811eb4cec109f06cb2b4f458d
commit:5ae3dc078874693a0a7fd1cf32660bd473fe544d[2763/15982]
remoteproc: xlnx: Add crash detection mechanism
config: arm64-randconfig-r111-20260818
(https://download.01.org/0day-ci/archive/20260819/[email protected]/config)
compiler: clang version 24.0.0git
(https://github.com/llvm/llvm-project844a18e753e822736c9805ab779144b647a2c186)
rustc: rustc 1.96.0 (ac68faa202026-05-25)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20260819/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/sparse warnings: (new ones prefixed by >>)
drivers/remoteproc/xlnx_r5_remoteproc.c:571:20: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:749:17: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:773:24: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:797:25: sparse: sparse:
cast removes address space '__iomem' of expressionQuoted 1 line
Quoted 1 line
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void*rsc_offset@@ got void [noderef]__iomem* @@
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse:
expected void*rsc_offset
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: got
void [noderef]__iomem*vim +837
drivers/remoteproc/xlnx_r5_remoteproc.c832
833 static int zynqmp_r5_handle_rsc(struct rproc *rproc, u32rsc_type, void *rsc,
834 int offset, int avail)835 { 836 struct zynqmp_r5_core *r5_core = rproc->priv;Quoted 1 line
837 void
*rsc_offset= (r5_core->rsc_tbl_va+ offset);838
839 if (rsc_type!=XLNX_RPROC_FW_CRASH_REPORT)840 return RSC_IGNORED; 841 842 r5_core->crash_report = rsc_offset; 843 /* reset all values */ 844 r5_core->crash_report->crashed = false; 845 r5_core->crash_report->crash_reason = 0; 846 r5_core->crash_report->crash_reason_str[0] = '\0'; 847 848 return RSC_HANDLED; 849 } 850--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki