]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arch/tile: optimize get_user/put_user and friends
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 29 Mar 2012 17:39:51 +0000 (13:39 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Fri, 30 Mar 2012 22:55:27 +0000 (18:55 -0400)
commite3e1855b26f0814b36c03cc5dc9c7eededc8f477
treeaddc5e2d7aec0e8a181fec953306d34e8a7eee1f
parent4871d75d487b1cbc86c6bb9a364d13859bc2d20d
arch/tile: optimize get_user/put_user and friends

Use direct load/store for the get_user/put_user.

Previously, we would call out to a helper routine that would do the
appropriate thing and then return, handling the possible exception
internally.  Now we inline the load or store, along with a "we succeeded"
indication in a register; if the load or store faults, we write a
"we failed" indication into the same register and then return to the
following instruction.  This is more efficient and gives us more compact
code, as well as being more in line with what other architectures do.

The special futex assembly source file for TILE-Gx also disappears in
this change; we just use the same inlining idiom there as well, putting
the appropriate atomic operations directly into futex_atomic_op_inuser()
(and thus into the FUTEX_WAIT function).

The underlying atomic copy_from_user, copy_to_user functions were
renamed using the (cryptic) x86 convention as copy_from_user_ll and
copy_to_user_ll.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/include/asm/atomic_32.h
arch/tile/include/asm/futex.h
arch/tile/include/asm/uaccess.h
arch/tile/kernel/Makefile
arch/tile/lib/atomic_32.c
arch/tile/lib/exports.c
arch/tile/lib/usercopy_32.S
arch/tile/lib/usercopy_64.S