Skip to content

Commit

Permalink
xtensa: deprecate fast_xtensa and fast_spill_registers syscalls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Max Filippov committed Aug 14, 2014
1 parent 3cfc096 commit 9184289
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
26 changes: 26 additions & 0 deletions arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,32 @@ config HIGHMEM

If unsure, say Y.

config FAST_SYSCALL_XTENSA
bool "Enable fast atomic syscalls"
default n
help
fast_syscall_xtensa is a syscall that can make atomic operations
on UP kernel when processor has no s32c1i support.

This syscall is deprecated. It may have issues when called with
invalid arguments. It is provided only for backwards compatibility.
Only enable it if your userspace software requires it.

If unsure, say N.

config FAST_SYSCALL_SPILL_REGISTERS
bool "Enable spill registers syscall"
default n
help
fast_syscall_spill_registers is a syscall that spills all active
register windows of a calling userspace task onto its stack.

This syscall is deprecated. It may have issues when called with
invalid arguments. It is provided only for backwards compatibility.
Only enable it if your userspace software requires it.

If unsure, say N.

endmenu

config XTENSA_CALIBRATE_CCOUNT
Expand Down
28 changes: 28 additions & 0 deletions arch/xtensa/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ ENDPROC(fast_syscall_unrecoverable)
* j done
*/

#ifdef CONFIG_FAST_SYSCALL_XTENSA

#define TRY \
.section __ex_table, "a"; \
.word 66f, 67f; \
Expand Down Expand Up @@ -1049,6 +1051,18 @@ CATCH

ENDPROC(fast_syscall_xtensa)

#else /* CONFIG_FAST_SYSCALL_XTENSA */

ENTRY(fast_syscall_xtensa)

l32i a0, a2, PT_AREG0 # restore a0
movi a2, -ENOSYS
rfe

ENDPROC(fast_syscall_xtensa)

#endif /* CONFIG_FAST_SYSCALL_XTENSA */


/* fast_syscall_spill_registers.
*
Expand All @@ -1064,6 +1078,8 @@ ENDPROC(fast_syscall_xtensa)
* Note: We assume the stack pointer is EXC_TABLE_KSTK in the fixup handler.
*/

#ifdef CONFIG_FAST_SYSCALL_SPILL_REGISTERS

ENTRY(fast_syscall_spill_registers)

/* Register a FIXUP handler (pass current wb as a parameter) */
Expand Down Expand Up @@ -1398,6 +1414,18 @@ ENTRY(fast_syscall_spill_registers_fixup_return)

ENDPROC(fast_syscall_spill_registers_fixup_return)

#else /* CONFIG_FAST_SYSCALL_SPILL_REGISTERS */

ENTRY(fast_syscall_spill_registers)

l32i a0, a2, PT_AREG0 # restore a0
movi a2, -ENOSYS
rfe

ENDPROC(fast_syscall_spill_registers)

#endif /* CONFIG_FAST_SYSCALL_SPILL_REGISTERS */

#ifdef CONFIG_MMU
/*
* We should never get here. Bail out!
Expand Down

0 comments on commit 9184289

Please sign in to comment.