[soc:sunxi/rework-mbus 8/8] drivers/soc/sunxi/sunxi_mbus.c:93:8: error: implicit declaration of function 'dma_direct_set_offset'

kernel test robot lkp at intel.com
Tue Nov 24 10:20:06 EST 2020


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git sunxi/rework-mbus
head:   16fee29b07358293f135759d9fdbf1267da57ebd
commit: 16fee29b07358293f135759d9fdbf1267da57ebd [8/8] dma-mapping: remove the dma_direct_set_offset export
config: arm64-randconfig-r012-20201124 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project df9ae5992889560a8f3c6760b54d5051b47c7bf5)
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/soc/soc.git/commit/?id=16fee29b07358293f135759d9fdbf1267da57ebd
        git remote add soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
        git fetch --no-tags soc sunxi/rework-mbus
        git checkout 16fee29b07358293f135759d9fdbf1267da57ebd
        # 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 at intel.com>

All errors (new ones prefixed by >>):

>> drivers/soc/sunxi/sunxi_mbus.c:93:8: error: implicit declaration of function 'dma_direct_set_offset' [-Werror,-Wimplicit-function-declaration]
           ret = dma_direct_set_offset(dev, PHYS_OFFSET, 0, SZ_4G);
                 ^
   1 error generated.

vim +/dma_direct_set_offset +93 drivers/soc/sunxi/sunxi_mbus.c

b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  64  
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  65  static int sunxi_mbus_notifier(struct notifier_block *nb,
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  66  			       unsigned long event, void *__dev)
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  67  {
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  68  	struct device *dev = __dev;
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  69  	int ret;
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  70  
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  71  	if (event != BUS_NOTIFY_ADD_DEVICE)
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  72  		return NOTIFY_DONE;
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  73  
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  74  	/*
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  75  	 * Only the devices that need a large memory bandwidth do DMA
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  76  	 * directly over the memory bus (called MBUS), instead of going
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  77  	 * through the regular system bus.
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  78  	 */
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  79  	if (!of_device_compatible_match(dev->of_node, sunxi_mbus_devices))
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  80  		return NOTIFY_DONE;
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  81  
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  82  	/*
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  83  	 * Devices with an interconnects property have the MBUS
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  84  	 * relationship described in their DT and dealt with by
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  85  	 * of_dma_configure, so we can just skip them.
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  86  	 *
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  87  	 * Older DTs or SoCs who are not clearly understood need to set
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  88  	 * that DMA offset though.
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  89  	 */
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  90  	if (of_find_property(dev->of_node, "interconnects", NULL))
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  91  		return NOTIFY_DONE;
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  92  
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06 @93  	ret = dma_direct_set_offset(dev, PHYS_OFFSET, 0, SZ_4G);
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  94  	if (ret)
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  95  		dev_err(dev, "Couldn't setup our DMA offset: %d\n", ret);
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  96  
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  97  	return NOTIFY_DONE;
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  98  }
b4bdc4fbf8d0122 Maxime Ripard 2020-11-06  99  

:::::: The code at line 93 was first introduced by commit
:::::: b4bdc4fbf8d01227702068703ae2cd82ff25c3db soc: sunxi: Deal with the MBUS DMA offsets in a central place

:::::: TO: Maxime Ripard <maxime at cerno.tech>
:::::: CC: Maxime Ripard <maxime at cerno.tech>

---
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: 39518 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20201124/d03c7b08/attachment-0001.gz>


More information about the linux-arm-kernel mailing list