Skip to content

Commit e2524ff

Browse files
author
CKI KWF Bot
committed
Merge: crypto: iaa: update Intel IAA crypto driver to v6.17
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7566 ``` JIRA: https://issues.redhat.com/browse/RHEL-95629 Upstream Status: 3 commits are merged into the linux.git 1 commits is RHEL-Only Bring in the latest Intel IAA driver bugfixes and updates. All the commits apply cleanly, no changes vs the upstream. Signed-off-by: Vladis Dronov <vdronov@redhat.com> ``` Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: Herbert Xu <zxu@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents e947f6c + 29174ac commit e2524ff

File tree

3 files changed

+18
-23
lines changed

3 files changed

+18
-23
lines changed

drivers/crypto/intel/iaa/iaa_crypto_main.c

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ static int alloc_wq_table(int max_wqs)
727727

728728
for (cpu = 0; cpu < nr_cpus; cpu++) {
729729
entry = per_cpu_ptr(wq_table, cpu);
730-
entry->wqs = kcalloc(max_wqs, sizeof(struct wq *), GFP_KERNEL);
730+
entry->wqs = kcalloc(max_wqs, sizeof(*entry->wqs), GFP_KERNEL);
731731
if (!entry->wqs) {
732732
free_wq_table();
733733
return -ENOMEM;
@@ -896,7 +896,7 @@ static int wq_table_add_wqs(int iaa, int cpu)
896896
static void rebalance_wq_table(void)
897897
{
898898
const struct cpumask *node_cpus;
899-
int node, cpu, iaa = -1;
899+
int node_cpu, node, cpu, iaa = 0;
900900

901901
if (nr_iaa == 0)
902902
return;
@@ -907,36 +907,29 @@ static void rebalance_wq_table(void)
907907
clear_wq_table();
908908

909909
if (nr_iaa == 1) {
910-
for (cpu = 0; cpu < nr_cpus; cpu++) {
911-
if (WARN_ON(wq_table_add_wqs(0, cpu))) {
912-
pr_debug("could not add any wqs for iaa 0 to cpu %d!\n", cpu);
913-
return;
914-
}
910+
for_each_possible_cpu(cpu) {
911+
if (WARN_ON(wq_table_add_wqs(0, cpu)))
912+
goto err;
915913
}
916914

917915
return;
918916
}
919917

920918
for_each_node_with_cpus(node) {
919+
cpu = 0;
921920
node_cpus = cpumask_of_node(node);
922921

923-
for (cpu = 0; cpu < cpumask_weight(node_cpus); cpu++) {
924-
int node_cpu = cpumask_nth(cpu, node_cpus);
925-
926-
if (WARN_ON(node_cpu >= nr_cpu_ids)) {
927-
pr_debug("node_cpu %d doesn't exist!\n", node_cpu);
928-
return;
929-
}
930-
931-
if ((cpu % cpus_per_iaa) == 0)
932-
iaa++;
933-
934-
if (WARN_ON(wq_table_add_wqs(iaa, node_cpu))) {
935-
pr_debug("could not add any wqs for iaa %d to cpu %d!\n", iaa, cpu);
936-
return;
937-
}
922+
for_each_cpu(node_cpu, node_cpus) {
923+
iaa = cpu / cpus_per_iaa;
924+
if (WARN_ON(wq_table_add_wqs(iaa, node_cpu)))
925+
goto err;
926+
cpu++;
938927
}
939928
}
929+
930+
return;
931+
err:
932+
pr_debug("could not add any wqs for iaa %d to cpu %d!\n", iaa, cpu);
940933
}
941934

942935
static inline int check_completion(struct device *dev,
@@ -1917,7 +1910,6 @@ static int iaa_crypto_probe(struct idxd_dev *idxd_dev)
19171910
}
19181911
try_module_get(THIS_MODULE);
19191912

1920-
mark_tech_preview("Intel IAA Compression Accelerator (IAA)", THIS_MODULE);
19211913
pr_info("iaa_crypto now ENABLED\n");
19221914
}
19231915

drivers/dma/idxd/init.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ static struct pci_device_id idxd_pci_tbl[] = {
8080
{ PCI_DEVICE_DATA(INTEL, IAA_DMR, &idxd_driver_data[IDXD_TYPE_IAX]) },
8181
/* IAA PTL platforms */
8282
{ PCI_DEVICE_DATA(INTEL, IAA_PTL, &idxd_driver_data[IDXD_TYPE_IAX]) },
83+
/* IAA WCL platforms */
84+
{ PCI_DEVICE_DATA(INTEL, IAA_WCL, &idxd_driver_data[IDXD_TYPE_IAX]) },
8385
{ 0, }
8486
};
8587
MODULE_DEVICE_TABLE(pci, idxd_pci_tbl);

drivers/dma/idxd/registers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define PCI_DEVICE_ID_INTEL_DSA_DMR 0x1212
1111
#define PCI_DEVICE_ID_INTEL_IAA_DMR 0x1216
1212
#define PCI_DEVICE_ID_INTEL_IAA_PTL 0xb02d
13+
#define PCI_DEVICE_ID_INTEL_IAA_WCL 0xfd2d
1314

1415
#define DEVICE_VERSION_1 0x100
1516
#define DEVICE_VERSION_2 0x200

0 commit comments

Comments
 (0)