mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
ba00376b0b
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> |
||
---|---|---|
.. | ||
asm-offsets.c | ||
backtrace.c | ||
compat.c | ||
compat_signal.c | ||
early_printk.c | ||
entry.S | ||
hardwall.c | ||
head_32.S | ||
hvglue.lds | ||
init_task.c | ||
intvec_32.S | ||
irq.c | ||
machine_kexec.c | ||
Makefile | ||
messaging.c | ||
module.c | ||
pci-dma.c | ||
proc.c | ||
process.c | ||
ptrace.c | ||
reboot.c | ||
regs_32.S | ||
relocate_kernel.S | ||
setup.c | ||
signal.c | ||
single_step.c | ||
smp.c | ||
smpboot.c | ||
stack.c | ||
sys.c | ||
tile-desc_32.c | ||
time.c | ||
tlb.c | ||
traps.c | ||
vmlinux.lds.S |