aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/parisc/Kconfig1
-rw-r--r--arch/parisc/include/asm/uaccess.h5
-rw-r--r--arch/parisc/kernel/parisc_ksyms.c1
-rw-r--r--arch/parisc/lib/lusercopy.S41
4 files changed, 3 insertions, 45 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index ddb8b24b823d..3ff21b536f28 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -18,6 +18,7 @@ config PARISC
18 select IRQ_PER_CPU 18 select IRQ_PER_CPU
19 select ARCH_HAVE_NMI_SAFE_CMPXCHG 19 select ARCH_HAVE_NMI_SAFE_CMPXCHG
20 select GENERIC_SMP_IDLE_THREAD 20 select GENERIC_SMP_IDLE_THREAD
21 select GENERIC_STRNCPY_FROM_USER
21 22
22 help 23 help
23 The PA-RISC microprocessor is designed by Hewlett-Packard and used 24 The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h
index 9ac066086f03..4ba2c93770f1 100644
--- a/arch/parisc/include/asm/uaccess.h
+++ b/arch/parisc/include/asm/uaccess.h
@@ -218,15 +218,14 @@ struct exception_data {
218extern unsigned long lcopy_to_user(void __user *, const void *, unsigned long); 218extern unsigned long lcopy_to_user(void __user *, const void *, unsigned long);
219extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long); 219extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long);
220extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long); 220extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long);
221extern long lstrncpy_from_user(char *, const char __user *, long); 221extern long strncpy_from_user(char *, const char __user *, long);
222extern unsigned lclear_user(void __user *,unsigned long); 222extern unsigned lclear_user(void __user *,unsigned long);
223extern long lstrnlen_user(const char __user *,long); 223extern long lstrnlen_user(const char __user *,long);
224
225/* 224/*
226 * Complex access routines -- macros 225 * Complex access routines -- macros
227 */ 226 */
227#define user_addr_max() (~0UL)
228 228
229#define strncpy_from_user lstrncpy_from_user
230#define strnlen_user lstrnlen_user 229#define strnlen_user lstrnlen_user
231#define strlen_user(str) lstrnlen_user(str, 0x7fffffffL) 230#define strlen_user(str) lstrnlen_user(str, 0x7fffffffL)
232#define clear_user lclear_user 231#define clear_user lclear_user
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c
index a7bb757a5497..ceec85de6290 100644
--- a/arch/parisc/kernel/parisc_ksyms.c
+++ b/arch/parisc/kernel/parisc_ksyms.c
@@ -44,7 +44,6 @@ EXPORT_SYMBOL(__cmpxchg_u64);
44#endif 44#endif
45 45
46#include <asm/uaccess.h> 46#include <asm/uaccess.h>
47EXPORT_SYMBOL(lstrncpy_from_user);
48EXPORT_SYMBOL(lclear_user); 47EXPORT_SYMBOL(lclear_user);
49EXPORT_SYMBOL(lstrnlen_user); 48EXPORT_SYMBOL(lstrnlen_user);
50 49
diff --git a/arch/parisc/lib/lusercopy.S b/arch/parisc/lib/lusercopy.S
index 1bd23ccec17b..6f2d9355efe2 100644
--- a/arch/parisc/lib/lusercopy.S
+++ b/arch/parisc/lib/lusercopy.S
@@ -61,47 +61,6 @@
61 .endm 61 .endm
62 62
63 /* 63 /*
64 * long lstrncpy_from_user(char *dst, const char *src, long n)
65 *
66 * Returns -EFAULT if exception before terminator,
67 * N if the entire buffer filled,
68 * otherwise strlen (i.e. excludes zero byte)
69 */
70
71ENTRY(lstrncpy_from_user)
72 .proc
73 .callinfo NO_CALLS
74 .entry
75 comib,= 0,%r24,$lsfu_done
76 copy %r24,%r23
77 get_sr
781: ldbs,ma 1(%sr1,%r25),%r1
79$lsfu_loop:
80 stbs,ma %r1,1(%r26)
81 comib,=,n 0,%r1,$lsfu_done
82 addib,<>,n -1,%r24,$lsfu_loop
832: ldbs,ma 1(%sr1,%r25),%r1
84$lsfu_done:
85 sub %r23,%r24,%r28
86$lsfu_exit:
87 bv %r0(%r2)
88 nop
89 .exit
90ENDPROC(lstrncpy_from_user)
91
92 .section .fixup,"ax"
933: fixup_branch $lsfu_exit
94 ldi -EFAULT,%r28
95 .previous
96
97 .section __ex_table,"aw"
98 ASM_ULONG_INSN 1b,3b
99 ASM_ULONG_INSN 2b,3b
100 .previous
101
102 .procend
103
104 /*
105 * unsigned long lclear_user(void *to, unsigned long n) 64 * unsigned long lclear_user(void *to, unsigned long n)
106 * 65 *
107 * Returns 0 for success. 66 * Returns 0 for success.