Re: [PATCH v3 14/14] crypto: sun8i-ce: Add support for the TRNG
by kernel test robot
Hi Corentin,
I love your patch! Perhaps something to improve:
[auto build test WARNING on sunxi/sunxi/for-next]
[also build test WARNING on cryptodev/master crypto/master v5.8-rc1]
[cannot apply to next-20200621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Corentin-Labbe/crypto-allwinner-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c:22:5: warning: no previous prototype for 'sun8i_ce_trng_read' [-Wmissing-prototypes]
22 | int sun8i_ce_trng_read(struct hwrng *rng, void *data, size_t max, bool wait)
| ^~~~~~~~~~~~~~~~~~
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c: In function 'sun8i_ce_hwrng_register':
>> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c:105:24: warning: comparison is always false due to limited range of data type [-Wtype-limits]
105 | if (ce->variant->trng == CE_ID_NOTSUPP) {
| ^~
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c: In function 'sun8i_ce_hwrng_unregister':
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c:121:24: warning: comparison is always false due to limited range of data type [-Wtype-limits]
121 | if (ce->variant->trng == CE_ID_NOTSUPP)
| ^~
vim +/sun8i_ce_trng_read +22 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
> 22 int sun8i_ce_trng_read(struct hwrng *rng, void *data, size_t max, bool wait)
23 {
24 struct sun8i_ce_dev *ce;
25 dma_addr_t dma_dst;
26 int err = 0;
27 int flow = 3;
28 unsigned int todo;
29 struct sun8i_ce_flow *chan;
30 struct ce_task *cet;
31 u32 common;
32 void *d;
33
34 ce = container_of(rng, struct sun8i_ce_dev, trng);
35
36 /* round the data length to a multiple of 32*/
37 todo = max + 32;
38 todo -= todo % 32;
39
40 d = kzalloc(todo, GFP_KERNEL | GFP_DMA);
41 if (!d)
42 return -ENOMEM;
43
44 #ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
45 ce->hwrng_stat_req++;
46 ce->hwrng_stat_bytes += todo;
47 #endif
48
49 dma_dst = dma_map_single(ce->dev, d, todo, DMA_FROM_DEVICE);
50 if (dma_mapping_error(ce->dev, dma_dst)) {
51 dev_err(ce->dev, "Cannot DMA MAP DST\n");
52 err = -EFAULT;
53 goto err_dst;
54 }
55
56 err = pm_runtime_get_sync(ce->dev);
57 if (err < 0)
58 goto err_pm;
59
60 mutex_lock(&ce->rnglock);
61 chan = &ce->chanlist[flow];
62
63 cet = &chan->tl[0];
64 memset(cet, 0, sizeof(struct ce_task));
65
66 cet->t_id = cpu_to_le32(flow);
67 common = ce->variant->trng | CE_COMM_INT;
68 cet->t_common_ctl = cpu_to_le32(common);
69
70 /* recent CE (H6) need length in bytes, in word otherwise */
71 if (ce->variant->trng_t_dlen_in_bytes)
72 cet->t_dlen = cpu_to_le32(todo);
73 else
74 cet->t_dlen = cpu_to_le32(todo / 4);
75
76 cet->t_sym_ctl = 0;
77 cet->t_asym_ctl = 0;
78
79 cet->t_dst[0].addr = cpu_to_le32(dma_dst);
80 cet->t_dst[0].len = cpu_to_le32(todo / 4);
81 ce->chanlist[flow].timeout = todo;
82
83 err = sun8i_ce_run_task(ce, 3, "TRNG");
84 mutex_unlock(&ce->rnglock);
85
86 pm_runtime_put(ce->dev);
87
88 err_pm:
89 dma_unmap_single(ce->dev, dma_dst, todo, DMA_FROM_DEVICE);
90
91 if (!err) {
92 memcpy(data, d, max);
93 err = max;
94 }
95 memzero_explicit(d, todo);
96 err_dst:
97 kfree(d);
98 return err;
99 }
100
101 int sun8i_ce_hwrng_register(struct sun8i_ce_dev *ce)
102 {
103 int ret;
104
> 105 if (ce->variant->trng == CE_ID_NOTSUPP) {
106 dev_info(ce->dev, "TRNG not supported\n");
107 return 0;
108 }
109 ce->trng.name = "sun8i Crypto Engine TRNG";
110 ce->trng.read = sun8i_ce_trng_read;
111 ce->trng.quality = 1000;
112
113 ret = hwrng_register(&ce->trng);
114 if (ret)
115 dev_err(ce->dev, "Fail to register the TRNG\n");
116 return ret;
117 }
118
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/scsi/myrs.c:2275:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 16f4aa9b7c2304e439796bd097b2c0a7663f5d6e
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 3 days ago
config: i386-randconfig-s002-20200622 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc2-13-gc59158c8-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/scsi/myrs.c:1532:5: sparse: sparse: symbol 'myrs_host_reset' was not declared. Should it be static?
drivers/scsi/myrs.c:1922:27: sparse: sparse: symbol 'myrs_template' was not declared. Should it be static?
drivers/scsi/myrs.c:2036:31: sparse: sparse: symbol 'myrs_raid_functions' was not declared. Should it be static?
drivers/scsi/myrs.c:2046:6: sparse: sparse: symbol 'myrs_flush_cache' was not declared. Should it be static?
>> drivers/scsi/myrs.c:2275:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *base @@ got struct myrs_hba *cs @@
>> drivers/scsi/myrs.c:2275:34: sparse: expected void [noderef] __iomem *base
drivers/scsi/myrs.c:2275:34: sparse: got struct myrs_hba *cs
drivers/scsi/myrs.c:2434:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2434:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2434:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2502:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2502:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2502:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2427:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2427:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2427:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2502:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2502:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2502:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2413:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2413:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2413:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2449:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] val @@ got unsigned int @@
drivers/scsi/myrs.c:2449:13: sparse: expected restricted __le32 [usertype] val
drivers/scsi/myrs.c:2449:13: sparse: got unsigned int
drivers/scsi/myrs.c:2549:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] val @@ got unsigned int @@
drivers/scsi/myrs.c:2549:13: sparse: expected restricted __le32 [usertype] val
drivers/scsi/myrs.c:2549:13: sparse: got unsigned int
drivers/scsi/myrs.c:2552:18: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/myrs.c:2427:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2427:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2427:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2495:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2495:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2495:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2472:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2472:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2472:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2441:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] val @@ got unsigned int @@
drivers/scsi/myrs.c:2441:13: sparse: expected restricted __le32 [usertype] val
drivers/scsi/myrs.c:2441:13: sparse: got unsigned int
drivers/scsi/myrs.c:2406:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2406:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2406:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2479:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] val @@ got unsigned int @@
drivers/scsi/myrs.c:2479:13: sparse: expected restricted __le32 [usertype] val
drivers/scsi/myrs.c:2479:13: sparse: got unsigned int
drivers/scsi/myrs.c:2457:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2457:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2457:16: sparse: got restricted __le32 [usertype] val
drivers/scsi/myrs.c:2413:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] val @@
drivers/scsi/myrs.c:2413:16: sparse: expected unsigned int val
drivers/scsi/myrs.c:2413:16: sparse: got restricted __le32 [usertype] val
--
>> drivers/scsi/fnic/vnic_dev.c:332:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
>> drivers/scsi/fnic/vnic_dev.c:332:32: sparse: expected void [noderef] __iomem *
drivers/scsi/fnic/vnic_dev.c:332:32: sparse: got unsigned int *
drivers/scsi/fnic/vnic_dev.c:333:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/scsi/fnic/vnic_dev.c:333:37: sparse: expected void [noderef] __iomem *
drivers/scsi/fnic/vnic_dev.c:333:37: sparse: got unsigned int *
drivers/scsi/fnic/vnic_dev.c:373:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/scsi/fnic/vnic_dev.c:373:36: sparse: expected void [noderef] __iomem *
drivers/scsi/fnic/vnic_dev.c:373:36: sparse: got unsigned int *
>> drivers/scsi/fnic/vnic_dev.c:469:32: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct vnic_wq_ctrl *wq_ctrl @@ got struct vnic_wq_ctrl [noderef] __iomem *ctrl @@
drivers/scsi/fnic/vnic_dev.c:469:32: sparse: expected struct vnic_wq_ctrl *wq_ctrl
>> drivers/scsi/fnic/vnic_dev.c:469:32: sparse: got struct vnic_wq_ctrl [noderef] __iomem *ctrl
>> drivers/scsi/fnic/vnic_dev.c:943:11: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *p @@ got void [noderef] __iomem * @@
drivers/scsi/fnic/vnic_dev.c:943:11: sparse: expected void *p
>> drivers/scsi/fnic/vnic_dev.c:943:11: sparse: got void [noderef] __iomem *
--
drivers/target/tcm_fc/tfc_sess.c:47:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> drivers/target/tcm_fc/tfc_sess.c:47:17: sparse: void [noderef] __rcu *
drivers/target/tcm_fc/tfc_sess.c:47:17: sparse: void *
drivers/target/tcm_fc/tfc_sess.c:72:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/target/tcm_fc/tfc_sess.c:72:9: sparse: void [noderef] __rcu *
drivers/target/tcm_fc/tfc_sess.c:72:9: sparse: void *
drivers/target/tcm_fc/tfc_sess.c:89:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/target/tcm_fc/tfc_sess.c:89:9: sparse: void [noderef] __rcu *
drivers/target/tcm_fc/tfc_sess.c:89:9: sparse: void *
drivers/target/tcm_fc/tfc_sess.c:166:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/target/tcm_fc/tfc_sess.c:166:17: sparse: void [noderef] __rcu *
drivers/target/tcm_fc/tfc_sess.c:166:17: sparse: void *
drivers/target/tcm_fc/tfc_sess.c:456:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/target/tcm_fc/tfc_sess.c:456:17: sparse: void [noderef] __rcu *
drivers/target/tcm_fc/tfc_sess.c:456:17: sparse: void *
--
>> drivers/scsi/mpt3sas/mpt3sas_base.c:1635:64: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
drivers/scsi/mpt3sas/mpt3sas_base.c:1635:64: sparse: expected void volatile [noderef] __iomem *addr
drivers/scsi/mpt3sas/mpt3sas_base.c:1635:64: sparse: got unsigned int [usertype] *
drivers/scsi/mpt3sas/mpt3sas_base.c:1689:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
drivers/scsi/mpt3sas/mpt3sas_base.c:1689:52: sparse: expected void volatile [noderef] __iomem *addr
drivers/scsi/mpt3sas/mpt3sas_base.c:1689:52: sparse: got unsigned int [usertype] *
drivers/scsi/mpt3sas/mpt3sas_base.c:4021:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@
drivers/scsi/mpt3sas/mpt3sas_base.c:4021:16: sparse: expected unsigned int val
drivers/scsi/mpt3sas/mpt3sas_base.c:4021:16: sparse: got restricted __le32 [usertype]
drivers/scsi/mpt3sas/mpt3sas_base.c:4043:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@
drivers/scsi/mpt3sas/mpt3sas_base.c:4043:16: sparse: expected unsigned int val
drivers/scsi/mpt3sas/mpt3sas_base.c:4043:16: sparse: got restricted __le32 [usertype]
drivers/scsi/mpt3sas/mpt3sas_base.c:4066:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@
drivers/scsi/mpt3sas/mpt3sas_base.c:4066:16: sparse: expected unsigned int val
drivers/scsi/mpt3sas/mpt3sas_base.c:4066:16: sparse: got restricted __le32 [usertype]
drivers/scsi/mpt3sas/mpt3sas_base.c:4087:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@
drivers/scsi/mpt3sas/mpt3sas_base.c:4087:16: sparse: expected unsigned int val
drivers/scsi/mpt3sas/mpt3sas_base.c:4087:16: sparse: got restricted __le32 [usertype]
drivers/scsi/mpt3sas/mpt3sas_base.c:5917:24: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@
drivers/scsi/mpt3sas/mpt3sas_base.c:5917:24: sparse: expected unsigned int val
drivers/scsi/mpt3sas/mpt3sas_base.c:5917:24: sparse: got restricted __le32 [usertype]
drivers/scsi/mpt3sas/mpt3sas_base.c:5936:20: sparse: sparse: cast to restricted __le16
drivers/scsi/mpt3sas/mpt3sas_base.c:5944:20: sparse: sparse: cast to restricted __le16
drivers/scsi/mpt3sas/mpt3sas_base.c:5957:36: sparse: sparse: cast to restricted __le16
drivers/scsi/mpt3sas/mpt3sas_base.c:7090:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
drivers/scsi/mpt3sas/mpt3sas_base.c:7090:55: sparse: expected void volatile [noderef] __iomem *addr
drivers/scsi/mpt3sas/mpt3sas_base.c:7090:55: sparse: got unsigned int [usertype] *
vim +2275 drivers/scsi/myrs.c
77266186397c6c Hannes Reinecke 2018-10-17 2266
77266186397c6c Hannes Reinecke 2018-10-17 2267 static void myrs_cleanup(struct myrs_hba *cs)
77266186397c6c Hannes Reinecke 2018-10-17 2268 {
77266186397c6c Hannes Reinecke 2018-10-17 2269 struct pci_dev *pdev = cs->pdev;
77266186397c6c Hannes Reinecke 2018-10-17 2270
77266186397c6c Hannes Reinecke 2018-10-17 2271 /* Free the memory mailbox, status, and related structures */
77266186397c6c Hannes Reinecke 2018-10-17 2272 myrs_unmap(cs);
77266186397c6c Hannes Reinecke 2018-10-17 2273
77266186397c6c Hannes Reinecke 2018-10-17 2274 if (cs->mmio_base) {
77266186397c6c Hannes Reinecke 2018-10-17 @2275 cs->disable_intr(cs);
77266186397c6c Hannes Reinecke 2018-10-17 2276 iounmap(cs->mmio_base);
77266186397c6c Hannes Reinecke 2018-10-17 2277 }
77266186397c6c Hannes Reinecke 2018-10-17 2278 if (cs->irq)
77266186397c6c Hannes Reinecke 2018-10-17 2279 free_irq(cs->irq, cs);
77266186397c6c Hannes Reinecke 2018-10-17 2280 if (cs->io_addr)
77266186397c6c Hannes Reinecke 2018-10-17 2281 release_region(cs->io_addr, 0x80);
77266186397c6c Hannes Reinecke 2018-10-17 2282 iounmap(cs->mmio_base);
77266186397c6c Hannes Reinecke 2018-10-17 2283 pci_set_drvdata(pdev, NULL);
77266186397c6c Hannes Reinecke 2018-10-17 2284 pci_disable_device(pdev);
77266186397c6c Hannes Reinecke 2018-10-17 2285 scsi_host_put(cs->host);
77266186397c6c Hannes Reinecke 2018-10-17 2286 }
77266186397c6c Hannes Reinecke 2018-10-17 2287
:::::: The code at line 2275 was first introduced by commit
:::::: 77266186397c6c782a3f670d32808a9671806ec5 scsi: myrs: Add Mylex RAID controller (SCSI interface)
:::::: TO: Hannes Reinecke <hare(a)suse.com>
:::::: CC: Martin K. Petersen <martin.petersen(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v3 13/14] crypto: sun8i-ce: Add support for the PRNG
by kernel test robot
Hi Corentin,
I love your patch! Perhaps something to improve:
[auto build test WARNING on sunxi/sunxi/for-next]
[also build test WARNING on cryptodev/master crypto/master v5.8-rc1]
[cannot apply to next-20200621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Corentin-Labbe/crypto-allwinner-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c: In function 'sun8i_ce_register_algs':
>> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c:818:26: warning: comparison is always false due to limited range of data type [-Wtype-limits]
818 | if (ce->variant->prng == CE_ID_NOTSUPP) {
| ^~
vim +818 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
761
762 static int sun8i_ce_register_algs(struct sun8i_ce_dev *ce)
763 {
764 int ce_method, err, id, i;
765
766 for (i = 0; i < ARRAY_SIZE(ce_algs); i++) {
767 ce_algs[i].ce = ce;
768 switch (ce_algs[i].type) {
769 case CRYPTO_ALG_TYPE_SKCIPHER:
770 id = ce_algs[i].ce_algo_id;
771 ce_method = ce->variant->alg_cipher[id];
772 if (ce_method == CE_ID_NOTSUPP) {
773 dev_dbg(ce->dev,
774 "DEBUG: Algo of %s not supported\n",
775 ce_algs[i].alg.skcipher.base.cra_name);
776 ce_algs[i].ce = NULL;
777 break;
778 }
779 id = ce_algs[i].ce_blockmode;
780 ce_method = ce->variant->op_mode[id];
781 if (ce_method == CE_ID_NOTSUPP) {
782 dev_dbg(ce->dev, "DEBUG: Blockmode of %s not supported\n",
783 ce_algs[i].alg.skcipher.base.cra_name);
784 ce_algs[i].ce = NULL;
785 break;
786 }
787 dev_info(ce->dev, "Register %s\n",
788 ce_algs[i].alg.skcipher.base.cra_name);
789 err = crypto_register_skcipher(&ce_algs[i].alg.skcipher);
790 if (err) {
791 dev_err(ce->dev, "ERROR: Fail to register %s\n",
792 ce_algs[i].alg.skcipher.base.cra_name);
793 ce_algs[i].ce = NULL;
794 return err;
795 }
796 break;
797 case CRYPTO_ALG_TYPE_AHASH:
798 id = ce_algs[i].ce_algo_id;
799 ce_method = ce->variant->alg_hash[id];
800 if (ce_method == CE_ID_NOTSUPP) {
801 dev_info(ce->dev,
802 "DEBUG: Algo of %s not supported\n",
803 ce_algs[i].alg.hash.halg.base.cra_name);
804 ce_algs[i].ce = NULL;
805 break;
806 }
807 dev_info(ce->dev, "Register %s\n",
808 ce_algs[i].alg.hash.halg.base.cra_name);
809 err = crypto_register_ahash(&ce_algs[i].alg.hash);
810 if (err) {
811 dev_err(ce->dev, "ERROR: Fail to register %s\n",
812 ce_algs[i].alg.hash.halg.base.cra_name);
813 ce_algs[i].ce = NULL;
814 return err;
815 }
816 break;
817 case CRYPTO_ALG_TYPE_RNG:
> 818 if (ce->variant->prng == CE_ID_NOTSUPP) {
819 dev_info(ce->dev,
820 "DEBUG: Algo of %s not supported\n",
821 ce_algs[i].alg.rng.base.cra_name);
822 ce_algs[i].ce = NULL;
823 break;
824 }
825 dev_info(ce->dev, "Register %s\n",
826 ce_algs[i].alg.rng.base.cra_name);
827 err = crypto_register_rng(&ce_algs[i].alg.rng);
828 if (err) {
829 dev_err(ce->dev, "Fail to register %s\n",
830 ce_algs[i].alg.rng.base.cra_name);
831 ce_algs[i].ce = NULL;
832 }
833 break;
834 default:
835 ce_algs[i].ce = NULL;
836 dev_err(ce->dev, "ERROR: tried to register an unknown algo\n");
837 }
838 }
839 return 0;
840 }
841
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[ebiggers:wip-inline-encryption 9974/9999] drivers/soc/qcom/rpmh-rsc.c:491:3: error: implicit declaration of function 'trace_rpmh_send_msg_rcuidle'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git wip-inline-encryption
head: 3455f60bc837b8b07c981de9f2cde8d757976433
commit: 89e6d5477a78f3b0577c34a470dde58047858a65 [9974/9999] soc: qcom: rpmh: Allow RPMH driver to be loaded as a module
config: x86_64-allmodconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project ef455a55bcf2cfea04a99c361b182ad18b7f03f1)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 89e6d5477a78f3b0577c34a470dde58047858a65
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/soc/qcom/rpmh-rsc.c:491:3: error: implicit declaration of function 'trace_rpmh_send_msg_rcuidle' [-Werror,-Wimplicit-function-declaration]
trace_rpmh_send_msg_rcuidle(drv, tcs_id, j, msgid, cmd);
^
drivers/soc/qcom/rpmh-rsc.c:491:3: note: did you mean 'trace_rpmh_send_msg_enabled'?
drivers/soc/qcom/./trace-rpmh.h:42:1: note: 'trace_rpmh_send_msg_enabled' declared here
TRACE_EVENT(rpmh_send_msg,
^
include/linux/tracepoint.h:512:2: note: expanded from macro 'TRACE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:376:2: note: expanded from macro 'DECLARE_TRACE'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^
include/linux/tracepoint.h:271:2: note: expanded from macro '__DECLARE_TRACE'
trace_##name##_enabled(void) \
^
<scratch space>:171:1: note: expanded from here
trace_rpmh_send_msg_enabled
^
1 error generated.
vim +/trace_rpmh_send_msg_rcuidle +491 drivers/soc/qcom/rpmh-rsc.c
658628e7ef78e8 Lina Iyer 2018-06-20 455
e40b0c1628f279 Douglas Anderson 2020-04-13 456 /**
e40b0c1628f279 Douglas Anderson 2020-04-13 457 * __tcs_buffer_write() - Write to TCS hardware from a request; don't trigger.
e40b0c1628f279 Douglas Anderson 2020-04-13 458 * @drv: The controller.
e40b0c1628f279 Douglas Anderson 2020-04-13 459 * @tcs_id: The global ID of this TCS.
e40b0c1628f279 Douglas Anderson 2020-04-13 460 * @cmd_id: The index within the TCS to start writing.
e40b0c1628f279 Douglas Anderson 2020-04-13 461 * @msg: The message we want to send, which will contain several addr/data
e40b0c1628f279 Douglas Anderson 2020-04-13 462 * pairs to program (but few enough that they all fit in one TCS).
e40b0c1628f279 Douglas Anderson 2020-04-13 463 *
e40b0c1628f279 Douglas Anderson 2020-04-13 464 * This is used for all types of transfers (active, sleep, and wake).
e40b0c1628f279 Douglas Anderson 2020-04-13 465 */
658628e7ef78e8 Lina Iyer 2018-06-20 466 static void __tcs_buffer_write(struct rsc_drv *drv, int tcs_id, int cmd_id,
658628e7ef78e8 Lina Iyer 2018-06-20 467 const struct tcs_request *msg)
658628e7ef78e8 Lina Iyer 2018-06-20 468 {
658628e7ef78e8 Lina Iyer 2018-06-20 469 u32 msgid, cmd_msgid;
658628e7ef78e8 Lina Iyer 2018-06-20 470 u32 cmd_enable = 0;
658628e7ef78e8 Lina Iyer 2018-06-20 471 u32 cmd_complete;
658628e7ef78e8 Lina Iyer 2018-06-20 472 struct tcs_cmd *cmd;
658628e7ef78e8 Lina Iyer 2018-06-20 473 int i, j;
658628e7ef78e8 Lina Iyer 2018-06-20 474
658628e7ef78e8 Lina Iyer 2018-06-20 475 cmd_msgid = CMD_MSGID_LEN;
658628e7ef78e8 Lina Iyer 2018-06-20 476 cmd_msgid |= msg->wait_for_compl ? CMD_MSGID_RESP_REQ : 0;
658628e7ef78e8 Lina Iyer 2018-06-20 477 cmd_msgid |= CMD_MSGID_WRITE;
658628e7ef78e8 Lina Iyer 2018-06-20 478
3b5e3d50f83a37 Douglas Anderson 2020-04-13 479 cmd_complete = read_tcs_reg(drv, RSC_DRV_CMD_WAIT_FOR_CMPL, tcs_id);
658628e7ef78e8 Lina Iyer 2018-06-20 480
658628e7ef78e8 Lina Iyer 2018-06-20 481 for (i = 0, j = cmd_id; i < msg->num_cmds; i++, j++) {
658628e7ef78e8 Lina Iyer 2018-06-20 482 cmd = &msg->cmds[i];
658628e7ef78e8 Lina Iyer 2018-06-20 483 cmd_enable |= BIT(j);
658628e7ef78e8 Lina Iyer 2018-06-20 484 cmd_complete |= cmd->wait << j;
658628e7ef78e8 Lina Iyer 2018-06-20 485 msgid = cmd_msgid;
658628e7ef78e8 Lina Iyer 2018-06-20 486 msgid |= cmd->wait ? CMD_MSGID_RESP_REQ : 0;
fc087fe5a45e72 Lina Iyer 2018-06-20 487
658628e7ef78e8 Lina Iyer 2018-06-20 488 write_tcs_cmd(drv, RSC_DRV_CMD_MSGID, tcs_id, j, msgid);
658628e7ef78e8 Lina Iyer 2018-06-20 489 write_tcs_cmd(drv, RSC_DRV_CMD_ADDR, tcs_id, j, cmd->addr);
658628e7ef78e8 Lina Iyer 2018-06-20 490 write_tcs_cmd(drv, RSC_DRV_CMD_DATA, tcs_id, j, cmd->data);
efde2659b0fe83 Stephen Boyd 2020-01-14 @491 trace_rpmh_send_msg_rcuidle(drv, tcs_id, j, msgid, cmd);
658628e7ef78e8 Lina Iyer 2018-06-20 492 }
658628e7ef78e8 Lina Iyer 2018-06-20 493
658628e7ef78e8 Lina Iyer 2018-06-20 494 write_tcs_reg(drv, RSC_DRV_CMD_WAIT_FOR_CMPL, tcs_id, cmd_complete);
3b5e3d50f83a37 Douglas Anderson 2020-04-13 495 cmd_enable |= read_tcs_reg(drv, RSC_DRV_CMD_ENABLE, tcs_id);
658628e7ef78e8 Lina Iyer 2018-06-20 496 write_tcs_reg(drv, RSC_DRV_CMD_ENABLE, tcs_id, cmd_enable);
658628e7ef78e8 Lina Iyer 2018-06-20 497 }
658628e7ef78e8 Lina Iyer 2018-06-20 498
:::::: The code at line 491 was first introduced by commit
:::::: efde2659b0fe835732047357b2902cca14f054d9 drivers: qcom: rpmh-rsc: Use rcuidle tracepoints for rpmh
:::::: TO: Stephen Boyd <swboyd(a)chromium.org>
:::::: CC: Bjorn Andersson <bjorn.andersson(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v3 08/14] crypto: sun8i-ce: split into prepare/run/unprepare
by kernel test robot
Hi Corentin,
I love your patch! Perhaps something to improve:
[auto build test WARNING on sunxi/sunxi/for-next]
[also build test WARNING on cryptodev/master crypto/master v5.8-rc1]
[cannot apply to next-20200621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Corentin-Labbe/crypto-allwinner-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project ef455a55bcf2cfea04a99c361b182ad18b7f03f1)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:277:5: warning: no previous prototype for function 'sun8i_ce_cipher_run' [-Wmissing-prototypes]
int sun8i_ce_cipher_run(struct crypto_engine *engine, void *areq)
^
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:277:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sun8i_ce_cipher_run(struct crypto_engine *engine, void *areq)
^
static
1 warning generated.
vim +/sun8i_ce_cipher_run +277 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
276
> 277 int sun8i_ce_cipher_run(struct crypto_engine *engine, void *areq)
278 {
279 struct skcipher_request *breq = container_of(areq, struct skcipher_request, base);
280 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(breq);
281 struct sun8i_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm);
282 struct sun8i_ce_dev *ce = op->ce;
283 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(breq);
284 int flow, err;
285
286 flow = rctx->flow;
287 err = sun8i_ce_run_task(ce, flow, crypto_tfm_alg_name(breq->base.tfm));
288 crypto_finalize_skcipher_request(engine, breq, err);
289 return 0;
290 }
291
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[mlankhorst:locking-rework 26/27] include/linux/dma-resv.h:80:28: error: implicit declaration of function 'lockdep_is_held'; did you mean
by kernel test robot
tree: git://people.freedesktop.org/~mlankhorst/linux locking-rework
head: 500c1dc1795a3abb508252aef3fbbef0053f84d4
commit: 0be88c62774a10ec2522a9121affa316b9cb4b4b [26/27] drm/i915: Ensure we hold the pin mutex
config: i386-randconfig-a015-20200621 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 0be88c62774a10ec2522a9121affa316b9cb4b4b
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/sched/mm.h:7,
from drivers/gpu/drm/i915/i915_vma.c:25:
drivers/gpu/drm/i915/i915_vma.c: In function 'i915_ggtt_pin':
>> include/linux/dma-resv.h:80:28: error: implicit declaration of function 'lockdep_is_held'; did you mean 'lockdep_assert_held'? [-Werror=implicit-function-declaration]
80 | #define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
| ^~~~~~~~~~~~~~~
include/asm-generic/bug.h:122:25: note: in definition of macro 'WARN'
122 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
drivers/gpu/drm/i915/i915_vma.c:1011:2: note: in expansion of macro 'WARN_ON'
1011 | WARN_ON(!ww && vma->resv && dma_resv_held(vma->resv));
| ^~~~~~~
drivers/gpu/drm/i915/i915_vma.c:1011:30: note: in expansion of macro 'dma_resv_held'
1011 | WARN_ON(!ww && vma->resv && dma_resv_held(vma->resv));
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +80 include/linux/dma-resv.h
786d7257e537da include/linux/reservation.h Maarten Lankhorst 2013-06-27 79
52791eeec1d9f4 include/linux/dma-resv.h Christian König 2019-08-11 @80 #define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
52791eeec1d9f4 include/linux/dma-resv.h Christian König 2019-08-11 81 #define dma_resv_assert_held(obj) lockdep_assert_held(&(obj)->lock.base)
04a5faa8cbe5a8 include/linux/reservation.h Maarten Lankhorst 2014-07-01 82
:::::: The code at line 80 was first introduced by commit
:::::: 52791eeec1d9f4a7e7fe08aaba0b1553149d93bc dma-buf: rename reservation_object to dma_resv
:::::: TO: Christian König <christian.koenig(a)amd.com>
:::::: CC: Christian König <christian.koenig(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v3 11/14] crypto: sun8i-ce: support hash algorithms
by kernel test robot
Hi Corentin,
I love your patch! Perhaps something to improve:
[auto build test WARNING on sunxi/sunxi/for-next]
[also build test WARNING on cryptodev/master crypto/master v5.8-rc1]
[cannot apply to next-20200621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Corentin-Labbe/crypto-allwinner-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c: In function 'sun8i_ce_hash_init':
>> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c:76:32: warning: variable 'algt' set but not used [-Wunused-but-set-variable]
76 | struct sun8i_ce_alg_template *algt;
| ^~~~
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c: At top level:
>> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c:175:5: warning: no previous prototype for 'sun8i_ce_hash_digest_fb' [-Wmissing-prototypes]
175 | int sun8i_ce_hash_digest_fb(struct ahash_request *areq)
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/algt +76 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
69
70 int sun8i_ce_hash_init(struct ahash_request *areq)
71 {
72 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq);
73 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
74 struct sun8i_ce_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
75 struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
> 76 struct sun8i_ce_alg_template *algt;
77
78 memset(rctx, 0, sizeof(struct sun8i_ce_hash_reqctx));
79
80 algt = container_of(alg, struct sun8i_ce_alg_template, alg.hash);
81
82 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
83 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP;
84
85 return crypto_ahash_init(&rctx->fallback_req);
86 }
87
88 int sun8i_ce_hash_export(struct ahash_request *areq, void *out)
89 {
90 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq);
91 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
92 struct sun8i_ce_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
93
94 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
95 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP;
96
97 return crypto_ahash_export(&rctx->fallback_req, out);
98 }
99
100 int sun8i_ce_hash_import(struct ahash_request *areq, const void *in)
101 {
102 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq);
103 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
104 struct sun8i_ce_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
105
106 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
107 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP;
108
109 return crypto_ahash_import(&rctx->fallback_req, in);
110 }
111
112 int sun8i_ce_hash_final(struct ahash_request *areq)
113 {
114 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq);
115 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
116 struct sun8i_ce_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
117 #ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
118 struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
119 struct sun8i_ce_alg_template *algt;
120 #endif
121
122 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
123 rctx->fallback_req.base.flags = areq->base.flags &
124 CRYPTO_TFM_REQ_MAY_SLEEP;
125 rctx->fallback_req.result = areq->result;
126
127 #ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
128 algt = container_of(alg, struct sun8i_ce_alg_template, alg.hash);
129 algt->stat_fb++;
130 #endif
131
132 return crypto_ahash_final(&rctx->fallback_req);
133 }
134
135 int sun8i_ce_hash_update(struct ahash_request *areq)
136 {
137 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq);
138 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
139 struct sun8i_ce_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
140
141 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
142 rctx->fallback_req.base.flags = areq->base.flags &
143 CRYPTO_TFM_REQ_MAY_SLEEP;
144 rctx->fallback_req.nbytes = areq->nbytes;
145 rctx->fallback_req.src = areq->src;
146
147 return crypto_ahash_update(&rctx->fallback_req);
148 }
149
150 int sun8i_ce_hash_finup(struct ahash_request *areq)
151 {
152 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq);
153 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
154 struct sun8i_ce_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
155 #ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
156 struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
157 struct sun8i_ce_alg_template *algt;
158 #endif
159
160 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
161 rctx->fallback_req.base.flags = areq->base.flags &
162 CRYPTO_TFM_REQ_MAY_SLEEP;
163
164 rctx->fallback_req.nbytes = areq->nbytes;
165 rctx->fallback_req.src = areq->src;
166 rctx->fallback_req.result = areq->result;
167 #ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
168 algt = container_of(alg, struct sun8i_ce_alg_template, alg.hash);
169 algt->stat_fb++;
170 #endif
171
172 return crypto_ahash_finup(&rctx->fallback_req);
173 }
174
> 175 int sun8i_ce_hash_digest_fb(struct ahash_request *areq)
176 {
177 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq);
178 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
179 struct sun8i_ce_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
180 #ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
181 struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
182 struct sun8i_ce_alg_template *algt;
183 #endif
184
185 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
186 rctx->fallback_req.base.flags = areq->base.flags &
187 CRYPTO_TFM_REQ_MAY_SLEEP;
188
189 rctx->fallback_req.nbytes = areq->nbytes;
190 rctx->fallback_req.src = areq->src;
191 rctx->fallback_req.result = areq->result;
192 #ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
193 algt = container_of(alg, struct sun8i_ce_alg_template, alg.hash);
194 algt->stat_fb++;
195 #endif
196
197 return crypto_ahash_digest(&rctx->fallback_req);
198 }
199
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v3 03/14] crypto: sun8i-ss: support hash algorithms
by kernel test robot
Hi Corentin,
I love your patch! Perhaps something to improve:
[auto build test WARNING on sunxi/sunxi/for-next]
[also build test WARNING on cryptodev/master crypto/master v5.8-rc1 next-20200621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Corentin-Labbe/crypto-allwinner-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project ef455a55bcf2cfea04a99c361b182ad18b7f03f1)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c:175:5: warning: no previous prototype for function 'sun8i_ss_hash_digest_fb' [-Wmissing-prototypes]
int sun8i_ss_hash_digest_fb(struct ahash_request *areq)
^
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c:175:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sun8i_ss_hash_digest_fb(struct ahash_request *areq)
^
static
1 warning generated.
vim +/sun8i_ss_hash_digest_fb +175 drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
174
> 175 int sun8i_ss_hash_digest_fb(struct ahash_request *areq)
176 {
177 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
178 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
179 struct sun8i_ss_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
180 #ifdef CONFIG_CRYPTO_DEV_SUN8I_SS_DEBUG
181 struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
182 struct sun8i_ss_alg_template *algt;
183 #endif
184
185 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
186 rctx->fallback_req.base.flags = areq->base.flags &
187 CRYPTO_TFM_REQ_MAY_SLEEP;
188
189 rctx->fallback_req.nbytes = areq->nbytes;
190 rctx->fallback_req.src = areq->src;
191 rctx->fallback_req.result = areq->result;
192 #ifdef CONFIG_CRYPTO_DEV_SUN8I_SS_DEBUG
193 algt = container_of(alg, struct sun8i_ss_alg_template, alg.hash);
194 algt->stat_fb++;
195 #endif
196
197 return crypto_ahash_digest(&rctx->fallback_req);
198 }
199
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[ebiggers:wip-inline-encryption 9974/9999] drivers/soc/qcom/rpmh-rsc.c:491:3: error: implicit declaration of function 'trace_rpmh_send_msg_rcuidle'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git wip-inline-encryption
head: 3455f60bc837b8b07c981de9f2cde8d757976433
commit: 89e6d5477a78f3b0577c34a470dde58047858a65 [9974/9999] soc: qcom: rpmh: Allow RPMH driver to be loaded as a module
config: s390-allmodconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.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
git checkout 89e6d5477a78f3b0577c34a470dde58047858a65
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/soc/qcom/rpmh-rsc.c: In function '__tcs_buffer_write':
>> drivers/soc/qcom/rpmh-rsc.c:491:3: error: implicit declaration of function 'trace_rpmh_send_msg_rcuidle'; did you mean 'trace_rpmh_send_msg_enabled'? [-Werror=implicit-function-declaration]
491 | trace_rpmh_send_msg_rcuidle(drv, tcs_id, j, msgid, cmd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| trace_rpmh_send_msg_enabled
cc1: some warnings being treated as errors
vim +491 drivers/soc/qcom/rpmh-rsc.c
658628e7ef78e8 Lina Iyer 2018-06-20 455
e40b0c1628f279 Douglas Anderson 2020-04-13 456 /**
e40b0c1628f279 Douglas Anderson 2020-04-13 457 * __tcs_buffer_write() - Write to TCS hardware from a request; don't trigger.
e40b0c1628f279 Douglas Anderson 2020-04-13 458 * @drv: The controller.
e40b0c1628f279 Douglas Anderson 2020-04-13 459 * @tcs_id: The global ID of this TCS.
e40b0c1628f279 Douglas Anderson 2020-04-13 460 * @cmd_id: The index within the TCS to start writing.
e40b0c1628f279 Douglas Anderson 2020-04-13 461 * @msg: The message we want to send, which will contain several addr/data
e40b0c1628f279 Douglas Anderson 2020-04-13 462 * pairs to program (but few enough that they all fit in one TCS).
e40b0c1628f279 Douglas Anderson 2020-04-13 463 *
e40b0c1628f279 Douglas Anderson 2020-04-13 464 * This is used for all types of transfers (active, sleep, and wake).
e40b0c1628f279 Douglas Anderson 2020-04-13 465 */
658628e7ef78e8 Lina Iyer 2018-06-20 466 static void __tcs_buffer_write(struct rsc_drv *drv, int tcs_id, int cmd_id,
658628e7ef78e8 Lina Iyer 2018-06-20 467 const struct tcs_request *msg)
658628e7ef78e8 Lina Iyer 2018-06-20 468 {
658628e7ef78e8 Lina Iyer 2018-06-20 469 u32 msgid, cmd_msgid;
658628e7ef78e8 Lina Iyer 2018-06-20 470 u32 cmd_enable = 0;
658628e7ef78e8 Lina Iyer 2018-06-20 471 u32 cmd_complete;
658628e7ef78e8 Lina Iyer 2018-06-20 472 struct tcs_cmd *cmd;
658628e7ef78e8 Lina Iyer 2018-06-20 473 int i, j;
658628e7ef78e8 Lina Iyer 2018-06-20 474
658628e7ef78e8 Lina Iyer 2018-06-20 475 cmd_msgid = CMD_MSGID_LEN;
658628e7ef78e8 Lina Iyer 2018-06-20 476 cmd_msgid |= msg->wait_for_compl ? CMD_MSGID_RESP_REQ : 0;
658628e7ef78e8 Lina Iyer 2018-06-20 477 cmd_msgid |= CMD_MSGID_WRITE;
658628e7ef78e8 Lina Iyer 2018-06-20 478
3b5e3d50f83a37 Douglas Anderson 2020-04-13 479 cmd_complete = read_tcs_reg(drv, RSC_DRV_CMD_WAIT_FOR_CMPL, tcs_id);
658628e7ef78e8 Lina Iyer 2018-06-20 480
658628e7ef78e8 Lina Iyer 2018-06-20 481 for (i = 0, j = cmd_id; i < msg->num_cmds; i++, j++) {
658628e7ef78e8 Lina Iyer 2018-06-20 482 cmd = &msg->cmds[i];
658628e7ef78e8 Lina Iyer 2018-06-20 483 cmd_enable |= BIT(j);
658628e7ef78e8 Lina Iyer 2018-06-20 484 cmd_complete |= cmd->wait << j;
658628e7ef78e8 Lina Iyer 2018-06-20 485 msgid = cmd_msgid;
658628e7ef78e8 Lina Iyer 2018-06-20 486 msgid |= cmd->wait ? CMD_MSGID_RESP_REQ : 0;
fc087fe5a45e72 Lina Iyer 2018-06-20 487
658628e7ef78e8 Lina Iyer 2018-06-20 488 write_tcs_cmd(drv, RSC_DRV_CMD_MSGID, tcs_id, j, msgid);
658628e7ef78e8 Lina Iyer 2018-06-20 489 write_tcs_cmd(drv, RSC_DRV_CMD_ADDR, tcs_id, j, cmd->addr);
658628e7ef78e8 Lina Iyer 2018-06-20 490 write_tcs_cmd(drv, RSC_DRV_CMD_DATA, tcs_id, j, cmd->data);
efde2659b0fe83 Stephen Boyd 2020-01-14 @491 trace_rpmh_send_msg_rcuidle(drv, tcs_id, j, msgid, cmd);
658628e7ef78e8 Lina Iyer 2018-06-20 492 }
658628e7ef78e8 Lina Iyer 2018-06-20 493
658628e7ef78e8 Lina Iyer 2018-06-20 494 write_tcs_reg(drv, RSC_DRV_CMD_WAIT_FOR_CMPL, tcs_id, cmd_complete);
3b5e3d50f83a37 Douglas Anderson 2020-04-13 495 cmd_enable |= read_tcs_reg(drv, RSC_DRV_CMD_ENABLE, tcs_id);
658628e7ef78e8 Lina Iyer 2018-06-20 496 write_tcs_reg(drv, RSC_DRV_CMD_ENABLE, tcs_id, cmd_enable);
658628e7ef78e8 Lina Iyer 2018-06-20 497 }
658628e7ef78e8 Lina Iyer 2018-06-20 498
:::::: The code at line 491 was first introduced by commit
:::::: efde2659b0fe835732047357b2902cca14f054d9 drivers: qcom: rpmh-rsc: Use rcuidle tracepoints for rpmh
:::::: TO: Stephen Boyd <swboyd(a)chromium.org>
:::::: CC: Bjorn Andersson <bjorn.andersson(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v3 08/14] crypto: sun8i-ce: split into prepare/run/unprepare
by kernel test robot
Hi Corentin,
I love your patch! Perhaps something to improve:
[auto build test WARNING on sunxi/sunxi/for-next]
[also build test WARNING on cryptodev/master crypto/master v5.8-rc1]
[cannot apply to next-20200621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Corentin-Labbe/crypto-allwinner-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next
config: arm-sunxi_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:277:5: warning: no previous prototype for 'sun8i_ce_cipher_run' [-Wmissing-prototypes]
277 | int sun8i_ce_cipher_run(struct crypto_engine *engine, void *areq)
| ^~~~~~~~~~~~~~~~~~~
vim +/sun8i_ce_cipher_run +277 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
276
> 277 int sun8i_ce_cipher_run(struct crypto_engine *engine, void *areq)
278 {
279 struct skcipher_request *breq = container_of(areq, struct skcipher_request, base);
280 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(breq);
281 struct sun8i_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm);
282 struct sun8i_ce_dev *ce = op->ce;
283 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(breq);
284 int flow, err;
285
286 flow = rctx->flow;
287 err = sun8i_ce_run_task(ce, flow, crypto_tfm_alg_name(breq->base.tfm));
288 crypto_finalize_skcipher_request(engine, breq, err);
289 return 0;
290 }
291
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months