[xlnx:xlnx_rebase_v5.4 1102/1701] drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:45:9: error: implicit declaration of function 'in_be32'

kernel test robot lkp at intel.com
Thu Apr 1 23:04:45 BST 2021


tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head:   8540825db3d5519ef205a710515b7819b95eeb4f
commit: bbcf6f9bb1bc206330ca4d423e5a3966d8d82110 [1102/1701] net: xilinx: Add support for PL TSN IP features
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/Xilinx/linux-xlnx/commit/bbcf6f9bb1bc206330ca4d423e5a3966d8d82110
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx xlnx_rebase_v5.4
        git checkout bbcf6f9bb1bc206330ca4d423e5a3966d8d82110
        # save the attached .config to linux build tree
        make W=1 ARCH=um 

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

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

   cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c: In function 'xlnx_tod_read':
>> drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:45:9: error: implicit declaration of function 'in_be32' [-Werror=implicit-function-declaration]
      45 |  nsec = in_be32(timer->baseaddr + XTIMER1588_CURRENT_RTC_NS);
         |         ^~~~~~~
   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:18:
   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c: In function 'xlnx_rtc_offset_write':
   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:55:11: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'time64_t' {aka 'const long long int'} [-Wformat=]
      55 |  pr_debug("%s: sec: %ld nsec: %ld\n", __func__, ts->tv_sec, ts->tv_nsec);
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:288:21: note: in definition of macro 'pr_fmt'
     288 | #define pr_fmt(fmt) fmt
         |                     ^~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     143 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     153 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     336 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:55:2: note: in expansion of macro 'pr_debug'
      55 |  pr_debug("%s: sec: %ld nsec: %ld\n", __func__, ts->tv_sec, ts->tv_nsec);
         |  ^~~~~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:55:23: note: format string is defined here
      55 |  pr_debug("%s: sec: %ld nsec: %ld\n", __func__, ts->tv_sec, ts->tv_nsec);
         |                     ~~^
         |                       |
         |                       long int
         |                     %lld
>> drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:57:2: error: implicit declaration of function 'out_be32' [-Werror=implicit-function-declaration]
      57 |  out_be32((timer->baseaddr + XTIMER1588_RTC_OFFSET_SEC_H), 0);
         |  ^~~~~~~~
   cc1: some warnings being treated as errors
--
   cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
   In file included from include/linux/uaccess.h:11,
                    from include/linux/crypto.h:21,
                    from include/crypto/hash.h:11,
                    from include/linux/uio.h:10,
                    from include/linux/socket.h:8,
                    from include/linux/compat.h:15,
                    from include/linux/ethtool.h:17,
                    from include/linux/netdevice.h:37,
                    from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
   arch/um/include/asm/uaccess.h: In function '__access_ok':
   arch/um/include/asm/uaccess.h:17:29: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
      17 |    (((unsigned long) (addr) >= FIXADDR_USER_START) && \
         |                             ^~
   arch/um/include/asm/uaccess.h:45:3: note: in expansion of macro '__access_ok_vsyscall'
      45 |   __access_ok_vsyscall(addr, size) ||
         |   ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:24,
                    from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
   include/asm-generic/fixmap.h: In function 'fix_to_virt':
   include/asm-generic/fixmap.h:32:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
      32 |  BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
         |                   ^~
   include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
     330 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |  ^~~~~~~~~~~~~~~~
   include/asm-generic/fixmap.h:32:2: note: in expansion of macro 'BUILD_BUG_ON'
      32 |  BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
         |  ^~~~~~~~~~~~
   In file included from arch/um/include/asm/io.h:16,
                    from include/linux/scatterlist.h:9,
                    from include/linux/dma-mapping.h:11,
                    from include/linux/skbuff.h:31,
                    from include/linux/if_ether.h:19,
                    from include/uapi/linux/ethtool.h:19,
                    from include/linux/ethtool.h:18,
                    from include/linux/netdevice.h:37,
                    from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
   drivers/net/ethernet/xilinx/xilinx_tsn_switch.c: In function 'tsnswitch_probe':
>> include/asm-generic/io.h:127:32: warning: 'pmap' may be used uninitialized in this function [-Wmaybe-uninitialized]
     127 |  *(volatile u32 __force *)addr = value;
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:580:6: note: 'pmap' was declared here
     580 |  u32 pmap;
         |      ^~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for UIO_DMEM_GENIRQ
   Depends on UIO && HAS_DMA
   Selected by
   - UIO_XILINX_AI_ENGINE && UIO


vim +/in_be32 +45 drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c

    40	
    41	static void xlnx_tod_read(struct xlnx_ptp_timer *timer, struct timespec64 *ts)
    42	{
    43		u32 sec, nsec;
    44	
  > 45		nsec = in_be32(timer->baseaddr + XTIMER1588_CURRENT_RTC_NS);
    46		sec = in_be32(timer->baseaddr + XTIMER1588_CURRENT_RTC_SEC_L);
    47	
    48		ts->tv_sec = sec;
    49		ts->tv_nsec = nsec;
    50	}
    51	
    52	static void xlnx_rtc_offset_write(struct xlnx_ptp_timer *timer,
    53					  const struct timespec64 *ts)
    54	{
    55		pr_debug("%s: sec: %ld nsec: %ld\n", __func__, ts->tv_sec, ts->tv_nsec);
    56	
  > 57		out_be32((timer->baseaddr + XTIMER1588_RTC_OFFSET_SEC_H), 0);
    58		out_be32((timer->baseaddr + XTIMER1588_RTC_OFFSET_SEC_L),
    59			 (ts->tv_sec));
    60		out_be32((timer->baseaddr + XTIMER1588_RTC_OFFSET_NS), ts->tv_nsec);
    61	}
    62	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 22032 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210402/e61066b8/attachment-0001.gz>


More information about the linux-arm-kernel mailing list