[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202212152317.m7lDn17p-lkp@intel.com>
Date: Thu, 15 Dec 2022 23:17:12 +0800
From: kernel test robot <lkp@...el.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: arch/arm/mach-mediatek/platsmp.c:105:30: sparse: sparse: incorrect
type in assignment (different address spaces)
Hi Arnd,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 041fae9c105ae342a4245cf1e0dc56a23fbb9d3c
commit: 09f6b27d5ddd9ad0ec096d1b0f8decdacc70f0f8 ARM: dove: multiplatform support
date: 9 months ago
config: arm-randconfig-s031-20221215
compiler: arm-linux-gnueabi-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=09f6b27d5ddd9ad0ec096d1b0f8decdacc70f0f8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 09f6b27d5ddd9ad0ec096d1b0f8decdacc70f0f8
# 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=arm SHELL=/bin/bash arch/arm/mach-mediatek/ arch/arm/mach-rockchip/ arch/arm/mach-sti/ arch/arm/mach-tegra/ drivers/mmc/host/ drivers/video/fbdev/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-mediatek/platsmp.c:105:30: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *static [toplevel] mtk_smp_base @@ got void * @@
arch/arm/mach-mediatek/platsmp.c:105:30: sparse: expected void [noderef] __iomem *static [toplevel] mtk_smp_base
arch/arm/mach-mediatek/platsmp.c:105:30: sparse: got void *
--
>> arch/arm/mach-rockchip/pm.c:277:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *static [assigned] [toplevel] rk3288_bootram_base @@
arch/arm/mach-rockchip/pm.c:277:9: sparse: expected void const *
arch/arm/mach-rockchip/pm.c:277:9: sparse: got void [noderef] __iomem *static [assigned] [toplevel] rk3288_bootram_base
>> arch/arm/mach-rockchip/pm.c:277:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *static [assigned] [toplevel] rk3288_bootram_base @@
arch/arm/mach-rockchip/pm.c:277:9: sparse: expected void const *
arch/arm/mach-rockchip/pm.c:277:9: sparse: got void [noderef] __iomem *static [assigned] [toplevel] rk3288_bootram_base
arch/arm/mach-rockchip/pm.c:277:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *static [assigned] [toplevel] rk3288_bootram_base @@
arch/arm/mach-rockchip/pm.c:277:9: sparse: expected void *
arch/arm/mach-rockchip/pm.c:277:9: sparse: got void [noderef] __iomem *static [assigned] [toplevel] rk3288_bootram_base
--
>> arch/arm/mach-sti/platsmp.c:44:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile *p @@ got unsigned int [noderef] [usertype] __iomem *static [toplevel] cpu_strt_ptr @@
arch/arm/mach-sti/platsmp.c:44:9: sparse: expected void volatile *p
arch/arm/mach-sti/platsmp.c:44:9: sparse: got unsigned int [noderef] [usertype] __iomem *static [toplevel] cpu_strt_ptr
--
>> arch/arm/mach-tegra/reset.c:64:9: sparse: sparse: subtraction of functions? Share your drugs
arch/arm/mach-tegra/reset.c:66:9: sparse: sparse: subtraction of functions? Share your drugs
>> arch/arm/mach-tegra/reset.c:66:9: sparse: sparse: cast from unknown type
--
>> arch/arm/mach-tegra/pm.c:116:27: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int [usertype] *cpu_in_lp2 @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:116:27: sparse: expected unsigned int [usertype] *cpu_in_lp2
arch/arm/mach-tegra/pm.c:116:27: sparse: got void [noderef] __iomem *
arch/arm/mach-tegra/pm.c:129:27: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int [usertype] *cpu_in_lp2 @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:129:27: sparse: expected unsigned int [usertype] *cpu_in_lp2
arch/arm/mach-tegra/pm.c:129:27: sparse: got void [noderef] __iomem *
>> arch/arm/mach-tegra/pm.c:322:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:322:9: sparse: expected void const *
arch/arm/mach-tegra/pm.c:322:9: sparse: got void [noderef] __iomem *
>> arch/arm/mach-tegra/pm.c:322:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:322:9: sparse: expected void const *
arch/arm/mach-tegra/pm.c:322:9: sparse: got void [noderef] __iomem *
arch/arm/mach-tegra/pm.c:322:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:322:9: sparse: expected void const *
arch/arm/mach-tegra/pm.c:322:9: sparse: got void [noderef] __iomem *
arch/arm/mach-tegra/pm.c:324:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:324:9: sparse: expected void const *
arch/arm/mach-tegra/pm.c:324:9: sparse: got void [noderef] __iomem *
arch/arm/mach-tegra/pm.c:324:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:324:9: sparse: expected void const *
arch/arm/mach-tegra/pm.c:324:9: sparse: got void [noderef] __iomem *
>> arch/arm/mach-tegra/pm.c:324:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:324:9: sparse: expected void *
arch/arm/mach-tegra/pm.c:324:9: sparse: got void [noderef] __iomem *
>> arch/arm/mach-tegra/pm.c:327:12: sparse: sparse: cast removes address space '__iomem' of expression
arch/arm/mach-tegra/pm.c:333:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:333:9: sparse: expected void const *
arch/arm/mach-tegra/pm.c:333:9: sparse: got void [noderef] __iomem *
arch/arm/mach-tegra/pm.c:333:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:333:9: sparse: expected void const *
arch/arm/mach-tegra/pm.c:333:9: sparse: got void [noderef] __iomem *
arch/arm/mach-tegra/pm.c:333:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
arch/arm/mach-tegra/pm.c:333:9: sparse: expected void *
arch/arm/mach-tegra/pm.c:333:9: sparse: got void [noderef] __iomem *
arch/arm/mach-tegra/pm.c:336:11: sparse: sparse: cast removes address space '__iomem' of expression
--
>> drivers/mmc/host/wmt-sdmmc.c:242:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/mmc/host/wmt-sdmmc.c:242:39: sparse: expected unsigned int
drivers/mmc/host/wmt-sdmmc.c:242:39: sparse: got restricted __be32 [usertype]
vim +105 arch/arm/mach-mediatek/platsmp.c
0cda07001a9454f Yingjoe Chen 2015-10-02 76
0cda07001a9454f Yingjoe Chen 2015-10-02 77 static void __init __mtk_smp_prepare_cpus(unsigned int max_cpus, int trustzone)
0cda07001a9454f Yingjoe Chen 2015-10-02 78 {
0cda07001a9454f Yingjoe Chen 2015-10-02 79 int i, num;
0cda07001a9454f Yingjoe Chen 2015-10-02 80 const struct of_device_id *infos;
0cda07001a9454f Yingjoe Chen 2015-10-02 81
0cda07001a9454f Yingjoe Chen 2015-10-02 82 if (trustzone) {
0cda07001a9454f Yingjoe Chen 2015-10-02 83 num = ARRAY_SIZE(mtk_tz_smp_boot_infos);
0cda07001a9454f Yingjoe Chen 2015-10-02 84 infos = mtk_tz_smp_boot_infos;
0cda07001a9454f Yingjoe Chen 2015-10-02 85 } else {
0cda07001a9454f Yingjoe Chen 2015-10-02 86 num = ARRAY_SIZE(mtk_smp_boot_infos);
0cda07001a9454f Yingjoe Chen 2015-10-02 87 infos = mtk_smp_boot_infos;
0cda07001a9454f Yingjoe Chen 2015-10-02 88 }
0cda07001a9454f Yingjoe Chen 2015-10-02 89
0cda07001a9454f Yingjoe Chen 2015-10-02 90 /* Find smp boot info for this SoC */
0cda07001a9454f Yingjoe Chen 2015-10-02 91 for (i = 0; i < num; i++) {
0cda07001a9454f Yingjoe Chen 2015-10-02 92 if (of_machine_is_compatible(infos[i].compatible)) {
0cda07001a9454f Yingjoe Chen 2015-10-02 93 mtk_smp_info = infos[i].data;
0cda07001a9454f Yingjoe Chen 2015-10-02 94 break;
0cda07001a9454f Yingjoe Chen 2015-10-02 95 }
0cda07001a9454f Yingjoe Chen 2015-10-02 96 }
0cda07001a9454f Yingjoe Chen 2015-10-02 97
0cda07001a9454f Yingjoe Chen 2015-10-02 98 if (!mtk_smp_info) {
0cda07001a9454f Yingjoe Chen 2015-10-02 99 pr_err("%s: Device is not supported\n", __func__);
0cda07001a9454f Yingjoe Chen 2015-10-02 100 return;
0cda07001a9454f Yingjoe Chen 2015-10-02 101 }
0cda07001a9454f Yingjoe Chen 2015-10-02 102
0cda07001a9454f Yingjoe Chen 2015-10-02 103 if (trustzone) {
0cda07001a9454f Yingjoe Chen 2015-10-02 104 /* smp_base(trustzone-bootinfo) is reserved by device tree */
0cda07001a9454f Yingjoe Chen 2015-10-02 @105 mtk_smp_base = phys_to_virt(mtk_smp_info->smp_base);
0cda07001a9454f Yingjoe Chen 2015-10-02 106 } else {
0cda07001a9454f Yingjoe Chen 2015-10-02 107 mtk_smp_base = ioremap(mtk_smp_info->smp_base, MTK_SMP_REG_SIZE);
0cda07001a9454f Yingjoe Chen 2015-10-02 108 if (!mtk_smp_base) {
0cda07001a9454f Yingjoe Chen 2015-10-02 109 pr_err("%s: Can't remap %lx\n", __func__,
0cda07001a9454f Yingjoe Chen 2015-10-02 110 mtk_smp_info->smp_base);
0cda07001a9454f Yingjoe Chen 2015-10-02 111 return;
0cda07001a9454f Yingjoe Chen 2015-10-02 112 }
0cda07001a9454f Yingjoe Chen 2015-10-02 113 }
0cda07001a9454f Yingjoe Chen 2015-10-02 114
0cda07001a9454f Yingjoe Chen 2015-10-02 115 /*
0cda07001a9454f Yingjoe Chen 2015-10-02 116 * write the address of slave startup address into the system-wide
0cda07001a9454f Yingjoe Chen 2015-10-02 117 * jump register
0cda07001a9454f Yingjoe Chen 2015-10-02 118 */
64fc2a947a98737 Florian Fainelli 2017-01-15 119 writel_relaxed(__pa_symbol(secondary_startup_arm),
0cda07001a9454f Yingjoe Chen 2015-10-02 120 mtk_smp_base + mtk_smp_info->jump_reg);
0cda07001a9454f Yingjoe Chen 2015-10-02 121 }
0cda07001a9454f Yingjoe Chen 2015-10-02 122
:::::: The code at line 105 was first introduced by commit
:::::: 0cda07001a9454f371b7a7edabad55d99ef91157 ARM: mediatek: add smp bringup code
:::::: TO: Yingjoe Chen <yingjoe.chen@...iatek.com>
:::::: CC: Matthias Brugger <matthias.bgg@...il.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (175148 bytes)
Powered by blists - more mailing lists