• Matias Bjørling's avatar
    ia64: export node_distance function · ef78e5ec
    Matias Bjørling authored
    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: f3334447 "nvme: take node locality into account when selecting a path"
    Fixes: 73569e11 "lightnvm: remove dependencies on BLK_DEV_NVME and PCI"
    Signed-off-by: 's avatarMatias Bjøring <mb@lightnvm.io>
    Signed-off-by: 's avatarTony Luck <tony.luck@intel.com>
    Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
    ef78e5ec
Name
Last commit
Last update
..
configs Loading commit data...
dig Loading commit data...
hp Loading commit data...
include Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
oprofile Loading commit data...
pci Loading commit data...
scripts Loading commit data...
sn Loading commit data...
uv Loading commit data...
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...
install.sh Loading commit data...
module.lds Loading commit data...