]> git.baikalelectronics.ru Git - kernel.git/commit
ia64: export node_distance function
authorMatias Bjørling <mb@lightnvm.io>
Mon, 26 Nov 2018 19:27:03 +0000 (11:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Nov 2018 02:30:40 +0000 (18:30 -0800)
commit8bd2d44ff052c72a6b66e641444de83e58d72fef
treed111e5e3d4565275b10f9394ac7da6a1389d1274
parent1e6b64ff55793a7e18d73a063e5a4520c7e53445
ia64: export node_distance function

The numa_slit variable used by node_distance is available to a
module as long as it is linked at compile-time. However, it is
not available to loadable modules. Leading to errors such as:

  ERROR: "numa_slit" [drivers/nvme/host/nvme-core.ko] undefined!

The error above is caused by the nvme multipath code that makes
use of node_distance for its path calculation. When the patch was
added, the lightnvm subsystem would select nvme and always compile
it in, leading to the node_distance call to always succeed.
However, when this requirement was removed, nvme could be compiled
in as a module, which exposed this bug.

This patch extracts node_distance to a function and exports it.
Since ACPI is depending on node_distance being a simple lookup to
numa_slit, the previous behavior is exposed as slit_distance and its
users updated.

Fixes: 6146cc5e2b107 "nvme: take node locality into account when selecting a path"
Fixes: caeff82f4786 "lightnvm: remove dependencies on BLK_DEV_NVME and PCI"
Signed-off-by: Matias Bjøring <mb@lightnvm.io>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/ia64/include/asm/numa.h
arch/ia64/kernel/acpi.c
arch/ia64/mm/numa.c