]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
parisc: Simplify and speed up get_user() and put_user()
authorHelge Deller <deller@gmx.de>
Sat, 9 Apr 2016 06:26:14 +0000 (08:26 +0200)
committerHelge Deller <deller@gmx.de>
Sun, 22 May 2016 19:38:56 +0000 (21:38 +0200)
commit06bff6b9d7d50566a9320f64b0624957798cb08b
tree62aae1924b900d7ef2415f1cf8e4c8a270c11fc9
parentfc79168a7c75423047d60a033dc4844955ccae0b
parisc: Simplify and speed up get_user() and put_user()

This patch simplifies the code for get_user() and put_user() a lot.

Instead of accessing kernel memory (%sr0) and userspace memory (%sr3)
hard-coded in the assembler instruction, we now preload %sr2 with either
%sr0 (for accessing KERNEL_DS) or with sr3 (to access USER_DS) and
use %sr2 in the load directly.

The generated code avoids a branch and speeds up execution by generating
less assembler instructions.

Signed-off-by: Helge Deller <deller@gmx.de>
Tested-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
arch/parisc/include/asm/uaccess.h