diff options
author | Helge Deller <deller@gmx.de> | 2021-09-09 12:47:00 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2021-09-09 22:53:09 +0200 |
commit | 671028728083e856e9919221b109e3b2cd2ccc49 (patch) | |
tree | 33ffc4a1a206297eab9314d3fd00eaba29417a32 /arch/parisc/lib/lusercopy.S | |
parent | parisc: Mark sched_clock unstable only if clocks are not syncronized (diff) | |
download | linux-671028728083e856e9919221b109e3b2cd2ccc49.tar.xz linux-671028728083e856e9919221b109e3b2cd2ccc49.zip |
parisc: Implement __get/put_kernel_nofault()
Remove CONFIG_SET_FS from parisc, so we need to add
__get_kernel_nofault() and __put_kernel_nofault(), define
HAVE_GET_KERNEL_NOFAULT and remove set_fs(), get_fs(), load_sr2(),
thread_info->addr_limit, KERNEL_DS and USER_DS.
The nice side-effect of this patch is that we now can directly access
userspace via sr3 without the need to use a temporary sr2 which is
either copied from sr3 or set to zero (for kernel space).
Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Arnd Bergmann <arnd@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | arch/parisc/lib/lusercopy.S | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/arch/parisc/lib/lusercopy.S b/arch/parisc/lib/lusercopy.S index 0aad5ce89f4d..b428d29e45fb 100644 --- a/arch/parisc/lib/lusercopy.S +++ b/arch/parisc/lib/lusercopy.S @@ -28,21 +28,6 @@ #include <linux/linkage.h> /* - * get_sr gets the appropriate space value into - * sr1 for kernel/user space access, depending - * on the flag stored in the task structure. - */ - - .macro get_sr - mfctl %cr30,%r1 - ldw TI_SEGMENT(%r1),%r22 - mfsp %sr3,%r1 - or,<> %r22,%r0,%r0 - copy %r0,%r1 - mtsp %r1,%sr1 - .endm - - /* * unsigned long lclear_user(void *to, unsigned long n) * * Returns 0 for success. @@ -51,10 +36,9 @@ ENTRY_CFI(lclear_user) comib,=,n 0,%r25,$lclu_done - get_sr $lclu_loop: addib,<> -1,%r25,$lclu_loop -1: stbs,ma %r0,1(%sr1,%r26) +1: stbs,ma %r0,1(%sr3,%r26) $lclu_done: bv %r0(%r2) |