[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202110182034.DBK4RVhn-lkp@intel.com>
Date: Mon, 18 Oct 2021 20:17:59 +0800
From: kernel test robot <lkp@...el.com>
To: Cai Huoqing <caihuoqing@...du.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
Bjorn Helgaas <helgaas@...nel.org>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: Remove the unused pci wrappers pci_pool_xxx()
Hi Cai,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on helgaas-pci/next]
[also build test ERROR on v5.15-rc6 next-20211018]
[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/Cai-Huoqing/PCI-Remove-the-unused-pci-wrappers-pci_pool_xxx/20211018-161828
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-randconfig-a014-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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/0day-ci/linux/commit/35cdbe7c76652cc75a170ef91c4dafac9773e8c0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cai-Huoqing/PCI-Remove-the-unused-pci-wrappers-pci_pool_xxx/20211018-161828
git checkout 35cdbe7c76652cc75a170ef91c4dafac9773e8c0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
>> drivers/misc/habanalabs/goya/goya.c:919:19: error: implicit declaration of function 'dma_pool_create' [-Werror,-Wimplicit-function-declaration]
hdev->dma_pool = dma_pool_create(dev_name(hdev->dev),
^
drivers/misc/habanalabs/goya/goya.c:919:19: note: did you mean 'gen_pool_create'?
include/linux/genalloc.h:96:25: note: 'gen_pool_create' declared here
extern struct gen_pool *gen_pool_create(int, int);
^
>> drivers/misc/habanalabs/goya/goya.c:919:17: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
hdev->dma_pool = dma_pool_create(dev_name(hdev->dev),
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/habanalabs/goya/goya.c:977:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(hdev->dma_pool);
^
drivers/misc/habanalabs/goya/goya.c:977:2: note: did you mean 'gen_pool_destroy'?
include/linux/genalloc.h:124:13: note: 'gen_pool_destroy' declared here
extern void gen_pool_destroy(struct gen_pool *);
^
drivers/misc/habanalabs/goya/goya.c:1001:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(hdev->dma_pool);
^
>> drivers/misc/habanalabs/goya/goya.c:3184:17: error: implicit declaration of function 'dma_pool_zalloc' [-Werror,-Wimplicit-function-declaration]
kernel_addr = dma_pool_zalloc(hdev->dma_pool, mem_flags, dma_handle);
^
drivers/misc/habanalabs/goya/goya.c:3184:17: note: did you mean 'gen_pool_alloc'?
include/linux/genalloc.h:151:29: note: 'gen_pool_alloc' declared here
static inline unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
^
>> drivers/misc/habanalabs/goya/goya.c:3184:14: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
kernel_addr = dma_pool_zalloc(hdev->dma_pool, mem_flags, dma_handle);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/habanalabs/goya/goya.c:3199:2: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(hdev->dma_pool, vaddr, fixed_dma_addr);
^
drivers/misc/habanalabs/goya/goya.c:3199:2: note: did you mean 'gen_pool_free'?
include/linux/genalloc.h:169:20: note: 'gen_pool_free' declared here
static inline void gen_pool_free(struct gen_pool *pool, unsigned long addr,
^
2 warnings and 5 errors generated.
--
>> drivers/misc/habanalabs/gaudi/gaudi.c:1845:19: error: implicit declaration of function 'dma_pool_create' [-Werror,-Wimplicit-function-declaration]
hdev->dma_pool = dma_pool_create(dev_name(hdev->dev),
^
drivers/misc/habanalabs/gaudi/gaudi.c:1845:19: note: did you mean 'gen_pool_create'?
include/linux/genalloc.h:96:25: note: 'gen_pool_create' declared here
extern struct gen_pool *gen_pool_create(int, int);
^
>> drivers/misc/habanalabs/gaudi/gaudi.c:1845:17: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
hdev->dma_pool = dma_pool_create(dev_name(hdev->dev),
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/habanalabs/gaudi/gaudi.c:1905:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(hdev->dma_pool);
^
drivers/misc/habanalabs/gaudi/gaudi.c:1905:2: note: did you mean 'gen_pool_destroy'?
include/linux/genalloc.h:124:13: note: 'gen_pool_destroy' declared here
extern void gen_pool_destroy(struct gen_pool *);
^
drivers/misc/habanalabs/gaudi/gaudi.c:1928:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(hdev->dma_pool);
^
>> drivers/misc/habanalabs/gaudi/gaudi.c:5057:16: error: implicit declaration of function 'dma_pool_zalloc' [-Werror,-Wimplicit-function-declaration]
kernel_addr = dma_pool_zalloc(hdev->dma_pool, mem_flags, dma_handle);
^
drivers/misc/habanalabs/gaudi/gaudi.c:5057:16: note: did you mean 'gen_pool_alloc'?
include/linux/genalloc.h:151:29: note: 'gen_pool_alloc' declared here
static inline unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
^
>> drivers/misc/habanalabs/gaudi/gaudi.c:5057:14: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
kernel_addr = dma_pool_zalloc(hdev->dma_pool, mem_flags, dma_handle);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/habanalabs/gaudi/gaudi.c:5072:2: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(hdev->dma_pool, vaddr, fixed_dma_addr);
^
drivers/misc/habanalabs/gaudi/gaudi.c:5072:2: note: did you mean 'gen_pool_free'?
include/linux/genalloc.h:169:20: note: 'gen_pool_free' declared here
static inline void gen_pool_free(struct gen_pool *pool, unsigned long addr,
^
2 warnings and 5 errors generated.
vim +/dma_pool_create +919 drivers/misc/habanalabs/goya/goya.c
c592c270fe1f24 Ohad Sharabi 2021-04-21 892
99b9d7b4970cf1 Oded Gabbay 2019-02-16 893 /*
99b9d7b4970cf1 Oded Gabbay 2019-02-16 894 * goya_sw_init - Goya software initialization code
99b9d7b4970cf1 Oded Gabbay 2019-02-16 895 *
99b9d7b4970cf1 Oded Gabbay 2019-02-16 896 * @hdev: pointer to hl_device structure
99b9d7b4970cf1 Oded Gabbay 2019-02-16 897 *
99b9d7b4970cf1 Oded Gabbay 2019-02-16 898 */
99b9d7b4970cf1 Oded Gabbay 2019-02-16 899 static int goya_sw_init(struct hl_device *hdev)
99b9d7b4970cf1 Oded Gabbay 2019-02-16 900 {
99b9d7b4970cf1 Oded Gabbay 2019-02-16 901 struct goya_device *goya;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 902 int rc;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 903
99b9d7b4970cf1 Oded Gabbay 2019-02-16 904 /* Allocate device structure */
99b9d7b4970cf1 Oded Gabbay 2019-02-16 905 goya = kzalloc(sizeof(*goya), GFP_KERNEL);
99b9d7b4970cf1 Oded Gabbay 2019-02-16 906 if (!goya)
99b9d7b4970cf1 Oded Gabbay 2019-02-16 907 return -ENOMEM;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 908
99b9d7b4970cf1 Oded Gabbay 2019-02-16 909 /* according to goya_init_iatu */
99b9d7b4970cf1 Oded Gabbay 2019-02-16 910 goya->ddr_bar_cur_addr = DRAM_PHYS_BASE;
d91389bc839d72 Oded Gabbay 2019-02-16 911
d91389bc839d72 Oded Gabbay 2019-02-16 912 goya->mme_clk = GOYA_PLL_FREQ_LOW;
d91389bc839d72 Oded Gabbay 2019-02-16 913 goya->tpc_clk = GOYA_PLL_FREQ_LOW;
d91389bc839d72 Oded Gabbay 2019-02-16 914 goya->ic_clk = GOYA_PLL_FREQ_LOW;
d91389bc839d72 Oded Gabbay 2019-02-16 915
99b9d7b4970cf1 Oded Gabbay 2019-02-16 916 hdev->asic_specific = goya;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 917
99b9d7b4970cf1 Oded Gabbay 2019-02-16 918 /* Create DMA pool for small allocations */
99b9d7b4970cf1 Oded Gabbay 2019-02-16 @919 hdev->dma_pool = dma_pool_create(dev_name(hdev->dev),
99b9d7b4970cf1 Oded Gabbay 2019-02-16 920 &hdev->pdev->dev, GOYA_DMA_POOL_BLK_SIZE, 8, 0);
99b9d7b4970cf1 Oded Gabbay 2019-02-16 921 if (!hdev->dma_pool) {
99b9d7b4970cf1 Oded Gabbay 2019-02-16 922 dev_err(hdev->dev, "failed to create DMA pool\n");
99b9d7b4970cf1 Oded Gabbay 2019-02-16 923 rc = -ENOMEM;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 924 goto free_goya_device;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 925 }
99b9d7b4970cf1 Oded Gabbay 2019-02-16 926
99b9d7b4970cf1 Oded Gabbay 2019-02-16 927 hdev->cpu_accessible_dma_mem =
d9c3aa8038c391 Oded Gabbay 2019-05-01 928 hdev->asic_funcs->asic_dma_alloc_coherent(hdev,
3110c60fdc7a5a Tomer Tayar 2019-03-04 929 HL_CPU_ACCESSIBLE_MEM_SIZE,
99b9d7b4970cf1 Oded Gabbay 2019-02-16 930 &hdev->cpu_accessible_dma_address,
99b9d7b4970cf1 Oded Gabbay 2019-02-16 931 GFP_KERNEL | __GFP_ZERO);
99b9d7b4970cf1 Oded Gabbay 2019-02-16 932
99b9d7b4970cf1 Oded Gabbay 2019-02-16 933 if (!hdev->cpu_accessible_dma_mem) {
99b9d7b4970cf1 Oded Gabbay 2019-02-16 934 rc = -ENOMEM;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 935 goto free_dma_pool;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 936 }
99b9d7b4970cf1 Oded Gabbay 2019-02-16 937
f62fa0ced46afc Arnd Bergmann 2019-07-08 938 dev_dbg(hdev->dev, "cpu accessible memory at bus address %pad\n",
f62fa0ced46afc Arnd Bergmann 2019-07-08 939 &hdev->cpu_accessible_dma_address);
2a51558c8c7f82 Oded Gabbay 2019-05-29 940
cbb10f1e4a7225 Oded Gabbay 2019-05-17 941 hdev->cpu_accessible_dma_pool = gen_pool_create(ilog2(32), -1);
99b9d7b4970cf1 Oded Gabbay 2019-02-16 942 if (!hdev->cpu_accessible_dma_pool) {
99b9d7b4970cf1 Oded Gabbay 2019-02-16 943 dev_err(hdev->dev,
99b9d7b4970cf1 Oded Gabbay 2019-02-16 944 "Failed to create CPU accessible DMA pool\n");
99b9d7b4970cf1 Oded Gabbay 2019-02-16 945 rc = -ENOMEM;
9f832fda79eb6e Tomer Tayar 2019-05-02 946 goto free_cpu_dma_mem;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 947 }
99b9d7b4970cf1 Oded Gabbay 2019-02-16 948
99b9d7b4970cf1 Oded Gabbay 2019-02-16 949 rc = gen_pool_add(hdev->cpu_accessible_dma_pool,
99b9d7b4970cf1 Oded Gabbay 2019-02-16 950 (uintptr_t) hdev->cpu_accessible_dma_mem,
3110c60fdc7a5a Tomer Tayar 2019-03-04 951 HL_CPU_ACCESSIBLE_MEM_SIZE, -1);
99b9d7b4970cf1 Oded Gabbay 2019-02-16 952 if (rc) {
99b9d7b4970cf1 Oded Gabbay 2019-02-16 953 dev_err(hdev->dev,
99b9d7b4970cf1 Oded Gabbay 2019-02-16 954 "Failed to add memory to CPU accessible DMA pool\n");
99b9d7b4970cf1 Oded Gabbay 2019-02-16 955 rc = -EFAULT;
ba209e1587227f Tomer Tayar 2019-05-02 956 goto free_cpu_accessible_dma_pool;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 957 }
99b9d7b4970cf1 Oded Gabbay 2019-02-16 958
99b9d7b4970cf1 Oded Gabbay 2019-02-16 959 spin_lock_init(&goya->hw_queues_lock);
9e5e49cd5b90cf Omer Shpigelman 2020-05-10 960 hdev->supports_coresight = true;
66446820df1864 Oded Gabbay 2020-05-18 961 hdev->supports_soft_reset = true;
23bace677a3d92 Ofir Bitton 2021-06-08 962 hdev->allow_external_soft_reset = true;
215f0c1775d550 Ohad Sharabi 2021-06-14 963 hdev->supports_wait_for_multi_cs = false;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 964
b9317d513098d0 Ohad Sharabi 2021-07-15 965 hdev->asic_funcs->set_pci_memory_regions(hdev);
c592c270fe1f24 Ohad Sharabi 2021-04-21 966
99b9d7b4970cf1 Oded Gabbay 2019-02-16 967 return 0;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 968
ba209e1587227f Tomer Tayar 2019-05-02 969 free_cpu_accessible_dma_pool:
99b9d7b4970cf1 Oded Gabbay 2019-02-16 970 gen_pool_destroy(hdev->cpu_accessible_dma_pool);
9f832fda79eb6e Tomer Tayar 2019-05-02 971 free_cpu_dma_mem:
d9c3aa8038c391 Oded Gabbay 2019-05-01 972 hdev->asic_funcs->asic_dma_free_coherent(hdev,
d9c3aa8038c391 Oded Gabbay 2019-05-01 973 HL_CPU_ACCESSIBLE_MEM_SIZE,
99b9d7b4970cf1 Oded Gabbay 2019-02-16 974 hdev->cpu_accessible_dma_mem,
99b9d7b4970cf1 Oded Gabbay 2019-02-16 975 hdev->cpu_accessible_dma_address);
99b9d7b4970cf1 Oded Gabbay 2019-02-16 976 free_dma_pool:
99b9d7b4970cf1 Oded Gabbay 2019-02-16 @977 dma_pool_destroy(hdev->dma_pool);
99b9d7b4970cf1 Oded Gabbay 2019-02-16 978 free_goya_device:
99b9d7b4970cf1 Oded Gabbay 2019-02-16 979 kfree(goya);
99b9d7b4970cf1 Oded Gabbay 2019-02-16 980
99b9d7b4970cf1 Oded Gabbay 2019-02-16 981 return rc;
99b9d7b4970cf1 Oded Gabbay 2019-02-16 982 }
99b9d7b4970cf1 Oded Gabbay 2019-02-16 983
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (31873 bytes)
Powered by blists - more mailing lists