linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [esmil:visionfive 57/62] drivers/soc/sifive/sifive_l2_cache.c:158:17: error: implicit declaration of function 'writeq'; did you mean 'writel'?
@ 2022-01-31 17:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-31 17:11 UTC (permalink / raw)
  To: Emil Renner Berthing; +Cc: kbuild-all, linux-kernel

Hi Emil,

First bad commit (maybe != root cause):

tree:   https://github.com/esmil/linux visionfive
head:   8c758048edfd830baceb991167131c9d55786544
commit: 8ee233dc08b97b5cde863d4be4f9b331ac586963 [57/62] RISC-V: Enable SIFIVE_L2_FLUSH for StarFive SoCs
config: riscv-randconfig-r003-20220131 (https://download.01.org/0day-ci/archive/20220201/202202010133.vBBeLOsj-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 11.2.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/esmil/linux/commit/8ee233dc08b97b5cde863d4be4f9b331ac586963
        git remote add esmil https://github.com/esmil/linux
        git fetch --no-tags esmil visionfive
        git checkout 8ee233dc08b97b5cde863d4be4f9b331ac586963
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpu/drm/starfive/ drivers/soc/sifive/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/soc/sifive/sifive_l2_cache.c: In function 'sifive_l2_flush64_range':
>> drivers/soc/sifive/sifive_l2_cache.c:158:17: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]
     158 |                 writeq(line, l2_base + SIFIVE_L2_FLUSH64);
         |                 ^~~~~~
         |                 writel
   cc1: some warnings being treated as errors
--
   In file included from include/asm-generic/bug.h:22,
                    from arch/riscv/include/asm/bug.h:83,
                    from include/linux/bug.h:5,
                    from include/linux/io.h:11,
                    from include/linux/dma-buf-map.h:9,
                    from include/linux/dma-buf.h:16,
                    from drivers/gpu/drm/starfive/starfive_drm_gem.c:5:
   drivers/gpu/drm/starfive/starfive_drm_gem.c: In function 'starfive_drm_gem_alloc_dma':
>> include/linux/kern_levels.h:5:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:418:25: note: in definition of macro 'printk_index_wrap'
     418 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/drm/drm_print.h:494:9: note: in expansion of macro 'printk'
     494 |         printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
         |         ^~~~~~
   include/linux/kern_levels.h:14:25: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO       KERN_SOH "6"    /* informational */
         |                         ^~~~~~~~
   include/drm/drm_print.h:494:22: note: in expansion of macro 'KERN_INFO'
     494 |         printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
         |                      ^~~~~
   include/drm/drm_print.h:498:9: note: in expansion of macro '_DRM_PRINTK'
     498 |         _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~
   drivers/gpu/drm/starfive/starfive_drm_gem.c:132:9: note: in expansion of macro 'DRM_INFO'
     132 |         DRM_INFO("dma_addr = 0x%llx, size = %lu\n", starfive_obj->dma_addr, obj->size);
         |         ^~~~~~~~
>> include/linux/kern_levels.h:5:25: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:418:25: note: in definition of macro 'printk_index_wrap'
     418 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/drm/drm_print.h:494:9: note: in expansion of macro 'printk'
     494 |         printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
         |         ^~~~~~
   include/linux/kern_levels.h:14:25: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO       KERN_SOH "6"    /* informational */
         |                         ^~~~~~~~
   include/drm/drm_print.h:494:22: note: in expansion of macro 'KERN_INFO'
     494 |         printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
         |                      ^~~~~
   include/drm/drm_print.h:498:9: note: in expansion of macro '_DRM_PRINTK'
     498 |         _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~
   drivers/gpu/drm/starfive/starfive_drm_gem.c:132:9: note: in expansion of macro 'DRM_INFO'
     132 |         DRM_INFO("dma_addr = 0x%llx, size = %lu\n", starfive_obj->dma_addr, obj->size);
         |         ^~~~~~~~
   At top level:
   drivers/gpu/drm/starfive/starfive_drm_gem.c:17:42: warning: 'mmap_mem_ops' defined but not used [-Wunused-const-variable=]
      17 | static const struct vm_operations_struct mmap_mem_ops = {
         |                                          ^~~~~~~~~~~~
--
   drivers/gpu/drm/starfive/starfive_drm_crtc.c: In function 'starfive_crtc_atomic_flush':
>> drivers/gpu/drm/starfive/starfive_drm_crtc.c:204:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     204 |         int ret;
         |             ^~~
   drivers/gpu/drm/starfive/starfive_drm_crtc.c: In function 'starfive_crtc_atomic_enable':
   drivers/gpu/drm/starfive/starfive_drm_crtc.c:221:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     221 |         int ret;
         |             ^~~
   drivers/gpu/drm/starfive/starfive_drm_crtc.c: At top level:
>> drivers/gpu/drm/starfive/starfive_drm_crtc.c:272:5: warning: no previous prototype for 'starfive_crtc_create' [-Wmissing-prototypes]
     272 | int starfive_crtc_create(struct drm_device *drm_dev,
         |     ^~~~~~~~~~~~~~~~~~~~
--
   drivers/gpu/drm/starfive/starfive_drm_vpp.c: In function 'vpp1_isr_handler':
>> drivers/gpu/drm/starfive/starfive_drm_vpp.c:590:13: warning: variable 'intr_status' set but not used [-Wunused-but-set-variable]
     590 |         u32 intr_status = 0;
         |             ^~~~~~~~~~~


vim +158 drivers/soc/sifive/sifive_l2_cache.c

a967a289f169695 arch/riscv/mm/sifive_l2_cache.c      Yash Shah          2019-05-06  126  
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  127  #ifdef CONFIG_SIFIVE_L2_FLUSH
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  128  void sifive_l2_flush64_range(unsigned long start, unsigned long len)
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  129  {
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  130  	unsigned long line;
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  131  
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  132  	if(!l2_base) {
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  133  		pr_warn("L2CACHE: base addr invalid, skipping flush\n");
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  134  		return;
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  135  	}
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  136  
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  137  	/* TODO: if (len == 0), skipping flush or going on? */
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  138  	if(!len) {
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  139  		pr_debug("L2CACHE: flush64 range @ 0x%lx(len:0)\n", start);
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  140  		return;
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  141  	}
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  142  
b4d19807f25f01a drivers/soc/sifive/sifive_l2_cache.c Atish Patra        2021-06-12  143  	len = len + (start % SIFIVE_L2_FLUSH64_LINE_LEN);
b4d19807f25f01a drivers/soc/sifive/sifive_l2_cache.c Atish Patra        2021-06-12  144  	start = ALIGN_DOWN(start, SIFIVE_L2_FLUSH64_LINE_LEN);
b4d19807f25f01a drivers/soc/sifive/sifive_l2_cache.c Atish Patra        2021-06-12  145  
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  146  	/* make sure the address is in the range */
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  147  	if(start < CONFIG_SIFIVE_L2_FLUSH_START ||
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  148  	   (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START +
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  149  			     CONFIG_SIFIVE_L2_FLUSH_SIZE)) {
e53ad16756cae6c drivers/soc/sifive/sifive_l2_cache.c Geert Uytterhoeven 2021-05-21  150  		WARN(1, "L2CACHE: flush64 out of range: %lx(%lx), skip flush\n",
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  151  		     start, len);
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  152  		return;
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  153  	}
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  154  
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  155  	mb();	/* sync */
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  156  	for (line = start; line < start + len;
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  157  	     line += SIFIVE_L2_FLUSH64_LINE_LEN) {
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08 @158  		writeq(line, l2_base + SIFIVE_L2_FLUSH64);
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  159  		mb();
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  160  	}
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  161  }
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  162  EXPORT_SYMBOL_GPL(sifive_l2_flush64_range);
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  163  #endif
601a2f4e945153e drivers/soc/sifive/sifive_l2_cache.c Tom                2021-01-08  164  

:::::: The code at line 158 was first introduced by commit
:::::: 601a2f4e945153ebae8645596eda50ea39369c88 sifive/sifive_l2_cache: Add sifive_l2_flush64_range function

:::::: TO: Tom <support@vamrs.com>
:::::: CC: Emil Renner Berthing <kernel@esmil.dk>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-31 17:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 17:11 [esmil:visionfive 57/62] drivers/soc/sifive/sifive_l2_cache.c:158:17: error: implicit declaration of function 'writeq'; did you mean 'writel'? kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).