Re: [PATCH RFC] bpf, x64: allow not-converged images when BPF_JIT_ALWAYS_ON is set
by kernel test robot
Hi Gary,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master ipvs/master v5.10-rc3 next-20201112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gary-Lin/bpf-x64-allow-not-conve...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-a002-20201113 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e0c35655b6e8186baef8840b26ba4090503b554)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/e491680a9f8f3835010cbcaa58d38382a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gary-Lin/bpf-x64-allow-not-converged-images-when-BPF_JIT_ALWAYS_ON-is-set/20201113-164003
git checkout e491680a9f8f3835010cbcaa58d38382ae94d1e5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/x86/net/bpf_jit_comp.c:1959:5: warning: no previous prototype for function 'arch_prepare_bpf_dispatcher' [-Wmissing-prototypes]
int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, int num_funcs)
^
arch/x86/net/bpf_jit_comp.c:1959:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, int num_funcs)
^
static
>> arch/x86/net/bpf_jit_comp.c:2050:1: warning: unused label 'out_image' [-Wunused-label]
out_image:
^~~~~~~~~~
2 warnings generated.
vim +/out_image +2050 arch/x86/net/bpf_jit_comp.c
e491680a9f8f38 Gary Lin 2020-11-13 1976
d1c55ab5e41fcd Daniel Borkmann 2016-05-13 1977 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1978 {
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1979 struct bpf_binary_header *header = NULL;
959a7579160349 Daniel Borkmann 2016-05-13 1980 struct bpf_prog *tmp, *orig_prog = prog;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 1981 struct x64_jit_data *jit_data;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1982 int proglen, oldproglen = 0;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1983 struct jit_context ctx = {};
959a7579160349 Daniel Borkmann 2016-05-13 1984 bool tmp_blinded = false;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 1985 bool extra_pass = false;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1986 u8 *image = NULL;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1987 int *addrs;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1988 int pass;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1989 int i;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1990
60b58afc96c9df Alexei Starovoitov 2017-12-14 1991 if (!prog->jit_requested)
959a7579160349 Daniel Borkmann 2016-05-13 1992 return orig_prog;
959a7579160349 Daniel Borkmann 2016-05-13 1993
959a7579160349 Daniel Borkmann 2016-05-13 1994 tmp = bpf_jit_blind_constants(prog);
a2c7a98301d9f9 Ingo Molnar 2018-04-27 1995 /*
a2c7a98301d9f9 Ingo Molnar 2018-04-27 1996 * If blinding was requested and we failed during blinding,
959a7579160349 Daniel Borkmann 2016-05-13 1997 * we must fall back to the interpreter.
959a7579160349 Daniel Borkmann 2016-05-13 1998 */
959a7579160349 Daniel Borkmann 2016-05-13 1999 if (IS_ERR(tmp))
959a7579160349 Daniel Borkmann 2016-05-13 2000 return orig_prog;
959a7579160349 Daniel Borkmann 2016-05-13 2001 if (tmp != prog) {
959a7579160349 Daniel Borkmann 2016-05-13 2002 tmp_blinded = true;
959a7579160349 Daniel Borkmann 2016-05-13 2003 prog = tmp;
959a7579160349 Daniel Borkmann 2016-05-13 2004 }
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2005
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2006 jit_data = prog->aux->jit_data;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2007 if (!jit_data) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2008 jit_data = kzalloc(sizeof(*jit_data), GFP_KERNEL);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2009 if (!jit_data) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2010 prog = orig_prog;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2011 goto out;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2012 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2013 prog->aux->jit_data = jit_data;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2014 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2015 addrs = jit_data->addrs;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2016 if (addrs) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2017 ctx = jit_data->ctx;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2018 oldproglen = jit_data->proglen;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2019 image = jit_data->image;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2020 header = jit_data->header;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2021 extra_pass = true;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2022 goto skip_init_addrs;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2023 }
7c2e988f400e83 Alexei Starovoitov 2019-07-30 2024 addrs = kmalloc_array(prog->len + 1, sizeof(*addrs), GFP_KERNEL);
959a7579160349 Daniel Borkmann 2016-05-13 2025 if (!addrs) {
959a7579160349 Daniel Borkmann 2016-05-13 2026 prog = orig_prog;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2027 goto out_addrs;
959a7579160349 Daniel Borkmann 2016-05-13 2028 }
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2029
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2030 /*
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2031 * Before first pass, make a rough estimation of addrs[]
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2032 * each BPF instruction is translated to less than 64 bytes
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2033 */
7c2e988f400e83 Alexei Starovoitov 2019-07-30 2034 for (proglen = 0, i = 0; i <= prog->len; i++) {
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2035 proglen += 64;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2036 addrs[i] = proglen;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2037 }
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2038 ctx.cleanup_addr = proglen;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2039 skip_init_addrs:
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2040
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2041 /*
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2042 * JITed image shrinks with every pass and the loop iterates
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2043 * until the image stops shrinking. Very large BPF programs
3f7352bf21f8fd Alexei Starovoitov 2015-05-22 2044 * may converge on the last pass. In such case do one more
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2045 * pass to emit the final image.
3f7352bf21f8fd Alexei Starovoitov 2015-05-22 2046 */
e491680a9f8f38 Gary Lin 2020-11-13 2047 for (pass = 0; pass < MAX_JIT_PASSES || image; pass++) {
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2048 proglen = do_jit(prog, addrs, image, oldproglen, &ctx);
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2049 if (proglen <= 0) {
3aab8884c9eb99 Daniel Borkmann 2018-05-02 @2050 out_image:
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
drivers/mmc/host/moxart-mmc.c:260:7: warning: variable 'dma_time' set but not used
by kernel test robot
Hi Krzysztof,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 585e5b17b92dead8a3aca4e3c9876fbca5f7e0ba
commit: 54d8454436a205682bd89d66d8d9eedbc8452d15 mmc: host: Enable compile testing of multiple drivers
date: 10 weeks ago
config: h8300-randconfig-r013-20201105 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 54d8454436a205682bd89d66d8d9eedbc8452d15
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/mmc/host/moxart-mmc.c:16:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:93:50: warning: ordered comparison of pointer with null pointer [-Wextra]
93 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/mmc/host/moxart-mmc.c: In function 'moxart_transfer_dma':
>> drivers/mmc/host/moxart-mmc.c:260:7: warning: variable 'dma_time' set but not used [-Wunused-but-set-variable]
260 | long dma_time;
| ^~~~~~~~
drivers/mmc/host/moxart-mmc.c: In function 'moxart_request':
>> drivers/mmc/host/moxart-mmc.c:398:7: warning: variable 'pio_time' set but not used [-Wunused-but-set-variable]
398 | long pio_time;
| ^~~~~~~~
vim +/dma_time +260 drivers/mmc/host/moxart-mmc.c
1b66e94e6b99953 Jonas Jensen 2014-04-09 256
1b66e94e6b99953 Jonas Jensen 2014-04-09 257 static void moxart_transfer_dma(struct mmc_data *data, struct moxart_host *host)
1b66e94e6b99953 Jonas Jensen 2014-04-09 258 {
feeef096a770d28 Heiner Kallweit 2017-03-26 259 u32 len, dir_slave;
41f469cac2663a4 Nicholas Mc Guire 2016-07-25 @260 long dma_time;
1b66e94e6b99953 Jonas Jensen 2014-04-09 261 struct dma_async_tx_descriptor *desc = NULL;
1b66e94e6b99953 Jonas Jensen 2014-04-09 262 struct dma_chan *dma_chan;
1b66e94e6b99953 Jonas Jensen 2014-04-09 263
1b66e94e6b99953 Jonas Jensen 2014-04-09 264 if (host->data_len == data->bytes_xfered)
1b66e94e6b99953 Jonas Jensen 2014-04-09 265 return;
1b66e94e6b99953 Jonas Jensen 2014-04-09 266
1b66e94e6b99953 Jonas Jensen 2014-04-09 267 if (data->flags & MMC_DATA_WRITE) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 268 dma_chan = host->dma_chan_tx;
1b66e94e6b99953 Jonas Jensen 2014-04-09 269 dir_slave = DMA_MEM_TO_DEV;
1b66e94e6b99953 Jonas Jensen 2014-04-09 270 } else {
1b66e94e6b99953 Jonas Jensen 2014-04-09 271 dma_chan = host->dma_chan_rx;
1b66e94e6b99953 Jonas Jensen 2014-04-09 272 dir_slave = DMA_DEV_TO_MEM;
1b66e94e6b99953 Jonas Jensen 2014-04-09 273 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 274
1b66e94e6b99953 Jonas Jensen 2014-04-09 275 len = dma_map_sg(dma_chan->device->dev, data->sg,
feeef096a770d28 Heiner Kallweit 2017-03-26 276 data->sg_len, mmc_get_dma_dir(data));
1b66e94e6b99953 Jonas Jensen 2014-04-09 277
1b66e94e6b99953 Jonas Jensen 2014-04-09 278 if (len > 0) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 279 desc = dmaengine_prep_slave_sg(dma_chan, data->sg,
1b66e94e6b99953 Jonas Jensen 2014-04-09 280 len, dir_slave,
1b66e94e6b99953 Jonas Jensen 2014-04-09 281 DMA_PREP_INTERRUPT |
1b66e94e6b99953 Jonas Jensen 2014-04-09 282 DMA_CTRL_ACK);
1b66e94e6b99953 Jonas Jensen 2014-04-09 283 } else {
1b66e94e6b99953 Jonas Jensen 2014-04-09 284 dev_err(mmc_dev(host->mmc), "dma_map_sg returned zero length\n");
1b66e94e6b99953 Jonas Jensen 2014-04-09 285 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 286
1b66e94e6b99953 Jonas Jensen 2014-04-09 287 if (desc) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 288 host->tx_desc = desc;
1b66e94e6b99953 Jonas Jensen 2014-04-09 289 desc->callback = moxart_dma_complete;
1b66e94e6b99953 Jonas Jensen 2014-04-09 290 desc->callback_param = host;
1b66e94e6b99953 Jonas Jensen 2014-04-09 291 dmaengine_submit(desc);
1b66e94e6b99953 Jonas Jensen 2014-04-09 292 dma_async_issue_pending(dma_chan);
1b66e94e6b99953 Jonas Jensen 2014-04-09 293 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 294
1b66e94e6b99953 Jonas Jensen 2014-04-09 295 data->bytes_xfered += host->data_remain;
1b66e94e6b99953 Jonas Jensen 2014-04-09 296
1b66e94e6b99953 Jonas Jensen 2014-04-09 297 dma_time = wait_for_completion_interruptible_timeout(
1b66e94e6b99953 Jonas Jensen 2014-04-09 298 &host->dma_complete, host->timeout);
1b66e94e6b99953 Jonas Jensen 2014-04-09 299
1b66e94e6b99953 Jonas Jensen 2014-04-09 300 dma_unmap_sg(dma_chan->device->dev,
1b66e94e6b99953 Jonas Jensen 2014-04-09 301 data->sg, data->sg_len,
feeef096a770d28 Heiner Kallweit 2017-03-26 302 mmc_get_dma_dir(data));
1b66e94e6b99953 Jonas Jensen 2014-04-09 303 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 304
1b66e94e6b99953 Jonas Jensen 2014-04-09 305
1b66e94e6b99953 Jonas Jensen 2014-04-09 306 static void moxart_transfer_pio(struct moxart_host *host)
1b66e94e6b99953 Jonas Jensen 2014-04-09 307 {
1b66e94e6b99953 Jonas Jensen 2014-04-09 308 struct mmc_data *data = host->mrq->cmd->data;
1b66e94e6b99953 Jonas Jensen 2014-04-09 309 u32 *sgp, len = 0, remain, status;
1b66e94e6b99953 Jonas Jensen 2014-04-09 310
1b66e94e6b99953 Jonas Jensen 2014-04-09 311 if (host->data_len == data->bytes_xfered)
1b66e94e6b99953 Jonas Jensen 2014-04-09 312 return;
1b66e94e6b99953 Jonas Jensen 2014-04-09 313
1b66e94e6b99953 Jonas Jensen 2014-04-09 314 sgp = sg_virt(host->cur_sg);
1b66e94e6b99953 Jonas Jensen 2014-04-09 315 remain = host->data_remain;
1b66e94e6b99953 Jonas Jensen 2014-04-09 316
1b66e94e6b99953 Jonas Jensen 2014-04-09 317 if (data->flags & MMC_DATA_WRITE) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 318 while (remain > 0) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 319 if (moxart_wait_for_status(host, FIFO_URUN, &status)
1b66e94e6b99953 Jonas Jensen 2014-04-09 320 == -ETIMEDOUT) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 321 data->error = -ETIMEDOUT;
1b66e94e6b99953 Jonas Jensen 2014-04-09 322 complete(&host->pio_complete);
1b66e94e6b99953 Jonas Jensen 2014-04-09 323 return;
1b66e94e6b99953 Jonas Jensen 2014-04-09 324 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 325 for (len = 0; len < remain && len < host->fifo_width;) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 326 iowrite32(*sgp, host->base + REG_DATA_WINDOW);
1b66e94e6b99953 Jonas Jensen 2014-04-09 327 sgp++;
1b66e94e6b99953 Jonas Jensen 2014-04-09 328 len += 4;
1b66e94e6b99953 Jonas Jensen 2014-04-09 329 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 330 remain -= len;
1b66e94e6b99953 Jonas Jensen 2014-04-09 331 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 332
1b66e94e6b99953 Jonas Jensen 2014-04-09 333 } else {
1b66e94e6b99953 Jonas Jensen 2014-04-09 334 while (remain > 0) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 335 if (moxart_wait_for_status(host, FIFO_ORUN, &status)
1b66e94e6b99953 Jonas Jensen 2014-04-09 336 == -ETIMEDOUT) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 337 data->error = -ETIMEDOUT;
1b66e94e6b99953 Jonas Jensen 2014-04-09 338 complete(&host->pio_complete);
1b66e94e6b99953 Jonas Jensen 2014-04-09 339 return;
1b66e94e6b99953 Jonas Jensen 2014-04-09 340 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 341 for (len = 0; len < remain && len < host->fifo_width;) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 342 /* SCR data must be read in big endian. */
1b66e94e6b99953 Jonas Jensen 2014-04-09 343 if (data->mrq->cmd->opcode == SD_APP_SEND_SCR)
1b66e94e6b99953 Jonas Jensen 2014-04-09 344 *sgp = ioread32be(host->base +
1b66e94e6b99953 Jonas Jensen 2014-04-09 345 REG_DATA_WINDOW);
1b66e94e6b99953 Jonas Jensen 2014-04-09 346 else
1b66e94e6b99953 Jonas Jensen 2014-04-09 347 *sgp = ioread32(host->base +
1b66e94e6b99953 Jonas Jensen 2014-04-09 348 REG_DATA_WINDOW);
1b66e94e6b99953 Jonas Jensen 2014-04-09 349 sgp++;
1b66e94e6b99953 Jonas Jensen 2014-04-09 350 len += 4;
1b66e94e6b99953 Jonas Jensen 2014-04-09 351 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 352 remain -= len;
1b66e94e6b99953 Jonas Jensen 2014-04-09 353 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 354 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 355
1b66e94e6b99953 Jonas Jensen 2014-04-09 356 data->bytes_xfered += host->data_remain - remain;
1b66e94e6b99953 Jonas Jensen 2014-04-09 357 host->data_remain = remain;
1b66e94e6b99953 Jonas Jensen 2014-04-09 358
1b66e94e6b99953 Jonas Jensen 2014-04-09 359 if (host->data_len != data->bytes_xfered)
1b66e94e6b99953 Jonas Jensen 2014-04-09 360 moxart_next_sg(host);
1b66e94e6b99953 Jonas Jensen 2014-04-09 361 else
1b66e94e6b99953 Jonas Jensen 2014-04-09 362 complete(&host->pio_complete);
1b66e94e6b99953 Jonas Jensen 2014-04-09 363 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 364
1b66e94e6b99953 Jonas Jensen 2014-04-09 365 static void moxart_prepare_data(struct moxart_host *host)
1b66e94e6b99953 Jonas Jensen 2014-04-09 366 {
1b66e94e6b99953 Jonas Jensen 2014-04-09 367 struct mmc_data *data = host->mrq->cmd->data;
1b66e94e6b99953 Jonas Jensen 2014-04-09 368 u32 datactrl;
1b66e94e6b99953 Jonas Jensen 2014-04-09 369 int blksz_bits;
1b66e94e6b99953 Jonas Jensen 2014-04-09 370
1b66e94e6b99953 Jonas Jensen 2014-04-09 371 if (!data)
1b66e94e6b99953 Jonas Jensen 2014-04-09 372 return;
1b66e94e6b99953 Jonas Jensen 2014-04-09 373
1b66e94e6b99953 Jonas Jensen 2014-04-09 374 host->data_len = data->blocks * data->blksz;
1b66e94e6b99953 Jonas Jensen 2014-04-09 375 blksz_bits = ffs(data->blksz) - 1;
1b66e94e6b99953 Jonas Jensen 2014-04-09 376 BUG_ON(1 << blksz_bits != data->blksz);
1b66e94e6b99953 Jonas Jensen 2014-04-09 377
1b66e94e6b99953 Jonas Jensen 2014-04-09 378 moxart_init_sg(host, data);
1b66e94e6b99953 Jonas Jensen 2014-04-09 379
1b66e94e6b99953 Jonas Jensen 2014-04-09 380 datactrl = DCR_DATA_EN | (blksz_bits & DCR_BLK_SIZE);
1b66e94e6b99953 Jonas Jensen 2014-04-09 381
1b66e94e6b99953 Jonas Jensen 2014-04-09 382 if (data->flags & MMC_DATA_WRITE)
1b66e94e6b99953 Jonas Jensen 2014-04-09 383 datactrl |= DCR_DATA_WRITE;
1b66e94e6b99953 Jonas Jensen 2014-04-09 384
1b66e94e6b99953 Jonas Jensen 2014-04-09 385 if ((host->data_len > host->fifo_width) && host->have_dma)
1b66e94e6b99953 Jonas Jensen 2014-04-09 386 datactrl |= DCR_DMA_EN;
1b66e94e6b99953 Jonas Jensen 2014-04-09 387
1b66e94e6b99953 Jonas Jensen 2014-04-09 388 writel(DCR_DATA_FIFO_RESET, host->base + REG_DATA_CONTROL);
1b66e94e6b99953 Jonas Jensen 2014-04-09 389 writel(MASK_DATA | FIFO_URUN | FIFO_ORUN, host->base + REG_CLEAR);
1b66e94e6b99953 Jonas Jensen 2014-04-09 390 writel(host->rate, host->base + REG_DATA_TIMER);
1b66e94e6b99953 Jonas Jensen 2014-04-09 391 writel(host->data_len, host->base + REG_DATA_LENGTH);
1b66e94e6b99953 Jonas Jensen 2014-04-09 392 writel(datactrl, host->base + REG_DATA_CONTROL);
1b66e94e6b99953 Jonas Jensen 2014-04-09 393 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 394
1b66e94e6b99953 Jonas Jensen 2014-04-09 395 static void moxart_request(struct mmc_host *mmc, struct mmc_request *mrq)
1b66e94e6b99953 Jonas Jensen 2014-04-09 396 {
1b66e94e6b99953 Jonas Jensen 2014-04-09 397 struct moxart_host *host = mmc_priv(mmc);
41f469cac2663a4 Nicholas Mc Guire 2016-07-25 @398 long pio_time;
41f469cac2663a4 Nicholas Mc Guire 2016-07-25 399 unsigned long flags;
1b66e94e6b99953 Jonas Jensen 2014-04-09 400 u32 status;
1b66e94e6b99953 Jonas Jensen 2014-04-09 401
1b66e94e6b99953 Jonas Jensen 2014-04-09 402 spin_lock_irqsave(&host->lock, flags);
1b66e94e6b99953 Jonas Jensen 2014-04-09 403
1b66e94e6b99953 Jonas Jensen 2014-04-09 404 init_completion(&host->dma_complete);
1b66e94e6b99953 Jonas Jensen 2014-04-09 405 init_completion(&host->pio_complete);
1b66e94e6b99953 Jonas Jensen 2014-04-09 406
1b66e94e6b99953 Jonas Jensen 2014-04-09 407 host->mrq = mrq;
1b66e94e6b99953 Jonas Jensen 2014-04-09 408
1b66e94e6b99953 Jonas Jensen 2014-04-09 409 if (readl(host->base + REG_STATUS) & CARD_DETECT) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 410 mrq->cmd->error = -ETIMEDOUT;
1b66e94e6b99953 Jonas Jensen 2014-04-09 411 goto request_done;
1b66e94e6b99953 Jonas Jensen 2014-04-09 412 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 413
1b66e94e6b99953 Jonas Jensen 2014-04-09 414 moxart_prepare_data(host);
1b66e94e6b99953 Jonas Jensen 2014-04-09 415 moxart_send_command(host, host->mrq->cmd);
1b66e94e6b99953 Jonas Jensen 2014-04-09 416
1b66e94e6b99953 Jonas Jensen 2014-04-09 417 if (mrq->cmd->data) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 418 if ((host->data_len > host->fifo_width) && host->have_dma) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 419
1b66e94e6b99953 Jonas Jensen 2014-04-09 420 writel(CARD_CHANGE, host->base + REG_INTERRUPT_MASK);
1b66e94e6b99953 Jonas Jensen 2014-04-09 421
1b66e94e6b99953 Jonas Jensen 2014-04-09 422 spin_unlock_irqrestore(&host->lock, flags);
1b66e94e6b99953 Jonas Jensen 2014-04-09 423
1b66e94e6b99953 Jonas Jensen 2014-04-09 424 moxart_transfer_dma(mrq->cmd->data, host);
1b66e94e6b99953 Jonas Jensen 2014-04-09 425
1b66e94e6b99953 Jonas Jensen 2014-04-09 426 spin_lock_irqsave(&host->lock, flags);
1b66e94e6b99953 Jonas Jensen 2014-04-09 427 } else {
1b66e94e6b99953 Jonas Jensen 2014-04-09 428
1b66e94e6b99953 Jonas Jensen 2014-04-09 429 writel(MASK_INTR_PIO, host->base + REG_INTERRUPT_MASK);
1b66e94e6b99953 Jonas Jensen 2014-04-09 430
1b66e94e6b99953 Jonas Jensen 2014-04-09 431 spin_unlock_irqrestore(&host->lock, flags);
1b66e94e6b99953 Jonas Jensen 2014-04-09 432
1b66e94e6b99953 Jonas Jensen 2014-04-09 433 /* PIO transfers start from interrupt. */
1b66e94e6b99953 Jonas Jensen 2014-04-09 434 pio_time = wait_for_completion_interruptible_timeout(
1b66e94e6b99953 Jonas Jensen 2014-04-09 435 &host->pio_complete, host->timeout);
1b66e94e6b99953 Jonas Jensen 2014-04-09 436
1b66e94e6b99953 Jonas Jensen 2014-04-09 437 spin_lock_irqsave(&host->lock, flags);
1b66e94e6b99953 Jonas Jensen 2014-04-09 438 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 439
1b66e94e6b99953 Jonas Jensen 2014-04-09 440 if (host->is_removed) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 441 dev_err(mmc_dev(host->mmc), "card removed\n");
1b66e94e6b99953 Jonas Jensen 2014-04-09 442 mrq->cmd->error = -ETIMEDOUT;
1b66e94e6b99953 Jonas Jensen 2014-04-09 443 goto request_done;
1b66e94e6b99953 Jonas Jensen 2014-04-09 444 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 445
1b66e94e6b99953 Jonas Jensen 2014-04-09 446 if (moxart_wait_for_status(host, MASK_DATA, &status)
1b66e94e6b99953 Jonas Jensen 2014-04-09 447 == -ETIMEDOUT) {
1b66e94e6b99953 Jonas Jensen 2014-04-09 448 mrq->cmd->data->error = -ETIMEDOUT;
1b66e94e6b99953 Jonas Jensen 2014-04-09 449 goto request_done;
1b66e94e6b99953 Jonas Jensen 2014-04-09 450 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 451
1b66e94e6b99953 Jonas Jensen 2014-04-09 452 if (status & DATA_CRC_FAIL)
1b66e94e6b99953 Jonas Jensen 2014-04-09 453 mrq->cmd->data->error = -ETIMEDOUT;
1b66e94e6b99953 Jonas Jensen 2014-04-09 454
1b66e94e6b99953 Jonas Jensen 2014-04-09 455 if (mrq->cmd->data->stop)
1b66e94e6b99953 Jonas Jensen 2014-04-09 456 moxart_send_command(host, mrq->cmd->data->stop);
1b66e94e6b99953 Jonas Jensen 2014-04-09 457 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 458
1b66e94e6b99953 Jonas Jensen 2014-04-09 459 request_done:
1b66e94e6b99953 Jonas Jensen 2014-04-09 460 spin_unlock_irqrestore(&host->lock, flags);
1b66e94e6b99953 Jonas Jensen 2014-04-09 461 mmc_request_done(host->mmc, mrq);
1b66e94e6b99953 Jonas Jensen 2014-04-09 462 }
1b66e94e6b99953 Jonas Jensen 2014-04-09 463
:::::: The code at line 260 was first introduced by commit
:::::: 41f469cac2663a41a7b0c84cb94e8f7024385ae4 mmc: moxart: fix wait_for_completion_interruptible_timeout return variable type
:::::: TO: Nicholas Mc Guire <hofrat(a)osadl.org>
:::::: CC: Ulf Hansson <ulf.hansson(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[chrome-os:chromeos-4.19 28/50] drivers/gpu/drm/i915/intel_hdcp.c:723:21: error: unused variable 'hdcp'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: b9a3f5405fb3783912a70780b9f51b8942feed91
commit: d9e7f80c21119b35d8b863f0f330743e1f9d818a [28/50] BACKPORT: drm/i915: SRM revocation check for HDCP1.4 and 2.2
config: i386-randconfig-a006-20201113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.19
git checkout d9e7f80c21119b35d8b863f0f330743e1f9d818a
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/i915/intel_hdcp.c: In function '_intel_hdcp_enable':
>> drivers/gpu/drm/i915/intel_hdcp.c:723:21: error: unused variable 'hdcp' [-Werror=unused-variable]
723 | struct intel_hdcp *hdcp = &connector->hdcp;
| ^~~~
cc1: all warnings being treated as errors
vim +/hdcp +723 drivers/gpu/drm/i915/intel_hdcp.c
ee5e5e7a5e0fdec Sean Paul 2018-01-08 720
ee5e5e7a5e0fdec Sean Paul 2018-01-08 721 static int _intel_hdcp_enable(struct intel_connector *connector)
ee5e5e7a5e0fdec Sean Paul 2018-01-08 722 {
a21f41f9d3a00e4 Ramalingam C 2018-10-29 @723 struct intel_hdcp *hdcp = &connector->hdcp;
ee5e5e7a5e0fdec Sean Paul 2018-01-08 724 struct drm_i915_private *dev_priv = connector->base.dev->dev_private;
6d983946513b051 Ramalingam C 2018-02-03 725 int i, ret, tries = 3;
ee5e5e7a5e0fdec Sean Paul 2018-01-08 726
cb340bf37173d6d Ramalingam C 2018-02-03 727 DRM_DEBUG_KMS("[%s:%d] HDCP is being enabled...\n",
cb340bf37173d6d Ramalingam C 2018-02-03 728 connector->base.name, connector->base.base.id);
cb340bf37173d6d Ramalingam C 2018-02-03 729
6308a31544284c1 Ramalingam C 2018-04-02 730 if (!hdcp_key_loadable(dev_priv)) {
6308a31544284c1 Ramalingam C 2018-04-02 731 DRM_ERROR("HDCP key Load is not possible\n");
ee5e5e7a5e0fdec Sean Paul 2018-01-08 732 return -ENXIO;
ee5e5e7a5e0fdec Sean Paul 2018-01-08 733 }
ee5e5e7a5e0fdec Sean Paul 2018-01-08 734
ee5e5e7a5e0fdec Sean Paul 2018-01-08 735 for (i = 0; i < KEY_LOAD_TRIES; i++) {
ee5e5e7a5e0fdec Sean Paul 2018-01-08 736 ret = intel_hdcp_load_keys(dev_priv);
ee5e5e7a5e0fdec Sean Paul 2018-01-08 737 if (!ret)
ee5e5e7a5e0fdec Sean Paul 2018-01-08 738 break;
ee5e5e7a5e0fdec Sean Paul 2018-01-08 739 intel_hdcp_clear_keys(dev_priv);
ee5e5e7a5e0fdec Sean Paul 2018-01-08 740 }
ee5e5e7a5e0fdec Sean Paul 2018-01-08 741 if (ret) {
ee5e5e7a5e0fdec Sean Paul 2018-01-08 742 DRM_ERROR("Could not load HDCP keys, (%d)\n", ret);
ee5e5e7a5e0fdec Sean Paul 2018-01-08 743 return ret;
ee5e5e7a5e0fdec Sean Paul 2018-01-08 744 }
ee5e5e7a5e0fdec Sean Paul 2018-01-08 745
6d983946513b051 Ramalingam C 2018-02-03 746 /* Incase of authentication failures, HDCP spec expects reauth. */
6d983946513b051 Ramalingam C 2018-02-03 747 for (i = 0; i < tries; i++) {
d9e7f80c21119b3 Ramalingam C 2019-05-07 748 ret = intel_hdcp_auth(connector);
6d983946513b051 Ramalingam C 2018-02-03 749 if (!ret)
6d983946513b051 Ramalingam C 2018-02-03 750 return 0;
6d983946513b051 Ramalingam C 2018-02-03 751
6d983946513b051 Ramalingam C 2018-02-03 752 DRM_DEBUG_KMS("HDCP Auth failure (%d)\n", ret);
a01244967d4311a Ramalingam C 2018-02-03 753
a01244967d4311a Ramalingam C 2018-02-03 754 /* Ensuring HDCP encryption and signalling are stopped. */
a01244967d4311a Ramalingam C 2018-02-03 755 _intel_hdcp_disable(connector);
ee5e5e7a5e0fdec Sean Paul 2018-01-08 756 }
ee5e5e7a5e0fdec Sean Paul 2018-01-08 757
6d983946513b051 Ramalingam C 2018-02-03 758 DRM_ERROR("HDCP authentication failed (%d tries/%d)\n", tries, ret);
6d983946513b051 Ramalingam C 2018-02-03 759 return ret;
ee5e5e7a5e0fdec Sean Paul 2018-01-08 760 }
ee5e5e7a5e0fdec Sean Paul 2018-01-08 761
:::::: The code at line 723 was first introduced by commit
:::::: a21f41f9d3a00e4362585459d502028389c1ef15 BACKPORT: drm/i915: wrapping all hdcp var into intel_hdcp
:::::: TO: Ramalingam C <ramalingam.c(a)intel.com>
:::::: CC: Commit Bot <commit-bot(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[l1k:spi_fixes_part2 5/15] drivers/spi/atmel-quadspi.c:594:3: error: label 'exit' used but not defined
by kernel test robot
tree: https://github.com/l1k/linux spi_fixes_part2
head: 7e3aa793208e7679cbeaddd23911685c89efb115
commit: 87559c2497a3deb6b08b469522e5f2e16d2c59ad [5/15] spi: atmel-quadspi: Fix use-after-free on unbind
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/l1k/linux/commit/87559c2497a3deb6b08b469522e5f2e16d2c59ad
git remote add l1k https://github.com/l1k/linux
git fetch --no-tags l1k spi_fixes_part2
git checkout 87559c2497a3deb6b08b469522e5f2e16d2c59ad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/spi/atmel-quadspi.c: In function 'atmel_qspi_probe':
>> drivers/spi/atmel-quadspi.c:594:3: error: label 'exit' used but not defined
594 | goto exit;
| ^~~~
vim +/exit +594 drivers/spi/atmel-quadspi.c
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 530
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 531 static int atmel_qspi_probe(struct platform_device *pdev)
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 532 {
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 533 struct spi_controller *ctrl;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 534 struct atmel_qspi *aq;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 535 struct resource *res;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 536 int irq, err = 0;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 537
87559c2497a3deb drivers/spi/atmel-quadspi.c Lukas Wunner 2020-11-05 538 ctrl = devm_spi_alloc_master(&pdev->dev, sizeof(*aq));
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 539 if (!ctrl)
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 540 return -ENOMEM;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 541
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 542 ctrl->mode_bits = SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_DUAL | SPI_TX_QUAD;
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 543 ctrl->setup = atmel_qspi_setup;
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 544 ctrl->bus_num = -1;
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 545 ctrl->mem_ops = &atmel_qspi_mem_ops;
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 546 ctrl->num_chipselect = 1;
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 547 ctrl->dev.of_node = pdev->dev.of_node;
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 548 platform_set_drvdata(pdev, ctrl);
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 549
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 550 aq = spi_controller_get_devdata(ctrl);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 551
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 552 init_completion(&aq->cmd_completion);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 553 aq->pdev = pdev;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 554
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 555 /* Map the registers */
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 556 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_base");
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 557 aq->regs = devm_ioremap_resource(&pdev->dev, res);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 558 if (IS_ERR(aq->regs)) {
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 559 dev_err(&pdev->dev, "missing registers\n");
87559c2497a3deb drivers/spi/atmel-quadspi.c Lukas Wunner 2020-11-05 560 return PTR_ERR(aq->regs);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 561 }
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 562
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 563 /* Map the AHB memory */
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 564 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_mmap");
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 565 aq->mem = devm_ioremap_resource(&pdev->dev, res);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 566 if (IS_ERR(aq->mem)) {
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 567 dev_err(&pdev->dev, "missing AHB memory\n");
87559c2497a3deb drivers/spi/atmel-quadspi.c Lukas Wunner 2020-11-05 568 return PTR_ERR(aq->mem);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 569 }
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 570
8e093ea4d359337 drivers/spi/atmel-quadspi.c Tudor Ambarus 2020-02-28 571 aq->mmap_size = resource_size(res);
8e093ea4d359337 drivers/spi/atmel-quadspi.c Tudor Ambarus 2020-02-28 572
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 573 /* Get the peripheral clock */
bd7905e2fed7047 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 574 aq->pclk = devm_clk_get(&pdev->dev, "pclk");
bd7905e2fed7047 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 575 if (IS_ERR(aq->pclk))
bd7905e2fed7047 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 576 aq->pclk = devm_clk_get(&pdev->dev, NULL);
bd7905e2fed7047 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 577
bd7905e2fed7047 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 578 if (IS_ERR(aq->pclk)) {
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 579 dev_err(&pdev->dev, "missing peripheral clock\n");
87559c2497a3deb drivers/spi/atmel-quadspi.c Lukas Wunner 2020-11-05 580 return PTR_ERR(aq->pclk);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 581 }
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 582
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 583 /* Enable the peripheral clock */
bd7905e2fed7047 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 584 err = clk_prepare_enable(aq->pclk);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 585 if (err) {
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 586 dev_err(&pdev->dev, "failed to enable the peripheral clock\n");
87559c2497a3deb drivers/spi/atmel-quadspi.c Lukas Wunner 2020-11-05 587 return err;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 588 }
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 589
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 590 aq->caps = of_device_get_match_data(&pdev->dev);
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 591 if (!aq->caps) {
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 592 dev_err(&pdev->dev, "Could not retrieve QSPI caps\n");
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 593 err = -EINVAL;
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 @594 goto exit;
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 595 }
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 596
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 597 if (aq->caps->has_qspick) {
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 598 /* Get the QSPI system clock */
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 599 aq->qspick = devm_clk_get(&pdev->dev, "qspick");
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 600 if (IS_ERR(aq->qspick)) {
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 601 dev_err(&pdev->dev, "missing system clock\n");
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 602 err = PTR_ERR(aq->qspick);
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 603 goto disable_pclk;
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 604 }
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 605
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 606 /* Enable the QSPI system clock */
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 607 err = clk_prepare_enable(aq->qspick);
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 608 if (err) {
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 609 dev_err(&pdev->dev,
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 610 "failed to enable the QSPI system clock\n");
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 611 goto disable_pclk;
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 612 }
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 613 }
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 614
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 615 /* Request the IRQ */
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 616 irq = platform_get_irq(pdev, 0);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 617 if (irq < 0) {
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 618 err = irq;
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 619 goto disable_qspick;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 620 }
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 621 err = devm_request_irq(&pdev->dev, irq, atmel_qspi_interrupt,
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 622 0, dev_name(&pdev->dev), aq);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 623 if (err)
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 624 goto disable_qspick;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 625
5b74e9a306267be drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-06-28 626 atmel_qspi_init(aq);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 627
2d30ac5ed633f5a drivers/mtd/spi-nor/atmel-quadspi.c Piotr Bugalski 2018-11-05 628 err = spi_register_controller(ctrl);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 629 if (err)
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 630 goto disable_qspick;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 631
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 632 return 0;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 633
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 634 disable_qspick:
2e5c88887358640 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 635 clk_disable_unprepare(aq->qspick);
bd7905e2fed7047 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 636 disable_pclk:
bd7905e2fed7047 drivers/spi/atmel-quadspi.c Tudor Ambarus 2019-02-05 637 clk_disable_unprepare(aq->pclk);
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 638
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 639 return err;
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 640 }
161aaab8a067a96 drivers/mtd/spi-nor/atmel-quadspi.c Cyrille Pitchen 2016-06-13 641
:::::: The code at line 594 was first introduced by commit
:::::: 2e5c888873586400e3e9197514995458c7f4c3e0 spi: atmel-quadspi: add support for sam9x60 qspi controller
:::::: TO: Tudor Ambarus <tudor.ambarus(a)microchip.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[netdev-net-next:master 181/184] drivers/vdpa/ifcvf/ifcvf_main.c:420:31: warning: shift count >= width of type
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git master
head: e1d9d7b91302593d1951fcb12feddda6fb58a3c0
commit: 85ce50d337d10a6fd328fa70b0a15543bf5c0f64 [181/184] net: kcov: don't select SKB_EXTENSIONS when there is no NET
config: arm64-randconfig-r032-20201113 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e0c35655b6e8186baef8840b26ba4090503b554)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commi...
git remote add netdev-net-next https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
git fetch --no-tags netdev-net-next master
git checkout 85ce50d337d10a6fd328fa70b0a15543bf5c0f64
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/vdpa/ifcvf/ifcvf_main.c:15:
In file included from drivers/vdpa/ifcvf/ifcvf_base.h:17:
In file included from include/uapi/linux/virtio_net.h:32:
In file included from include/linux/if_ether.h:19:
include/linux/skbuff.h:4622:26: error: implicit declaration of function 'skb_ext_add' [-Werror,-Wimplicit-function-declaration]
u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
^
include/linux/skbuff.h:4622:43: error: use of undeclared identifier 'SKB_EXT_KCOV_HANDLE'
u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
^
include/linux/skbuff.h:4631:21: error: implicit declaration of function 'skb_ext_find' [-Werror,-Wimplicit-function-declaration]
u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
^
include/linux/skbuff.h:4631:39: error: use of undeclared identifier 'SKB_EXT_KCOV_HANDLE'
u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
^
>> drivers/vdpa/ifcvf/ifcvf_main.c:420:31: warning: shift count >= width of type [-Wshift-count-overflow]
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/vdpa/ifcvf/ifcvf_main.c:426:42: warning: shift count >= width of type [-Wshift-count-overflow]
ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
2 warnings and 4 errors generated.
vim +420 drivers/vdpa/ifcvf/ifcvf_main.c
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 399
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 400 static int ifcvf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 401 {
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 402 struct device *dev = &pdev->dev;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 403 struct ifcvf_adapter *adapter;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 404 struct ifcvf_hw *vf;
3597a2fba672cfd drivers/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-07-31 405 int ret, i;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 406
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 407 ret = pcim_enable_device(pdev);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 408 if (ret) {
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 409 IFCVF_ERR(pdev, "Failed to enable device\n");
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 410 return ret;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 411 }
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 412
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 413 ret = pcim_iomap_regions(pdev, BIT(0) | BIT(2) | BIT(4),
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 414 IFCVF_DRIVER_NAME);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 415 if (ret) {
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 416 IFCVF_ERR(pdev, "Failed to request MMIO region\n");
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 417 return ret;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 418 }
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 419
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 @420 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 421 if (ret) {
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 422 IFCVF_ERR(pdev, "No usable DMA confiugration\n");
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 423 return ret;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 424 }
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 425
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 426 ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 427 if (ret) {
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 428 IFCVF_ERR(pdev,
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 429 "No usable coherent DMA confiugration\n");
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 430 return ret;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 431 }
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 432
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 433 ret = devm_add_action_or_reset(dev, ifcvf_free_irq_vectors, pdev);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 434 if (ret) {
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 435 IFCVF_ERR(pdev,
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 436 "Failed for adding devres for freeing irq vectors\n");
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 437 return ret;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 438 }
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 439
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 440 adapter = vdpa_alloc_device(struct ifcvf_adapter, vdpa,
a9974489b61c09c drivers/vdpa/ifcvf/ifcvf_main.c Max Gurtovoy 2020-08-04 441 dev, &ifc_vdpa_ops,
a9974489b61c09c drivers/vdpa/ifcvf/ifcvf_main.c Max Gurtovoy 2020-08-04 442 IFCVF_MAX_QUEUE_PAIRS * 2);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 443 if (adapter == NULL) {
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 444 IFCVF_ERR(pdev, "Failed to allocate vDPA structure");
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 445 return -ENOMEM;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 446 }
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 447
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 448 pci_set_master(pdev);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 449 pci_set_drvdata(pdev, adapter);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 450
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 451 vf = &adapter->vf;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 452 vf->base = pcim_iomap_table(pdev);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 453
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 454 adapter->pdev = pdev;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 455 adapter->vdpa.dma_dev = &pdev->dev;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 456
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 457 ret = ifcvf_init_hw(vf, pdev);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 458 if (ret) {
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 459 IFCVF_ERR(pdev, "Failed to init IFCVF hw\n");
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 460 goto err;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 461 }
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 462
3597a2fba672cfd drivers/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-07-31 463 for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++)
3597a2fba672cfd drivers/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-07-31 464 vf->vring[i].irq = -EINVAL;
3597a2fba672cfd drivers/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-07-31 465
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 466 ret = vdpa_register_device(&adapter->vdpa);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 467 if (ret) {
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 468 IFCVF_ERR(pdev, "Failed to register ifcvf to vdpa bus");
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 469 goto err;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 470 }
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 471
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 472 return 0;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 473
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 474 err:
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 475 put_device(&adapter->vdpa.dev);
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 476 return ret;
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 477 }
5a2414bc454e89e drivers/virtio/vdpa/ifcvf/ifcvf_main.c Zhu Lingshan 2020-03-26 478
:::::: The code at line 420 was first introduced by commit
:::::: 5a2414bc454e89e0515b47500734a65aa40cf9fe virtio: Intel IFC VF driver for VDPA
:::::: TO: Zhu Lingshan <lingshan.zhu(a)intel.com>
:::::: CC: Michael S. Tsirkin <mst(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[chrome-os:chromeos-4.19 27/50] drivers/gpu/drm/drm_hdcp.c:27:3: sparse: sparse: symbol 'srm_data' was not declared. Should it be
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: b9a3f5405fb3783912a70780b9f51b8942feed91
commit: 9602e2b071719b0f1e22a3a9ea2f5f3a6ba8f272 [27/50] UPSTREAM: drm: revocation check at drm subsystem
config: i386-randconfig-s031-20201113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-107-gaf3512a6-dirty
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.19
git checkout 9602e2b071719b0f1e22a3a9ea2f5f3a6ba8f272
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/gpu/drm/drm_hdcp.c:27:3: sparse: sparse: symbol 'srm_data' was not declared. Should it be static?
>> drivers/gpu/drm/drm_hdcp.c:235:6: sparse: sparse: symbol 'drm_hdcp_request_srm' was not declared. Should it be static?
drivers/gpu/drm/drm_hdcp.c:235:6: warning: no previous prototype for 'drm_hdcp_request_srm' [-Wmissing-prototypes]
235 | void drm_hdcp_request_srm(struct drm_device *drm_dev)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/drm_hdcp.c:317:5: warning: no previous prototype for 'drm_setup_hdcp_srm' [-Wmissing-prototypes]
317 | int drm_setup_hdcp_srm(struct class *drm_class)
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/drm_hdcp.c:327:6: warning: no previous prototype for 'drm_teardown_hdcp_srm' [-Wmissing-prototypes]
327 | void drm_teardown_hdcp_srm(struct class *drm_class)
| ^~~~~~~~~~~~~~~~~~~~~
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[netdev-net-next:master 181/184] include/linux/skbuff.h:4622:26: error: implicit declaration of function 'skb_ext_add'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git master
head: e1d9d7b91302593d1951fcb12feddda6fb58a3c0
commit: 85ce50d337d10a6fd328fa70b0a15543bf5c0f64 [181/184] net: kcov: don't select SKB_EXTENSIONS when there is no NET
config: s390-randconfig-r036-20201113 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e0c35655b6e8186baef8840b26ba4090503b554)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commi...
git remote add netdev-net-next https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
git fetch --no-tags netdev-net-next master
git checkout 85ce50d337d10a6fd328fa70b0a15543bf5c0f64
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from arch/s390/kernel/asm-offsets.c:11:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:36:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from arch/s390/kernel/asm-offsets.c:11:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:36:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from arch/s390/kernel/asm-offsets.c:11:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:36:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from arch/s390/kernel/asm-offsets.c:11:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:36:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
>> include/linux/skbuff.h:4622:26: error: implicit declaration of function 'skb_ext_add' [-Werror,-Wimplicit-function-declaration]
u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
^
>> include/linux/skbuff.h:4622:43: error: use of undeclared identifier 'SKB_EXT_KCOV_HANDLE'
u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
^
>> include/linux/skbuff.h:4631:21: error: implicit declaration of function 'skb_ext_find' [-Werror,-Wimplicit-function-declaration]
u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
^
include/linux/skbuff.h:4631:39: error: use of undeclared identifier 'SKB_EXT_KCOV_HANDLE'
u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
^
20 warnings and 4 errors generated.
make[2]: *** [scripts/Makefile.build:117: arch/s390/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1200: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/skb_ext_add +4622 include/linux/skbuff.h
2c64605b590edad Pablo Neira Ayuso 2020-03-25 4610
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4611 #ifdef CONFIG_KCOV
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4612 static inline void skb_set_kcov_handle(struct sk_buff *skb,
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4613 const u64 kcov_handle)
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4614 {
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4615 /* Do not allocate skb extensions only to set kcov_handle to zero
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4616 * (as it is zero by default). However, if the extensions are
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4617 * already allocated, update kcov_handle anyway since
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4618 * skb_set_kcov_handle can be called to zero a previously set
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4619 * value.
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4620 */
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4621 if (skb_has_extensions(skb) || kcov_handle) {
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 @4622 u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4623
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4624 if (kcov_handle_ptr)
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4625 *kcov_handle_ptr = kcov_handle;
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4626 }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4627 }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4628
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4629 static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4630 {
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 @4631 u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4632
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4633 return kcov_handle ? *kcov_handle : 0;
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4634 }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4635 #else
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4636 static inline void skb_set_kcov_handle(struct sk_buff *skb,
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4637 const u64 kcov_handle) { }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4638 static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4639 #endif /* CONFIG_KCOV */
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4640
:::::: The code at line 4622 was first introduced by commit
:::::: 6370cc3bbd8a0f9bf975b013781243ab147876c6 net: add kcov handle to skb extensions
:::::: TO: Aleksandr Nogikh <nogikh(a)google.com>
:::::: CC: Jakub Kicinski <kuba(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
arch/arm/include/asm/arch_gicv3.h:44:2: error: implicit declaration of function 'write_sysreg'
by kernel test robot
Hi Peng,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 585e5b17b92dead8a3aca4e3c9876fbca5f7e0ba
commit: d82bcef5157de1368c08244a846ab968b3e5cb7e soc: imx: select ARM_GIC_V3 for i.MX8M
date: 4 months ago
config: arm-randconfig-r005-20201113 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d82bcef5157de1368c08244a846ab968b3e5cb7e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/irqchip/arm-gic-v3.h:662,
from drivers/irqchip/irq-gic-v3.c:24:
arch/arm/include/asm/arch_gicv3.h: In function 'write_ICC_PMR_EL1':
>> arch/arm/include/asm/arch_gicv3.h:44:2: error: implicit declaration of function 'write_sysreg' [-Werror=implicit-function-declaration]
44 | write_sysreg(val, a32); \
| ^~~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:51:1: note: in expansion of macro 'CPUIF_MAP'
51 | CPUIF_MAP(ICC_PMR, ICC_PMR_EL1)
| ^~~~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:22:20: error: implicit declaration of function '__ACCESS_CP15' [-Werror=implicit-function-declaration]
22 | #define ICC_PMR __ACCESS_CP15(c4, 0, c6, 0)
| ^~~~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:51:11: note: in expansion of macro 'ICC_PMR'
51 | CPUIF_MAP(ICC_PMR, ICC_PMR_EL1)
| ^~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:22:34: error: 'c4' undeclared (first use in this function)
22 | #define ICC_PMR __ACCESS_CP15(c4, 0, c6, 0)
| ^~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:51:11: note: in expansion of macro 'ICC_PMR'
51 | CPUIF_MAP(ICC_PMR, ICC_PMR_EL1)
| ^~~~~~~
arch/arm/include/asm/arch_gicv3.h:22:34: note: each undeclared identifier is reported only once for each function it appears in
22 | #define ICC_PMR __ACCESS_CP15(c4, 0, c6, 0)
| ^~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:51:11: note: in expansion of macro 'ICC_PMR'
51 | CPUIF_MAP(ICC_PMR, ICC_PMR_EL1)
| ^~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:22:41: error: 'c6' undeclared (first use in this function)
22 | #define ICC_PMR __ACCESS_CP15(c4, 0, c6, 0)
| ^~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:51:11: note: in expansion of macro 'ICC_PMR'
51 | CPUIF_MAP(ICC_PMR, ICC_PMR_EL1)
| ^~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'read_ICC_PMR_EL1':
>> arch/arm/include/asm/arch_gicv3.h:48:9: error: implicit declaration of function 'read_sysreg' [-Werror=implicit-function-declaration]
48 | return read_sysreg(a32); \
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:51:1: note: in expansion of macro 'CPUIF_MAP'
51 | CPUIF_MAP(ICC_PMR, ICC_PMR_EL1)
| ^~~~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:22:34: error: 'c4' undeclared (first use in this function)
22 | #define ICC_PMR __ACCESS_CP15(c4, 0, c6, 0)
| ^~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:51:11: note: in expansion of macro 'ICC_PMR'
51 | CPUIF_MAP(ICC_PMR, ICC_PMR_EL1)
| ^~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:22:41: error: 'c6' undeclared (first use in this function)
22 | #define ICC_PMR __ACCESS_CP15(c4, 0, c6, 0)
| ^~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:51:11: note: in expansion of macro 'ICC_PMR'
51 | CPUIF_MAP(ICC_PMR, ICC_PMR_EL1)
| ^~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'write_ICC_AP0R0_EL1':
>> arch/arm/include/asm/arch_gicv3.h:29:40: error: 'c12' undeclared (first use in this function)
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:30:21: note: in expansion of macro '__ICC_AP0Rx'
30 | #define ICC_AP0R0 __ICC_AP0Rx(0)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:52:11: note: in expansion of macro 'ICC_AP0R0'
52 | CPUIF_MAP(ICC_AP0R0, ICC_AP0R0_EL1)
| ^~~~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:29:48: error: 'c8' undeclared (first use in this function); did you mean 'u8'?
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:30:21: note: in expansion of macro '__ICC_AP0Rx'
30 | #define ICC_AP0R0 __ICC_AP0Rx(0)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:52:11: note: in expansion of macro 'ICC_AP0R0'
52 | CPUIF_MAP(ICC_AP0R0, ICC_AP0R0_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'read_ICC_AP0R0_EL1':
>> arch/arm/include/asm/arch_gicv3.h:29:40: error: 'c12' undeclared (first use in this function)
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:30:21: note: in expansion of macro '__ICC_AP0Rx'
30 | #define ICC_AP0R0 __ICC_AP0Rx(0)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:52:11: note: in expansion of macro 'ICC_AP0R0'
52 | CPUIF_MAP(ICC_AP0R0, ICC_AP0R0_EL1)
| ^~~~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:29:48: error: 'c8' undeclared (first use in this function); did you mean 'u8'?
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:30:21: note: in expansion of macro '__ICC_AP0Rx'
30 | #define ICC_AP0R0 __ICC_AP0Rx(0)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:52:11: note: in expansion of macro 'ICC_AP0R0'
52 | CPUIF_MAP(ICC_AP0R0, ICC_AP0R0_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'write_ICC_AP0R1_EL1':
>> arch/arm/include/asm/arch_gicv3.h:29:40: error: 'c12' undeclared (first use in this function)
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:31:21: note: in expansion of macro '__ICC_AP0Rx'
31 | #define ICC_AP0R1 __ICC_AP0Rx(1)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:53:11: note: in expansion of macro 'ICC_AP0R1'
53 | CPUIF_MAP(ICC_AP0R1, ICC_AP0R1_EL1)
| ^~~~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:29:48: error: 'c8' undeclared (first use in this function); did you mean 'u8'?
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:31:21: note: in expansion of macro '__ICC_AP0Rx'
31 | #define ICC_AP0R1 __ICC_AP0Rx(1)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:53:11: note: in expansion of macro 'ICC_AP0R1'
53 | CPUIF_MAP(ICC_AP0R1, ICC_AP0R1_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'read_ICC_AP0R1_EL1':
>> arch/arm/include/asm/arch_gicv3.h:29:40: error: 'c12' undeclared (first use in this function)
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:31:21: note: in expansion of macro '__ICC_AP0Rx'
31 | #define ICC_AP0R1 __ICC_AP0Rx(1)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:53:11: note: in expansion of macro 'ICC_AP0R1'
53 | CPUIF_MAP(ICC_AP0R1, ICC_AP0R1_EL1)
| ^~~~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:29:48: error: 'c8' undeclared (first use in this function); did you mean 'u8'?
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:31:21: note: in expansion of macro '__ICC_AP0Rx'
31 | #define ICC_AP0R1 __ICC_AP0Rx(1)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:53:11: note: in expansion of macro 'ICC_AP0R1'
53 | CPUIF_MAP(ICC_AP0R1, ICC_AP0R1_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'write_ICC_AP0R2_EL1':
>> arch/arm/include/asm/arch_gicv3.h:29:40: error: 'c12' undeclared (first use in this function)
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:32:21: note: in expansion of macro '__ICC_AP0Rx'
32 | #define ICC_AP0R2 __ICC_AP0Rx(2)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:54:11: note: in expansion of macro 'ICC_AP0R2'
54 | CPUIF_MAP(ICC_AP0R2, ICC_AP0R2_EL1)
| ^~~~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:29:48: error: 'c8' undeclared (first use in this function); did you mean 'u8'?
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:32:21: note: in expansion of macro '__ICC_AP0Rx'
32 | #define ICC_AP0R2 __ICC_AP0Rx(2)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:54:11: note: in expansion of macro 'ICC_AP0R2'
54 | CPUIF_MAP(ICC_AP0R2, ICC_AP0R2_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'read_ICC_AP0R2_EL1':
>> arch/arm/include/asm/arch_gicv3.h:29:40: error: 'c12' undeclared (first use in this function)
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:32:21: note: in expansion of macro '__ICC_AP0Rx'
32 | #define ICC_AP0R2 __ICC_AP0Rx(2)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:54:11: note: in expansion of macro 'ICC_AP0R2'
54 | CPUIF_MAP(ICC_AP0R2, ICC_AP0R2_EL1)
| ^~~~~~~~~
>> arch/arm/include/asm/arch_gicv3.h:29:48: error: 'c8' undeclared (first use in this function); did you mean 'u8'?
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:32:21: note: in expansion of macro '__ICC_AP0Rx'
32 | #define ICC_AP0R2 __ICC_AP0Rx(2)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:54:11: note: in expansion of macro 'ICC_AP0R2'
54 | CPUIF_MAP(ICC_AP0R2, ICC_AP0R2_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'write_ICC_AP0R3_EL1':
>> arch/arm/include/asm/arch_gicv3.h:29:40: error: 'c12' undeclared (first use in this function)
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:33:21: note: in expansion of macro '__ICC_AP0Rx'
33 | #define ICC_AP0R3 __ICC_AP0Rx(3)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:55:11: note: in expansion of macro 'ICC_AP0R3'
55 | CPUIF_MAP(ICC_AP0R3, ICC_AP0R3_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:29:48: error: 'c8' undeclared (first use in this function); did you mean 'u8'?
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:33:21: note: in expansion of macro '__ICC_AP0Rx'
33 | #define ICC_AP0R3 __ICC_AP0Rx(3)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:55:11: note: in expansion of macro 'ICC_AP0R3'
55 | CPUIF_MAP(ICC_AP0R3, ICC_AP0R3_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'read_ICC_AP0R3_EL1':
arch/arm/include/asm/arch_gicv3.h:29:40: error: 'c12' undeclared (first use in this function)
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:33:21: note: in expansion of macro '__ICC_AP0Rx'
33 | #define ICC_AP0R3 __ICC_AP0Rx(3)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:55:11: note: in expansion of macro 'ICC_AP0R3'
55 | CPUIF_MAP(ICC_AP0R3, ICC_AP0R3_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:29:48: error: 'c8' undeclared (first use in this function); did you mean 'u8'?
29 | #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
| ^~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:33:21: note: in expansion of macro '__ICC_AP0Rx'
33 | #define ICC_AP0R3 __ICC_AP0Rx(3)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:55:11: note: in expansion of macro 'ICC_AP0R3'
55 | CPUIF_MAP(ICC_AP0R3, ICC_AP0R3_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'write_ICC_AP1R0_EL1':
arch/arm/include/asm/arch_gicv3.h:35:40: error: 'c12' undeclared (first use in this function)
35 | #define __ICC_AP1Rx(x) __ACCESS_CP15(c12, 0, c9, x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:36:21: note: in expansion of macro '__ICC_AP1Rx'
36 | #define ICC_AP1R0 __ICC_AP1Rx(0)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:56:11: note: in expansion of macro 'ICC_AP1R0'
56 | CPUIF_MAP(ICC_AP1R0, ICC_AP1R0_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:35:48: error: 'c9' undeclared (first use in this function)
35 | #define __ICC_AP1Rx(x) __ACCESS_CP15(c12, 0, c9, x)
| ^~
arch/arm/include/asm/arch_gicv3.h:44:20: note: in definition of macro 'CPUIF_MAP'
44 | write_sysreg(val, a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:36:21: note: in expansion of macro '__ICC_AP1Rx'
36 | #define ICC_AP1R0 __ICC_AP1Rx(0)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:56:11: note: in expansion of macro 'ICC_AP1R0'
56 | CPUIF_MAP(ICC_AP1R0, ICC_AP1R0_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'read_ICC_AP1R0_EL1':
arch/arm/include/asm/arch_gicv3.h:35:40: error: 'c12' undeclared (first use in this function)
35 | #define __ICC_AP1Rx(x) __ACCESS_CP15(c12, 0, c9, x)
| ^~~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:36:21: note: in expansion of macro '__ICC_AP1Rx'
36 | #define ICC_AP1R0 __ICC_AP1Rx(0)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:56:11: note: in expansion of macro 'ICC_AP1R0'
56 | CPUIF_MAP(ICC_AP1R0, ICC_AP1R0_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:35:48: error: 'c9' undeclared (first use in this function)
35 | #define __ICC_AP1Rx(x) __ACCESS_CP15(c12, 0, c9, x)
| ^~
arch/arm/include/asm/arch_gicv3.h:48:21: note: in definition of macro 'CPUIF_MAP'
48 | return read_sysreg(a32); \
| ^~~
arch/arm/include/asm/arch_gicv3.h:36:21: note: in expansion of macro '__ICC_AP1Rx'
36 | #define ICC_AP1R0 __ICC_AP1Rx(0)
| ^~~~~~~~~~~
arch/arm/include/asm/arch_gicv3.h:56:11: note: in expansion of macro 'ICC_AP1R0'
56 | CPUIF_MAP(ICC_AP1R0, ICC_AP1R0_EL1)
| ^~~~~~~~~
arch/arm/include/asm/arch_gicv3.h: In function 'write_ICC_AP1R1_EL1':
arch/arm/include/asm/arch_gicv3.h:35:40: error: 'c12' undeclared (first use in this function)
..
vim +/write_sysreg +44 arch/arm/include/asm/arch_gicv3.h
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 17
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 18 #define ICC_EOIR1 __ACCESS_CP15(c12, 0, c12, 1)
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 @19 #define ICC_DIR __ACCESS_CP15(c12, 0, c11, 1)
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 20 #define ICC_IAR1 __ACCESS_CP15(c12, 0, c12, 0)
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 @21 #define ICC_SGI1R __ACCESS_CP15_64(0, c12)
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 @22 #define ICC_PMR __ACCESS_CP15(c4, 0, c6, 0)
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 23 #define ICC_CTLR __ACCESS_CP15(c12, 0, c12, 4)
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 24 #define ICC_SRE __ACCESS_CP15(c12, 0, c12, 5)
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 25 #define ICC_IGRPEN1 __ACCESS_CP15(c12, 0, c12, 7)
91ef84428a86b75 Daniel Thompson 2016-08-19 26 #define ICC_BPR1 __ACCESS_CP15(c12, 0, c12, 3)
e99da7c6f51b487 Julien Thierry 2019-01-31 27 #define ICC_RPR __ACCESS_CP15(c12, 0, c11, 3)
d5cd50d318f70fc Jean-Philippe Brucker 2015-10-01 28
d6062a6d62c643a Marc Zyngier 2018-03-09 @29 #define __ICC_AP0Rx(x) __ACCESS_CP15(c12, 0, c8, 4 | x)
d6062a6d62c643a Marc Zyngier 2018-03-09 30 #define ICC_AP0R0 __ICC_AP0Rx(0)
d6062a6d62c643a Marc Zyngier 2018-03-09 31 #define ICC_AP0R1 __ICC_AP0Rx(1)
d6062a6d62c643a Marc Zyngier 2018-03-09 32 #define ICC_AP0R2 __ICC_AP0Rx(2)
d6062a6d62c643a Marc Zyngier 2018-03-09 33 #define ICC_AP0R3 __ICC_AP0Rx(3)
d6062a6d62c643a Marc Zyngier 2018-03-09 34
d6062a6d62c643a Marc Zyngier 2018-03-09 @35 #define __ICC_AP1Rx(x) __ACCESS_CP15(c12, 0, c9, x)
d6062a6d62c643a Marc Zyngier 2018-03-09 36 #define ICC_AP1R0 __ICC_AP1Rx(0)
d6062a6d62c643a Marc Zyngier 2018-03-09 37 #define ICC_AP1R1 __ICC_AP1Rx(1)
d6062a6d62c643a Marc Zyngier 2018-03-09 38 #define ICC_AP1R2 __ICC_AP1Rx(2)
d6062a6d62c643a Marc Zyngier 2018-03-09 39 #define ICC_AP1R3 __ICC_AP1Rx(3)
d6062a6d62c643a Marc Zyngier 2018-03-09 40
a078bedf17c2e43 Vladimir Murzin 2016-09-12 41 #define CPUIF_MAP(a32, a64) \
a078bedf17c2e43 Vladimir Murzin 2016-09-12 42 static inline void write_ ## a64(u32 val) \
a078bedf17c2e43 Vladimir Murzin 2016-09-12 43 { \
a078bedf17c2e43 Vladimir Murzin 2016-09-12 @44 write_sysreg(val, a32); \
a078bedf17c2e43 Vladimir Murzin 2016-09-12 45 } \
a078bedf17c2e43 Vladimir Murzin 2016-09-12 46 static inline u32 read_ ## a64(void) \
a078bedf17c2e43 Vladimir Murzin 2016-09-12 47 { \
a078bedf17c2e43 Vladimir Murzin 2016-09-12 @48 return read_sysreg(a32); \
a078bedf17c2e43 Vladimir Murzin 2016-09-12 49 } \
a078bedf17c2e43 Vladimir Murzin 2016-09-12 50
:::::: The code at line 44 was first introduced by commit
:::::: a078bedf17c2e43819fea54bdfd5793845142e3a ARM: gic-v3: Introduce 32-to-64-bit mappings for GICv3 cpu registers
:::::: TO: Vladimir Murzin <vladimir.murzin(a)arm.com>
:::::: CC: Christoffer Dall <christoffer.dall(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months