[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251204112227.2659404-3-maobibo@loongson.cn>
Date: Thu, 4 Dec 2025 19:22:19 +0800
From: Bibo Mao <maobibo@...ngson.cn>
To: Gonglei <arei.gonglei@...wei.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>
Cc: virtualization@...ts.linux.dev,
linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 2/9] 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@...ngson.cn>
---
drivers/crypto/virtio/virtio_crypto_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.39.3
Powered by blists - more mailing lists