summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2026-01-13 11:05:56 +0800
committerMichael S. Tsirkin <mst@redhat.com>2026-01-28 15:32:18 -0500
commit72ecf75c58116c0fe07e34ba4fff5020e55c9097 (patch)
treecfcd81f6e53f231fd2138e363b0eb438d3c2f612
parenta389d431053935366b88a8fbf271f1a564b9a44e (diff)
crypto: virtio: Replace package id with numa node id
With multiple virtio crypto devices supported with different NUMA nodes, when crypto session is created, it will search virtio crypto device with the same numa node of current CPU. Here API topology_physical_package_id() is replaced with cpu_to_node() since package id is physical concept, and one package id have multiple memory numa id. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20260113030556.3522533-4-maobibo@loongson.cn>
-rw-r--r--drivers/crypto/virtio/virtio_crypto_common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/virtio/virtio_crypto_common.h b/drivers/crypto/virtio/virtio_crypto_common.h
index 19c934af3df6..e559bdadf4f9 100644
--- a/drivers/crypto/virtio/virtio_crypto_common.h
+++ b/drivers/crypto/virtio/virtio_crypto_common.h
@@ -135,7 +135,7 @@ static inline int virtio_crypto_get_current_node(void)
int cpu, node;
cpu = get_cpu();
- node = topology_physical_package_id(cpu);
+ node = cpu_to_node(cpu);
put_cpu();
return node;