From: Bibo Mao Date: Tue, 13 Jan 2026 03:05:56 +0000 (+0800) Subject: crypto: virtio - Replace package id with numa node id X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f42116458d01e9bb8586613063028ab8c7070856;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: Michael S. Tsirkin Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/virtio/virtio_crypto_common.h b/drivers/crypto/virtio/virtio_crypto_common.h index 19c934af3df6b..e559bdadf4f91 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;