Hi Anatolij, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 41c03ba9beea760bd2d2ac9250b09a2e192da2dc commit: adec566b05288f2787a1f88dbaf77ed8b0c644fa dmaengine: bestcomm: fix system boot lockups date: 1 year, 3 months ago config: powerpc-randconfig-s053-20230105 compiler: powerpc-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=adec566b05288f2787a1f88dbaf77ed8b0c644fa git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout adec566b05288f2787a1f88dbaf77ed8b0c644fa # 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=powerpc 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=powerpc SHELL=/bin/bash drivers/dma/bestcomm/ drivers/spi/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) drivers/dma/bestcomm/gen_bd.c:169:25: sparse: sparse: function 'bcom_gen_bd_tx_init' with external linkage has definition >> drivers/dma/bestcomm/gen_bd.c:145:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got struct bcom_bd *bd @@ drivers/dma/bestcomm/gen_bd.c:145:22: sparse: expected void volatile [noderef] __iomem *a drivers/dma/bestcomm/gen_bd.c:145:22: sparse: got struct bcom_bd *bd drivers/dma/bestcomm/gen_bd.c:229:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got struct bcom_bd *bd @@ drivers/dma/bestcomm/gen_bd.c:229:22: sparse: expected void volatile [noderef] __iomem *a drivers/dma/bestcomm/gen_bd.c:229:22: sparse: got struct bcom_bd *bd -- >> drivers/dma/bestcomm/bestcomm.c:98:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got struct bcom_bd *bd @@ drivers/dma/bestcomm/bestcomm.c:98:30: sparse: expected void volatile [noderef] __iomem *a drivers/dma/bestcomm/bestcomm.c:98:30: sparse: got struct bcom_bd *bd >> drivers/dma/bestcomm/bestcomm.c:189:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *[assigned] var @@ drivers/dma/bestcomm/bestcomm.c:189:19: sparse: expected void volatile [noderef] __iomem *a drivers/dma/bestcomm/bestcomm.c:189:19: sparse: got unsigned int [usertype] *[assigned] var >> drivers/dma/bestcomm/bestcomm.c:190:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *[assigned] inc @@ drivers/dma/bestcomm/bestcomm.c:190:19: sparse: expected void volatile [noderef] __iomem *a drivers/dma/bestcomm/bestcomm.c:190:19: sparse: got unsigned int [usertype] *[assigned] inc >> drivers/dma/bestcomm/bestcomm.c:196:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got unsigned int [usertype] *[assigned] desc @@ drivers/dma/bestcomm/bestcomm.c:196:21: sparse: expected void volatile [noderef] __iomem *d drivers/dma/bestcomm/bestcomm.c:196:21: sparse: got unsigned int [usertype] *[assigned] desc >> drivers/dma/bestcomm/bestcomm.c:197:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got unsigned int [usertype] * @@ drivers/dma/bestcomm/bestcomm.c:197:25: sparse: expected void volatile [noderef] __iomem *d drivers/dma/bestcomm/bestcomm.c:197:25: sparse: got unsigned int [usertype] * >> drivers/dma/bestcomm/bestcomm.c:198:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got unsigned int [usertype] *[assigned] inc @@ drivers/dma/bestcomm/bestcomm.c:198:21: sparse: expected void volatile [noderef] __iomem *d drivers/dma/bestcomm/bestcomm.c:198:21: sparse: got unsigned int [usertype] *[assigned] inc >> drivers/dma/bestcomm/bestcomm.c:305:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got struct bcom_tdt *tdt @@ drivers/dma/bestcomm/bestcomm.c:305:27: sparse: expected void volatile [noderef] __iomem *a drivers/dma/bestcomm/bestcomm.c:305:27: sparse: got struct bcom_tdt *tdt >> drivers/dma/bestcomm/bestcomm.c:306:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *ctx @@ drivers/dma/bestcomm/bestcomm.c:306:27: sparse: expected void volatile [noderef] __iomem *a drivers/dma/bestcomm/bestcomm.c:306:27: sparse: got unsigned int [usertype] *ctx >> drivers/dma/bestcomm/bestcomm.c:307:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *var @@ drivers/dma/bestcomm/bestcomm.c:307:27: sparse: expected void volatile [noderef] __iomem *a drivers/dma/bestcomm/bestcomm.c:307:27: sparse: got unsigned int [usertype] *var >> drivers/dma/bestcomm/bestcomm.c:308:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *fdt @@ drivers/dma/bestcomm/bestcomm.c:308:27: sparse: expected void volatile [noderef] __iomem *a drivers/dma/bestcomm/bestcomm.c:308:27: sparse: got unsigned int [usertype] *fdt drivers/dma/bestcomm/bestcomm.c:311:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got unsigned int [usertype] * @@ drivers/dma/bestcomm/bestcomm.c:311:35: sparse: expected void volatile [noderef] __iomem *d drivers/dma/bestcomm/bestcomm.c:311:35: sparse: got unsigned int [usertype] * vim +145 drivers/dma/bestcomm/gen_bd.c 112 113 int 114 bcom_gen_bd_rx_reset(struct bcom_task *tsk) 115 { 116 struct bcom_gen_bd_priv *priv = tsk->priv; 117 struct bcom_gen_bd_rx_var *var; 118 struct bcom_gen_bd_rx_inc *inc; 119 120 /* Shutdown the task */ 121 bcom_disable_task(tsk->tasknum); 122 123 /* Reset the microcode */ 124 var = (struct bcom_gen_bd_rx_var *) bcom_task_var(tsk->tasknum); 125 inc = (struct bcom_gen_bd_rx_inc *) bcom_task_inc(tsk->tasknum); 126 127 if (bcom_load_image(tsk->tasknum, bcom_gen_bd_rx_task)) 128 return -1; 129 130 var->enable = bcom_eng->regs_base + 131 offsetof(struct mpc52xx_sdma, tcr[tsk->tasknum]); 132 var->fifo = (u32) priv->fifo; 133 var->bd_base = tsk->bd_pa; 134 var->bd_last = tsk->bd_pa + ((tsk->num_bd-1) * tsk->bd_size); 135 var->bd_start = tsk->bd_pa; 136 var->buffer_size = priv->maxbufsize; 137 138 inc->incr_bytes = -(s16)sizeof(u32); 139 inc->incr_dst = sizeof(u32); 140 141 /* Reset the BDs */ 142 tsk->index = 0; 143 tsk->outdex = 0; 144 > 145 memset_io(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); 146 147 /* Configure some stuff */ 148 bcom_set_task_pragma(tsk->tasknum, BCOM_GEN_RX_BD_PRAGMA); 149 bcom_set_task_auto_start(tsk->tasknum, tsk->tasknum); 150 151 out_8(&bcom_eng->regs->ipr[priv->initiator], priv->ipr); 152 bcom_set_initiator(tsk->tasknum, priv->initiator); 153 154 out_be32(&bcom_eng->regs->IntPend, 1<tasknum); /* Clear ints */ 155 156 return 0; 157 } 158 EXPORT_SYMBOL_GPL(bcom_gen_bd_rx_reset); 159 160 void 161 bcom_gen_bd_rx_release(struct bcom_task *tsk) 162 { 163 /* Nothing special for the GenBD tasks */ 164 bcom_task_free(tsk); 165 } 166 EXPORT_SYMBOL_GPL(bcom_gen_bd_rx_release); 167 168 > 169 extern struct bcom_task * 170 bcom_gen_bd_tx_init(int queue_len, phys_addr_t fifo, 171 int initiator, int ipr) 172 { 173 struct bcom_task *tsk; 174 struct bcom_gen_bd_priv *priv; 175 176 tsk = bcom_task_alloc(queue_len, sizeof(struct bcom_gen_bd), 177 sizeof(struct bcom_gen_bd_priv)); 178 if (!tsk) 179 return NULL; 180 181 tsk->flags = BCOM_FLAGS_NONE; 182 183 priv = tsk->priv; 184 priv->fifo = fifo; 185 priv->initiator = initiator; 186 priv->ipr = ipr; 187 188 if (bcom_gen_bd_tx_reset(tsk)) { 189 bcom_task_free(tsk); 190 return NULL; 191 } 192 193 return tsk; 194 } 195 EXPORT_SYMBOL_GPL(bcom_gen_bd_tx_init); 196 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests