summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2024-03-06 23:58:52 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2024-03-07 23:06:19 +1100
commitc2e5d70cf05b48bfbd5b6625bbd0ec3052cecd5d (patch)
treeb9b2da015b14e8c3e4877753020dc6592a1620a3 /arch/powerpc/platforms
parent329105ce53437ff64b29f6c429dfe5dc2aa7b676 (diff)
powerpc/83xx: Fix build failure with FPU=n
Building eg. 83xx/mpc832x_rdb_defconfig with FPU=n, fails with: arch/powerpc/platforms/83xx/suspend.c: In function 'mpc83xx_suspend_enter': arch/powerpc/platforms/83xx/suspend.c:209:17: error: implicit declaration of function 'enable_kernel_fp' 209 | enable_kernel_fp(); Fix it by providing an enable_kernel_fp() stub for FPU=n builds, which allows using IS_ENABLED(CONFIG_PPC_FPU) around the call to enable_kernel_fp(). Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240306125853.3714578-2-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/83xx/suspend.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index c9664e46b03d..99bd4355f28e 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -206,7 +206,8 @@ static int mpc83xx_suspend_enter(suspend_state_t state)
out_be32(&pmc_regs->config1,
in_be32(&pmc_regs->config1) | PMCCR1_POWER_OFF);
- enable_kernel_fp();
+ if (IS_ENABLED(CONFIG_PPC_FPU))
+ enable_kernel_fp();
mpc83xx_enter_deep_sleep(immrbase);