@@ -61,6 +61,7 @@ config MIPS
select HAVE_NMI
select HAVE_OPROFILE
select HAVE_PERF_EVENTS
+ select HAVE_PRCTL_ARCH
select HAVE_REGS_AND_STACK_ACCESS_API
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP
@@ -420,7 +420,4 @@ extern int mips_get_process_fp_mode(struct task_struct *task);
extern int mips_set_process_fp_mode(struct task_struct *task,
unsigned int value);
-#define GET_FP_MODE() mips_get_process_fp_mode()
-#define SET_FP_MODE(value) mips_set_process_fp_mode(value)
-
#endif /* _ASM_PROCESSOR_H */
@@ -35,6 +35,7 @@
#include <asm/cachectl.h>
#include <asm/cacheflush.h>
#include <asm/asm-offsets.h>
+#include <asm/processor.h>
#include <asm/signal.h>
#include <asm/sim.h>
#include <asm/shmparam.h>
@@ -237,6 +238,19 @@ SYSCALL_DEFINE3(cachectl, char *, addr, int, nbytes, int, op)
return -ENOSYS;
}
+int prctl_arch(int option, unsigned long arg2, unsigned long arg3,
+ unsigned long arg4, unsigned long arg5)
+{
+ switch (option) {
+ case PR_SET_FP_MODE:
+ return mips_set_process_fp_mode(arg2);
+ case PR_GET_FP_MODE:
+ return mips_get_process_fp_mode();
+ default:
+ return -EINVAL;
+ }
+}
+
/*
* If we ever come here the user sp is bad. Zap the process right away.
* Due to the bad stack signaling wouldn't work.
@@ -107,12 +107,6 @@
#ifndef MPX_DISABLE_MANAGEMENT
# define MPX_DISABLE_MANAGEMENT() (-EINVAL)
#endif
-#ifndef GET_FP_MODE
-# define GET_FP_MODE() (-EINVAL)
-#endif
-#ifndef SET_FP_MODE
-# define SET_FP_MODE(a) (-EINVAL)
-#endif
/*
* this is where the system-wide overflow UID and GID are defined, for
@@ -2432,12 +2426,6 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
return -EINVAL;
error = MPX_DISABLE_MANAGEMENT();
break;
- case PR_SET_FP_MODE:
- error = SET_FP_MODE(arg2);
- break;
- case PR_GET_FP_MODE:
- error = GET_FP_MODE();
- break;
default:
error = prctl_arch(option, arg2, arg3, arg4, arg5);
break;
This patch moves the MIPS-specific prctl call implementations out of core code and removes redundant boilerplate associated with them. No functional change. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> --- arch/mips/Kconfig | 1 + arch/mips/include/asm/processor.h | 3 --- arch/mips/kernel/syscall.c | 14 ++++++++++++++ kernel/sys.c | 12 ------------ 4 files changed, 15 insertions(+), 15 deletions(-) -- 2.1.4