[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211100927.KqgdMXnm-lkp@intel.com>
Date: Thu, 10 Nov 2022 09:28:31 +0800
From: kernel test robot <lkp@...el.com>
To: 'Guanjun' <guanjun@...ux.alibaba.com>, herbert@...dor.apana.org.au,
elliott@....com
Cc: oe-kbuild-all@...ts.linux.dev, zelin.deng@...ux.alibaba.com,
artie.ding@...ux.alibaba.com, guanjun@...ux.alibaba.com,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
xuchun.shang@...ux.alibaba.com
Subject: Re: [PATCH v3 RESEND 3/9] crypto/ycc: Add irq support for ycc kernel
rings
Hi 'Guanjun',
Thank you for the patch! Yet something to improve:
[auto build test ERROR on herbert-cryptodev-2.6/master]
[also build test ERROR on herbert-crypto-2.6/master linus/master v6.1-rc4 next-20221109]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Guanjun/Drivers-for-Alibaba-YCC-Yitian-Cryptography-Complex-cryptographic-accelerator/20221103-154448
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link: https://lore.kernel.org/r/1667461243-48652-4-git-send-email-guanjun%40linux.alibaba.com
patch subject: [PATCH v3 RESEND 3/9] crypto/ycc: Add irq support for ycc kernel rings
config: xtensa-allyesconfig
compiler: xtensa-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/3c2d80e20cfe81c871c54ee09dd7d8f64477f9fe
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Guanjun/Drivers-for-Alibaba-YCC-Yitian-Cryptography-Complex-cryptographic-accelerator/20221103-154448
git checkout 3c2d80e20cfe81c871c54ee09dd7d8f64477f9fe
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=xtensa SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from include/linux/pgtable.h:6,
from include/linux/kasan.h:33,
from include/linux/slab.h:148,
from include/linux/irq.h:21,
from include/asm-generic/hardirq.h:17,
from ./arch/xtensa/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from include/linux/pci.h:38,
from drivers/crypto/ycc/ycc_isr.c:8:
arch/xtensa/include/asm/pgtable.h:20:33: error: expected identifier before numeric constant
20 | #define USER_RING 1 /* user ring level */
| ^
drivers/crypto/ycc/ycc_ring.h:25:9: note: in expansion of macro 'USER_RING'
25 | USER_RING,
| ^~~~~~~~~
drivers/crypto/ycc/ycc_isr.c: In function 'ycc_alloc_irqs':
>> drivers/crypto/ycc/ycc_isr.c:119:44: error: 'KERN_RING' undeclared (first use in this function); did you mean 'KERNEL_RING'?
119 | if (ydev->rings[i].type != KERN_RING)
| ^~~~~~~~~
| KERNEL_RING
drivers/crypto/ycc/ycc_isr.c:119:44: note: each undeclared identifier is reported only once for each function it appears in
drivers/crypto/ycc/ycc_isr.c: In function 'ycc_free_irqs':
drivers/crypto/ycc/ycc_isr.c:175:44: error: 'KERN_RING' undeclared (first use in this function); did you mean 'KERNEL_RING'?
175 | if (ydev->rings[i].type != KERN_RING)
| ^~~~~~~~~
| KERNEL_RING
vim +119 drivers/crypto/ycc/ycc_isr.c
98
99 int ycc_alloc_irqs(struct ycc_dev *ydev)
100 {
101 struct pci_dev *rcec_pdev = ydev->assoc_dev->pdev;
102 int num = ydev->is_vf ? 1 : YCC_RINGPAIR_NUM;
103 int cpu, cpus = num_online_cpus();
104 int ret, i, j;
105
106 /* The 0 - (YCC_RINGPAIR_NUM-1) are rings irqs, the last one is dev error irq */
107 sprintf(ydev->err_irq_name, "ycc_dev_%d_global_err", ydev->id);
108 ret = request_irq(pci_irq_vector(rcec_pdev, num),
109 ycc_g_err_isr, 0, ydev->err_irq_name, ydev);
110 if (ret) {
111 pr_err("Failed to alloc global irq interrupt for dev: %d\n", ydev->id);
112 goto out;
113 }
114
115 if (ydev->is_polling)
116 goto out;
117
118 for (i = 0; i < num; i++) {
> 119 if (ydev->rings[i].type != KERN_RING)
120 continue;
121
122 ydev->msi_name[i] = kzalloc(16, GFP_KERNEL);
123 if (!ydev->msi_name[i])
124 goto free_irq;
125 snprintf(ydev->msi_name[i], 16, "ycc_ring_%d", i);
126 ret = request_irq(pci_irq_vector(rcec_pdev, i), ycc_resp_isr,
127 0, ydev->msi_name[i], &ydev->rings[i]);
128 if (ret) {
129 kfree(ydev->msi_name[i]);
130 goto free_irq;
131 }
132 if (!ydev->is_vf)
133 cpu = (i % YCC_RINGPAIR_NUM) % cpus;
134 else
135 cpu = smp_processor_id() % cpus;
136
137 ret = irq_set_affinity_hint(pci_irq_vector(rcec_pdev, i),
138 get_cpu_mask(cpu));
139 if (ret) {
140 free_irq(pci_irq_vector(rcec_pdev, i), &ydev->rings[i]);
141 kfree(ydev->msi_name[i]);
142 goto free_irq;
143 }
144 }
145
146 return 0;
147
148 free_irq:
149 for (j = 0; j < i; j++) {
150 if (ydev->rings[i].type != KERN_RING)
151 continue;
152
153 free_irq(pci_irq_vector(rcec_pdev, j), &ydev->rings[j]);
154 kfree(ydev->msi_name[j]);
155 }
156 free_irq(pci_irq_vector(rcec_pdev, num), ydev);
157 out:
158
159 return ret;
160 }
161
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (317405 bytes)
Powered by blists - more mailing lists