aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-08-06 19:32:30 -0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-08-14 03:59:33 -0400
commit9184289c979e78ce466993b53fc951633441e571 (patch)
tree461e8c512c9fc4f960005af5acf89f5135bbb82b /arch
parent3cfc096e4c4fbc234634cf8a30d40348a25fc9ba (diff)
xtensa: deprecate fast_xtensa and fast_spill_registers syscalls
These syscalls are not used by userspace tools for some time now, and they have issues when called with invalid arguments. It's not worth changing signal delivery mechanism as we don't expect any new users for these syscalls. Let's keep them for backwards compatibility under #ifdef, disabled by default. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/xtensa/Kconfig26
-rw-r--r--arch/xtensa/kernel/entry.S28
2 files changed, 54 insertions, 0 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 3d83c29c9232..49c6c3d94449 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -238,6 +238,32 @@ config HIGHMEM
238 238
239 If unsure, say Y. 239 If unsure, say Y.
240 240
241config FAST_SYSCALL_XTENSA
242 bool "Enable fast atomic syscalls"
243 default n
244 help
245 fast_syscall_xtensa is a syscall that can make atomic operations
246 on UP kernel when processor has no s32c1i support.
247
248 This syscall is deprecated. It may have issues when called with
249 invalid arguments. It is provided only for backwards compatibility.
250 Only enable it if your userspace software requires it.
251
252 If unsure, say N.
253
254config FAST_SYSCALL_SPILL_REGISTERS
255 bool "Enable spill registers syscall"
256 default n
257 help
258 fast_syscall_spill_registers is a syscall that spills all active
259 register windows of a calling userspace task onto its stack.
260
261 This syscall is deprecated. It may have issues when called with
262 invalid arguments. It is provided only for backwards compatibility.
263 Only enable it if your userspace software requires it.
264
265 If unsure, say N.
266
241endmenu 267endmenu
242 268
243config XTENSA_CALIBRATE_CCOUNT 269config XTENSA_CALIBRATE_CCOUNT
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
index a06b7efaae82..82bbfa5a05b3 100644
--- a/arch/xtensa/kernel/entry.S
+++ b/arch/xtensa/kernel/entry.S
@@ -986,6 +986,8 @@ ENDPROC(fast_syscall_unrecoverable)
986 * j done 986 * j done
987 */ 987 */
988 988
989#ifdef CONFIG_FAST_SYSCALL_XTENSA
990
989#define TRY \ 991#define TRY \
990 .section __ex_table, "a"; \ 992 .section __ex_table, "a"; \
991 .word 66f, 67f; \ 993 .word 66f, 67f; \
@@ -1049,6 +1051,18 @@ CATCH
1049 1051
1050ENDPROC(fast_syscall_xtensa) 1052ENDPROC(fast_syscall_xtensa)
1051 1053
1054#else /* CONFIG_FAST_SYSCALL_XTENSA */
1055
1056ENTRY(fast_syscall_xtensa)
1057
1058 l32i a0, a2, PT_AREG0 # restore a0
1059 movi a2, -ENOSYS
1060 rfe
1061
1062ENDPROC(fast_syscall_xtensa)
1063
1064#endif /* CONFIG_FAST_SYSCALL_XTENSA */
1065
1052 1066
1053/* fast_syscall_spill_registers. 1067/* fast_syscall_spill_registers.
1054 * 1068 *
@@ -1064,6 +1078,8 @@ ENDPROC(fast_syscall_xtensa)
1064 * Note: We assume the stack pointer is EXC_TABLE_KSTK in the fixup handler. 1078 * Note: We assume the stack pointer is EXC_TABLE_KSTK in the fixup handler.
1065 */ 1079 */
1066 1080
1081#ifdef CONFIG_FAST_SYSCALL_SPILL_REGISTERS
1082
1067ENTRY(fast_syscall_spill_registers) 1083ENTRY(fast_syscall_spill_registers)
1068 1084
1069 /* Register a FIXUP handler (pass current wb as a parameter) */ 1085 /* Register a FIXUP handler (pass current wb as a parameter) */
@@ -1398,6 +1414,18 @@ ENTRY(fast_syscall_spill_registers_fixup_return)
1398 1414
1399ENDPROC(fast_syscall_spill_registers_fixup_return) 1415ENDPROC(fast_syscall_spill_registers_fixup_return)
1400 1416
1417#else /* CONFIG_FAST_SYSCALL_SPILL_REGISTERS */
1418
1419ENTRY(fast_syscall_spill_registers)
1420
1421 l32i a0, a2, PT_AREG0 # restore a0
1422 movi a2, -ENOSYS
1423 rfe
1424
1425ENDPROC(fast_syscall_spill_registers)
1426
1427#endif /* CONFIG_FAST_SYSCALL_SPILL_REGISTERS */
1428
1401#ifdef CONFIG_MMU 1429#ifdef CONFIG_MMU
1402/* 1430/*
1403 * We should never get here. Bail out! 1431 * We should never get here. Bail out!