diff options
author | David S. Miller <davem@davemloft.net> | 2007-08-16 04:47:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-08-16 04:47:25 -0400 |
commit | cf5adce11743e98739fcb97e76d688f0b0bc2199 (patch) | |
tree | 3cea4d74363a6570bbe5aaf4e723e3c256ffb591 /arch/sparc64/lib/NG2copy_from_user.S | |
parent | 0fdb7f96d8c27e37ed2ca1ae5a763baf14b8fe0c (diff) |
[SPARC64]: Niagara-2 optimized copies.
The bzero/memset implementation stays the same as Niagara-1.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/lib/NG2copy_from_user.S')
-rw-r--r-- | arch/sparc64/lib/NG2copy_from_user.S | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/sparc64/lib/NG2copy_from_user.S b/arch/sparc64/lib/NG2copy_from_user.S new file mode 100644 index 000000000000..c77ef5f22102 --- /dev/null +++ b/arch/sparc64/lib/NG2copy_from_user.S | |||
@@ -0,0 +1,40 @@ | |||
1 | /* NG2copy_from_user.S: Niagara-2 optimized copy from userspace. | ||
2 | * | ||
3 | * Copyright (C) 2007 David S. Miller (davem@davemloft.net) | ||
4 | */ | ||
5 | |||
6 | #define EX_LD(x) \ | ||
7 | 98: x; \ | ||
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: wr %g0, ASI_AIUS, %asi;\ | ||
11 | retl; \ | ||
12 | mov 1, %o0; \ | ||
13 | .section __ex_table,"a";\ | ||
14 | .align 4; \ | ||
15 | .word 98b, 99b; \ | ||
16 | .text; \ | ||
17 | .align 4; | ||
18 | |||
19 | #ifndef ASI_AIUS | ||
20 | #define ASI_AIUS 0x11 | ||
21 | #endif | ||
22 | |||
23 | #ifndef ASI_BLK_AIUS_4V | ||
24 | #define ASI_BLK_AIUS_4V 0x17 | ||
25 | #endif | ||
26 | |||
27 | #define FUNC_NAME NG2copy_from_user | ||
28 | #define LOAD(type,addr,dest) type##a [addr] %asi, dest | ||
29 | #define LOAD_BLK(addr,dest) ldda [addr] ASI_BLK_AIUS_4V, dest | ||
30 | #define EX_RETVAL(x) 0 | ||
31 | |||
32 | #ifdef __KERNEL__ | ||
33 | #define PREAMBLE \ | ||
34 | rd %asi, %g1; \ | ||
35 | cmp %g1, ASI_AIUS; \ | ||
36 | bne,pn %icc, memcpy_user_stub; \ | ||
37 | nop | ||
38 | #endif | ||
39 | |||
40 | #include "NG2memcpy.S" | ||