linux/arch/tile/kernel
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
..
asm-offsets.c arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
backtrace.c arch/tile: support backtracing on TILE-Gx 2010-08-13 08:40:57 -04:00
compat_signal.c arch/tile: Fix a couple of issues with the COMPAT code for TILE-Gx. 2010-08-13 08:32:21 -04:00
compat.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
early_printk.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
entry.S arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
hardwall.c arch/tile: check kmalloc() result 2010-07-16 13:37:14 -04:00
head_32.S arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
hvglue.lds arch/tile: Enable more sophisticated IRQ model for 32-bit chips. 2010-07-06 13:34:01 -04:00
init_task.c arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
intvec_32.S arch/tile: extend syscall ABI to set r1 on return as well. 2010-08-13 16:37:00 -04:00
irq.c arch/tile: Enable more sophisticated IRQ model for 32-bit chips. 2010-07-06 13:34:01 -04:00
machine_kexec.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
Makefile arch/tile: Add driver to enable access to the user dynamic network. 2010-07-06 13:34:15 -04:00
messaging.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
module.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
pci-dma.c arch/tile: Do not use GFP_KERNEL for dma_alloc_coherent(). 2010-06-05 10:26:55 -04:00
proc.c arch: tile: kernel/proc.c Removed duplicated #include 2010-08-13 08:10:16 -04:00
process.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
ptrace.c arch/tile: avoid erroneous error return for PTRACE_POKEUSR. 2010-07-06 13:42:10 -04:00
reboot.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
regs_32.S arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
relocate_kernel.S arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
setup.c arch/tile: correct a bug in freeing bootmem by VA for the optional second initrd. 2010-08-13 08:23:07 -04:00
signal.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
single_step.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
smp.c arch/tile: Enable more sophisticated IRQ model for 32-bit chips. 2010-07-06 13:34:01 -04:00
smpboot.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
stack.c arch/tile: support backtracing on TILE-Gx 2010-08-13 08:40:57 -04:00
sys.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
tile-desc_32.c arch/tile: Shrink the tile-opcode files considerably. 2010-07-06 13:40:56 -04:00
time.c arch/tile: Use separate, better minsec values for clocksource and sched_clock. 2010-08-13 08:24:22 -04:00
tlb.c arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
traps.c arch/tile: support backtracing on TILE-Gx 2010-08-13 08:40:57 -04:00
vmlinux.lds.S arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00