linux/arch/tile
Chris Metcalf ba00376b0b arch/tile: extend syscall ABI to set r1 on return as well.
Until now, the tile architecture ABI for syscall return has just been
that r0 holds the return value, and an error is only signalled like it is
for kernel code, with a negative small number.

However, this means that in multiple places in userspace we end up writing
the same three-cycle idiom that tests for a small negative number for
error.  It seems cleaner to instead move that code into the kernel, and
set r1 to hold zero on success or errno on failure; previously, r1 was
just zeroed on return from the kernel (to avoid leaking kernel state).
This way a single conditional branch after the syscall is sufficient
to test for the failure case.  The number of cycles taken is the same,
but the error-checking code is in just one place, so total code size is
smaller, and random userspace syscall code is easier to understand.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2010-08-13 16:37:00 -04:00
..
configs arch/tile: Various cleanups. 2010-08-13 08:52:19 -04:00
include arch/tile: Various cleanups. 2010-08-13 08:52:19 -04:00
kernel arch/tile: extend syscall ABI to set r1 on return as well. 2010-08-13 16:37:00 -04:00
lib arch/tile: Various cleanups. 2010-08-13 08:52:19 -04:00
mm arch/tile: Various cleanups. 2010-08-13 08:52:19 -04:00
Kbuild arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
Kconfig arch/tile: Add driver to enable access to the user dynamic network. 2010-07-06 13:34:15 -04:00
Kconfig.debug arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
Makefile arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00