[PATCH Trusty] powerpc/mm: fix ".__node_distance" undefined

Thadeu Lima de Souza Cascardo cascardo at canonical.com
Tue Oct 17 18:29:42 UTC 2017

From: Mike Qiu <qiudayu at linux.vnet.ibm.com>

BugLink: http://bugs.launchpad.net/bugs/1720867

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  Building modules, stage 2.
WARNING: 1 bad relocations
c0000000013d6a30 R_PPC64_ADDR64    uprobes_fetch_type_table
  WRAP    arch/powerpc/boot/zImage.pseries
  WRAP    arch/powerpc/boot/zImage.epapr
  MODPOST 1849 modules
ERROR: ".__node_distance" [drivers/block/nvme.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
make: *** Waiting for unfinished jobs....

The reason is symbol "__node_distance" not been exported in powerpc.

Signed-off-by: Mike Qiu <qiudayu at linux.vnet.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Cc: Paul Mackerras <paulus at samba.org>
Cc: Nathan Fontenot <nfont at linux.vnet.ibm.com>
Cc: Stephen Rothwell <sfr at canb.auug.org.au>
Cc: Srivatsa S. Bhat <srivatsa.bhat at linux.vnet.ibm.com>
Cc: Jesse Larrew <jlarrew at linux.vnet.ibm.com>
Cc: Robert Jennings <rcj at linux.vnet.ibm.com>
Cc: Alistair Popple <alistair at popple.id.au>
Cc: Mike Qiu <qiudayu at linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
(cherry picked from commit 12c743eb2289bcaace32859d4919417ff5707768)
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>

This patch is necessary as a requirement for commit "NVMe: per-cpu io queues",
otherwise, it won't build on ppc64el.

 arch/powerpc/mm/numa.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index a115c562bfa3..c33f61ae3fd6 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -232,6 +232,7 @@ int __node_distance(int a, int b)
 	return distance;
 static void initialize_distance_lookup_table(int nid,
 		const __be32 *associativity)

More information about the kernel-team mailing list