projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0d32f3
)
MIPS: kernel: process: Do not allow FR=0 on MIPS R6
author
Markos Chandras
<
[email protected]
>
Tue, 13 Jan 2015 13:01:49 +0000
(13:01 +0000)
committer
Markos Chandras
<
[email protected]
>
Tue, 17 Feb 2015 15:37:38 +0000
(15:37 +0000)
A prctl() call to set FR=0 for MIPS R6 should not be allowed
since FR=1 is the only option for R6 cores.
Cc: Paul Burton <
[email protected]
>
Cc: Matthew Fortune <
[email protected]
>
Signed-off-by: Markos Chandras <
[email protected]
>
arch/mips/kernel/process.c
patch
|
blob
|
history
diff --git
a/arch/mips/kernel/process.c
b/arch/mips/kernel/process.c
index 4677b4c67da6708eecfa94f6a433ed923f6ba64b..696d59e40fa430bec52fc89859d6b7f10dd1c70b 100644
(file)
--- a/
arch/mips/kernel/process.c
+++ b/
arch/mips/kernel/process.c
@@
-581,6
+581,10
@@
int mips_set_process_fp_mode(struct task_struct *task, unsigned int value)
if ((value & PR_FP_MODE_FRE) && cpu_has_fpu && !cpu_has_fre)
return -EOPNOTSUPP;
+ /* FR = 0 not supported in MIPS R6 */
+ if (!(value & PR_FP_MODE_FR) && cpu_has_fpu && cpu_has_mips_r6)
+ return -EOPNOTSUPP;
+
/* Save FP & vector context, then disable FPU & MSA */
if (task->signal == current->signal)
lose_fpu(1);