tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: c75c66bbaa56f130e2be095402422e56f608aa62 commit: 625f269a5a7a3643771320387e474bd0a61d9654 [219/267] crypto: inside-secure - add support for PCI based FPGA development board config: nds32-allyesconfig (attached as .config) compiler: nds32le-linux-gcc (GCC) 8.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 625f269a5a7a3643771320387e474bd0a61d9654 # save the attached .config to linux build tree GCC_VERSION=8.1.0 make.cross ARCH=nds32 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): drivers/crypto/inside-secure/safexcel.c: In function 'safexcel_request_ring_irq': drivers/crypto/inside-secure/safexcel.c:840:9: error: implicit declaration of function 'pci_irq_vector'; did you mean 'rcu_irq_enter'? [-Werror=implicit-function-declaration] irq = pci_irq_vector(pci_pdev, irqid); ^~~~~~~~~~~~~~ rcu_irq_enter drivers/crypto/inside-secure/safexcel.c: In function 'safexcel_probe_generic': drivers/crypto/inside-secure/safexcel.c:1043:9: error: implicit declaration of function 'pci_alloc_irq_vectors'; did you mean 'pci_alloc_consistent'? [-Werror=implicit-function-declaration] ret = pci_alloc_irq_vectors(pci_pdev, ^~~~~~~~~~~~~~~~~~~~~ pci_alloc_consistent drivers/crypto/inside-secure/safexcel.c:1046:10: error: 'PCI_IRQ_MSI' undeclared (first use in this function); did you mean 'IRQ_MSK'? PCI_IRQ_MSI | PCI_IRQ_MSIX); ^~~~~~~~~~~ IRQ_MSK drivers/crypto/inside-secure/safexcel.c:1046:10: note: each undeclared identifier is reported only once for each function it appears in >> drivers/crypto/inside-secure/safexcel.c:1046:24: error: 'PCI_IRQ_MSIX' undeclared (first use in this function); did you mean 'PCI_PRI_CTRL'? PCI_IRQ_MSI | PCI_IRQ_MSIX); ^~~~~~~~~~~~ PCI_PRI_CTRL drivers/crypto/inside-secure/safexcel.c: In function 'safexcel_init': drivers/crypto/inside-secure/safexcel.c:1402:6: warning: unused variable 'rc' [-Wunused-variable] int rc; ^~ cc1: some warnings being treated as errors vim +1046 drivers/crypto/inside-secure/safexcel.c 1008 1009 /* 1010 * Generic part of probe routine, shared by platform and PCI driver 1011 * 1012 * Assumes IO resources have been mapped, private data mem has been allocated, 1013 * clocks have been enabled, device pointer has been assigned etc. 1014 * 1015 */ 1016 static int safexcel_probe_generic(void *pdev, 1017 struct safexcel_crypto_priv *priv, 1018 int is_pci_dev) 1019 { 1020 struct device *dev = priv->dev; 1021 int i, ret; 1022 1023 priv->context_pool = dmam_pool_create("safexcel-context", dev, 1024 sizeof(struct safexcel_context_record), 1025 1, 0); 1026 if (!priv->context_pool) 1027 return -ENOMEM; 1028 1029 safexcel_init_register_offsets(priv); 1030 1031 if (priv->version != EIP97IES_MRVL) 1032 priv->flags |= EIP197_TRC_CACHE; 1033 1034 safexcel_configure(priv); 1035 1036 if (IS_ENABLED(CONFIG_PCI) && priv->version == EIP197_DEVBRD) { 1037 /* 1038 * Request MSI vectors for global + 1 per ring - 1039 * or just 1 for older dev images 1040 */ 1041 struct pci_dev *pci_pdev = pdev; 1042 > 1043 ret = pci_alloc_irq_vectors(pci_pdev, 1044 priv->config.rings + 1, 1045 priv->config.rings + 1, > 1046 PCI_IRQ_MSI | PCI_IRQ_MSIX); 1047 if (ret < 0) { 1048 dev_err(dev, "Failed to allocate PCI MSI interrupts\n"); 1049 return ret; 1050 } 1051 } 1052 1053 /* Register the ring IRQ handlers and configure the rings */ 1054 priv->ring = devm_kcalloc(dev, priv->config.rings, 1055 sizeof(*priv->ring), 1056 GFP_KERNEL); 1057 if (!priv->ring) 1058 return -ENOMEM; 1059 1060 for (i = 0; i < priv->config.rings; i++) { 1061 char wq_name[9] = {0}; 1062 int irq; 1063 struct safexcel_ring_irq_data *ring_irq; 1064 1065 ret = safexcel_init_ring_descriptors(priv, 1066 &priv->ring[i].cdr, 1067 &priv->ring[i].rdr); 1068 if (ret) { 1069 dev_err(dev, "Failed to initialize rings\n"); 1070 return ret; 1071 } 1072 1073 priv->ring[i].rdr_req = devm_kcalloc(dev, 1074 EIP197_DEFAULT_RING_SIZE, 1075 sizeof(priv->ring[i].rdr_req), 1076 GFP_KERNEL); 1077 if (!priv->ring[i].rdr_req) 1078 return -ENOMEM; 1079 1080 ring_irq = devm_kzalloc(dev, sizeof(*ring_irq), GFP_KERNEL); 1081 if (!ring_irq) 1082 return -ENOMEM; 1083 1084 ring_irq->priv = priv; 1085 ring_irq->ring = i; 1086 1087 irq = safexcel_request_ring_irq(pdev, 1088 EIP197_IRQ_NUMBER(i, is_pci_dev), 1089 is_pci_dev, 1090 safexcel_irq_ring, 1091 safexcel_irq_ring_thread, 1092 ring_irq); 1093 if (irq < 0) { 1094 dev_err(dev, "Failed to get IRQ ID for ring %d\n", i); 1095 return irq; 1096 } 1097 1098 priv->ring[i].work_data.priv = priv; 1099 priv->ring[i].work_data.ring = i; 1100 INIT_WORK(&priv->ring[i].work_data.work, 1101 safexcel_dequeue_work); 1102 1103 snprintf(wq_name, 9, "wq_ring%d", i); 1104 priv->ring[i].workqueue = 1105 create_singlethread_workqueue(wq_name); 1106 if (!priv->ring[i].workqueue) 1107 return -ENOMEM; 1108 1109 priv->ring[i].requests = 0; 1110 priv->ring[i].busy = false; 1111 1112 crypto_init_queue(&priv->ring[i].queue, 1113 EIP197_DEFAULT_RING_SIZE); 1114 1115 spin_lock_init(&priv->ring[i].lock); 1116 spin_lock_init(&priv->ring[i].queue_lock); 1117 } 1118 1119 atomic_set(&priv->ring_used, 0); 1120 1121 ret = safexcel_hw_init(priv); 1122 if (ret) { 1123 dev_err(dev, "HW init failed (%d)\n", ret); 1124 return ret; 1125 } 1126 1127 ret = safexcel_register_algorithms(priv); 1128 if (ret) { 1129 dev_err(dev, "Failed to register algorithms (%d)\n", ret); 1130 return ret; 1131 } 1132 1133 return 0; 1134 } 1135 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation