@@ -115,7 +115,7 @@ ENTRY(vfp_support_entry)
beq vfp_reload_hw @ then the hw state needs reloading
VFPFSTMIA r4, r5 @ save the working registers
VFPFMRX r5, FPSCR @ current status
-#ifndef CONFIG_CPU_FEROCEON
+vfp_extra:
tst r1, #FPEXC_EX @ is there additional state to save?
beq 1f
VFPFMRX r6, FPINST @ FPINST (only if FPEXC.EX is set)
@@ -123,7 +123,6 @@ ENTRY(vfp_support_entry)
beq 1f
VFPFMRX r8, FPINST2 @ FPINST2 if needed (and present)
1:
-#endif
stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2
vfp_reload_hw:
@@ -219,6 +218,19 @@ process_exception:
@ retry the faulted instruction
ENDPROC(vfp_support_entry)
+#ifdef CONFIG_CPU_FEROCEON
+ENTRY(vfp_feroceon_quirk)
+ /* force a skip over the imprecise VFP abort handling */
+ adr r0, vfp_extra
+ ldr r1, .L_eq_insn
+ str r1, [r0]
+ add r1, r0, #4
+ b feroceon_coherent_kern_range
+.L_eq_insn:
+ teq r0, r0
+ENDPROC(vfp_feroceon_quirk)
+#endif
+
ENTRY(vfp_save_state)
@ Save the current VFP state
@ r0 - save location