Skip to content

Commit da72709

Browse files
zx2c4mpe
authored andcommitted
powerpc/pseries: Fix build break due to pnv_npu2_init()
Commit 3be2df0 ("powerpc/pseries/npu: Enable platform support") added a call to pnv_npu2_init() in pseries code. This causes a build break if we build with CONFIG_PPC_PSERIES && !CONFIG_PPC_POWERNV: powerpc64le-pc-linux-gnu-ld: arch/powerpc/platforms/pseries/pci.o: in function `pSeries_final_fixup': pci.c:(.init.text+0x1b0): undefined reference to `pnv_npu2_init' This commit therefore wraps that line in an ifdef, so that pseries builds without powernv. Fixes: 3be2df0 ("powerpc/pseries/npu: Enable platform support") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> [mpe: Frob change log a bit to blame a different commit] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent fcf5036 commit da72709

File tree

1 file changed

+2
-0
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+2
-0
lines changed

arch/powerpc/platforms/pseries/pci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ void __init pSeries_final_fixup(void)
264264
if (!of_device_is_compatible(nvdn->parent,
265265
"ibm,power9-npu"))
266266
continue;
267+
#ifdef CONFIG_PPC_POWERNV
267268
WARN_ON_ONCE(pnv_npu2_init(hose));
269+
#endif
268270
break;
269271
}
270272
}

0 commit comments

Comments
 (0)