]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: qat - replace get_current_node() with numa_node_id()
authorAndre Przywara <andre.przywara@arm.com>
Fri, 17 Jun 2022 09:59:44 +0000 (09:59 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 24 Jun 2022 09:12:29 +0000 (17:12 +0800)
commitfe222767be6c5880bf08b8b39cbc070ef8c8ab70
tree14596087050a09898760398d72b0ae1a304556c1
parent317fd79a8c4532c65aa86a80c0e097288c3bd522
crypto: qat - replace get_current_node() with numa_node_id()

Currently the QAT driver code uses a self-defined wrapper function
called get_current_node() when it wants to learn the current NUMA node.
This implementation references the topology_physical_package_id[] array,
which more or less coincidentally contains the NUMA node id, at least
on x86.

Because this is not universal, and Linux offers a direct function to
learn the NUMA node ID, replace that function with a call to
numa_node_id(), which would work everywhere.

This fixes the QAT driver operation on arm64 machines.

Reported-by: Yoan Picchi <Yoan.Picchi@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Yoan Picchi <yoan.picchi@arm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/adf_common_drv.h
drivers/crypto/qat/qat_common/qat_algs.c
drivers/crypto/qat/qat_common/qat_asym_algs.c