aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm26/lib/csumpartialcopyuser.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm26/lib/csumpartialcopyuser.S')
-rw-r--r--arch/arm26/lib/csumpartialcopyuser.S114
1 files changed, 0 insertions, 114 deletions
diff --git a/arch/arm26/lib/csumpartialcopyuser.S b/arch/arm26/lib/csumpartialcopyuser.S
deleted file mode 100644
index a98eea74305a..000000000000
--- a/arch/arm26/lib/csumpartialcopyuser.S
+++ /dev/null
@@ -1,114 +0,0 @@
1/*
2 * linux/arch/arm26/lib/csumpartialcopyuser.S
3 *
4 * Copyright (C) 1995-1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/linkage.h>
11#include <asm/assembler.h>
12#include <asm/errno.h>
13#include <asm/asm-offsets.h>
14
15 .text
16
17 .macro save_regs
18 stmfd sp!, {r1 - r2, r4 - r9, fp, ip, lr, pc}
19 mov r9, sp, lsr #13
20 mov r9, r9, lsl #13
21 ldr r9, [r9, #TSK_ADDR_LIMIT]
22 mov r9, r9, lsr #24
23 .endm
24
25 .macro load_regs,flags
26 ldm\flags fp, {r1, r2, r4-r9, fp, sp, pc}^
27 .endm
28
29 .macro load1b, reg1
30 tst r9, #0x01
319999: ldreqbt \reg1, [r0], #1
32 ldrneb \reg1, [r0], #1
33 .section __ex_table, "a"
34 .align 3
35 .long 9999b, 6001f
36 .previous
37 .endm
38
39 .macro load2b, reg1, reg2
40 tst r9, #0x01
419999: ldreqbt \reg1, [r0], #1
42 ldrneb \reg1, [r0], #1
439998: ldreqbt \reg2, [r0], #1
44 ldrneb \reg2, [r0], #1
45 .section __ex_table, "a"
46 .long 9999b, 6001f
47 .long 9998b, 6001f
48 .previous
49 .endm
50
51 .macro load1l, reg1
52 tst r9, #0x01
539999: ldreqt \reg1, [r0], #4
54 ldrne \reg1, [r0], #4
55 .section __ex_table, "a"
56 .align 3
57 .long 9999b, 6001f
58 .previous
59 .endm
60
61 .macro load2l, reg1, reg2
62 tst r9, #0x01
63 ldmneia r0!, {\reg1, \reg2}
649999: ldreqt \reg1, [r0], #4
659998: ldreqt \reg2, [r0], #4
66 .section __ex_table, "a"
67 .long 9999b, 6001f
68 .long 9998b, 6001f
69 .previous
70 .endm
71
72 .macro load4l, reg1, reg2, reg3, reg4
73 tst r9, #0x01
74 ldmneia r0!, {\reg1, \reg2, \reg3, \reg4}
759999: ldreqt \reg1, [r0], #4
769998: ldreqt \reg2, [r0], #4
779997: ldreqt \reg3, [r0], #4
789996: ldreqt \reg4, [r0], #4
79 .section __ex_table, "a"
80 .long 9999b, 6001f
81 .long 9998b, 6001f
82 .long 9997b, 6001f
83 .long 9996b, 6001f
84 .previous
85 .endm
86
87/*
88 * unsigned int
89 * csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *err_ptr)
90 * r0 = src, r1 = dst, r2 = len, r3 = sum, [sp] = *err_ptr
91 * Returns : r0 = checksum, [[sp, #0], #0] = 0 or -EFAULT
92 */
93
94#define FN_ENTRY ENTRY(csum_partial_copy_from_user)
95
96#include "csumpartialcopygeneric.S"
97
98/*
99 * FIXME: minor buglet here
100 * We don't return the checksum for the data present in the buffer. To do
101 * so properly, we would have to add in whatever registers were loaded before
102 * the fault, which, with the current asm above is not predictable.
103 */
104 .align 4
1056001: mov r4, #-EFAULT
106 ldr r5, [fp, #4] @ *err_ptr
107 str r4, [r5]
108 ldmia sp, {r1, r2} @ retrieve dst, len
109 add r2, r2, r1
110 mov r0, #0 @ zero the buffer
1116002: teq r2, r1
112 strneb r0, [r1], #1
113 bne 6002b
114 load_regs ea