aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/head_book3s_32.S
diff options
context:
space:
mode:
authorChristophe Leroy2020-08-18 17:19:18 +0000
committerMichael Ellerman2020-12-04 01:01:12 +1100
commit7d68c89169508064c460a1208f38ed0589d226fa (patch)
treef05cb2b4a8fa03e5a10d3299b77b1414b9921187 /arch/powerpc/kernel/head_book3s_32.S
parentb6254ced4da6cf28d49fbffe24ee4b3286dcb3f4 (diff)
powerpc/32s: Allow deselecting CONFIG_PPC_FPU on mpc832x
The e300c2 core which is embedded in mpc832x CPU doesn't have an FPU. Make it possible to not select CONFIG_PPC_FPU when building a kernel dedicated to that target. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/fcdc60d85baf80eaa0a7f3261d9d889282068216.1597770847.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/head_book3s_32.S')
-rw-r--r--arch/powerpc/kernel/head_book3s_32.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/head_book3s_32.S b/arch/powerpc/kernel/head_book3s_32.S
index ed25d9991233..bbcc84c5cf5f 100644
--- a/arch/powerpc/kernel/head_book3s_32.S
+++ b/arch/powerpc/kernel/head_book3s_32.S
@@ -394,6 +394,7 @@ Alignment:
. = 0x800
DO_KVM 0x800
FPUnavailable:
+#ifdef CONFIG_PPC_FPU
BEGIN_FTR_SECTION
/*
* Certain Freescale cores don't have a FPU and treat fp instructions
@@ -407,6 +408,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_FPU_UNAVAILABLE)
b fast_exception_return
1: addi r3,r1,STACK_FRAME_OVERHEAD
EXC_XFER_LITE(0x800, kernel_fp_unavailable_exception)
+#else
+ b ProgramCheck
+#endif
/* Decrementer */
EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)