summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel
diff options
context:
space:
mode:
authorSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>2016-08-15 11:03:23 -0700
committerSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>2016-08-15 15:10:42 -0700
commitc14c8b7e5568aee21796230b4d03e18d028fcda5 (patch)
treec640cadde34797b30bb7bbdfb1952fc8cca8e8c6 /arch/arm64/kernel
parent0a3bee11ebe2d5da0d4432ec6530a708694bd3d4 (diff)
Revert "arm64: fpsimd: Enable FP(floating-point) settings for msm8996"
This reverts commit 2dae58c4af32 ("arm64: fpsimd: Enable FP(floating-point) settings for msm8996"). Feature is not applicable to msmcobalt and only applicable to MSM8996. CRs-Fixed: 1054373 Change-Id: I8f21787f0a45dd9f7be8986b4f332f498add3203 Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r--arch/arm64/kernel/entry-fpsimd.S32
-rw-r--r--arch/arm64/kernel/entry.S13
-rw-r--r--arch/arm64/kernel/fpsimd.c23
3 files changed, 3 insertions, 65 deletions
diff --git a/arch/arm64/kernel/entry-fpsimd.S b/arch/arm64/kernel/entry-fpsimd.S
index d90efa4852b2..c44a82f146b1 100644
--- a/arch/arm64/kernel/entry-fpsimd.S
+++ b/arch/arm64/kernel/entry-fpsimd.S
@@ -64,36 +64,4 @@ ENTRY(fpsimd_load_partial_state)
ret
ENDPROC(fpsimd_load_partial_state)
-#ifdef CONFIG_ENABLE_FP_SIMD_SETTINGS
-ENTRY(fpsimd_enable_trap)
- mrs x0, cpacr_el1
- bic x0, x0, #(3 << 20)
- orr x0, x0, #(1 << 20)
- msr cpacr_el1, x0
- ret
-ENDPROC(fpsimd_enable_trap)
-ENTRY(fpsimd_disable_trap)
- mrs x0, cpacr_el1
- orr x0, x0, #(3 << 20)
- msr cpacr_el1, x0
- ret
-ENDPROC(fpsimd_disable_trap)
-ENTRY(fpsimd_settings_enable)
- mrs x0, s3_1_c15_c15_0
- orr x0, x0, #(1 << 31)
- isb
- msr s3_1_c15_c15_0, x0
- isb
- ret
-ENDPROC(fpsimd_settings_enable)
-ENTRY(fpsimd_settings_disable)
- mrs x0, s3_1_c15_c15_0
- bic x0, x0, #(1 << 31)
- isb
- msr s3_1_c15_c15_0, x0
- isb
- ret
-ENDPROC(fpsimd_settings_disable)
-#endif
-
#endif
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index 485186bff022..e3131b39fbf2 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -427,7 +427,7 @@ el0_sync_compat:
cmp x24, #ESR_ELx_EC_IABT_LOW // instruction abort in EL0
b.eq el0_ia
cmp x24, #ESR_ELx_EC_FP_ASIMD // FP/ASIMD access
- b.eq el0_fpsimd_acc_compat
+ b.eq el0_fpsimd_acc
cmp x24, #ESR_ELx_EC_FP_EXC32 // FP/ASIMD exception
b.eq el0_fpsimd_exc
cmp x24, #ESR_ELx_EC_PC_ALIGN // pc alignment exception
@@ -498,17 +498,6 @@ el0_fpsimd_acc:
mov x1, sp
bl do_fpsimd_acc
b ret_to_user
-el0_fpsimd_acc_compat:
- /*
- * Floating Point or Advanced SIMD access
- */
- enable_dbg
- ct_user_exit
- mov x0, x25
- mov x1, sp
- bl do_fpsimd_acc_compat
- b ret_to_user
-
el0_fpsimd_exc:
/*
* Floating Point or Advanced SIMD exception
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 10133c0c60f4..4c46c54a3ad7 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -88,23 +88,14 @@
* whatever is in the FPSIMD registers is not saved to memory, but discarded.
*/
static DEFINE_PER_CPU(struct fpsimd_state *, fpsimd_last_state);
-static DEFINE_PER_CPU(int, fpsimd_stg_enable);
/*
* Trapped FP/ASIMD access.
*/
void do_fpsimd_acc(unsigned int esr, struct pt_regs *regs)
{
- fpsimd_disable_trap();
- fpsimd_settings_disable();
- this_cpu_write(fpsimd_stg_enable, 0);
-}
-
-void do_fpsimd_acc_compat(unsigned int esr, struct pt_regs *regs)
-{
- fpsimd_disable_trap();
- fpsimd_settings_enable();
- this_cpu_write(fpsimd_stg_enable, 1);
+ /* TODO: implement lazy context saving/restoring */
+ WARN_ON(1);
}
/*
@@ -144,11 +135,6 @@ void fpsimd_thread_switch(struct task_struct *next)
if (current->mm && !test_thread_flag(TIF_FOREIGN_FPSTATE))
fpsimd_save_state(&current->thread.fpsimd_state);
- if (__this_cpu_read(fpsimd_stg_enable)) {
- fpsimd_settings_disable();
- this_cpu_write(fpsimd_stg_enable, 0);
- }
-
if (next->mm) {
/*
* If we are switching to a task whose most recent userland
@@ -166,11 +152,6 @@ void fpsimd_thread_switch(struct task_struct *next)
else
set_ti_thread_flag(task_thread_info(next),
TIF_FOREIGN_FPSTATE);
-
- if (test_ti_thread_flag(task_thread_info(next), TIF_32BIT))
- fpsimd_enable_trap();
- else
- fpsimd_disable_trap();
}
}