Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Fix build break with PPC_EARLY_DEBUG_BOOTX=y

A kernel configured with PPC_EARLY_DEBUG_BOOTX=y but PPC_PMAC=n and
PPC_MAPLE=n will fail to link:

btext.c:(.text+0x2d0fc): undefined reference to `.rmci_off'
btext.c:(.text+0x2d214): undefined reference to `.rmci_on'

Fix it by making the build of rmci_on/off() depend on
PPC_EARLY_DEBUG_BOOTX, which also enable the only code that uses them.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Michael Ellerman and committed by
Benjamin Herrenschmidt
2d6f0c3a e80ba461

+4 -1
+4 -1
arch/powerpc/kernel/misc_64.S
··· 246 246 or r3,r7,r9 247 247 blr 248 248 249 - #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) 250 249 250 + #ifdef CONFIG_PPC_EARLY_DEBUG_BOOTX 251 251 _GLOBAL(rmci_on) 252 252 sync 253 253 isync ··· 277 277 isync 278 278 sync 279 279 blr 280 + #endif /* CONFIG_PPC_EARLY_DEBUG_BOOTX */ 281 + 282 + #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) 280 283 281 284 /* 282 285 * Do an IO access in real mode