usb: Add support for the mos7820/7840-based B&B USB/RS485 converter to mos7840.c
[linux-2.6/mini2440.git] / arch / sparc64 / lib / NG2copy_from_user.S
blobc77ef5f22102bc25e5db7c869bc6e4c84695d0f3
1 /* NG2copy_from_user.S: Niagara-2 optimized copy from userspace.
2  *
3  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
4  */
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;
19 #ifndef ASI_AIUS
20 #define ASI_AIUS        0x11
21 #endif
23 #ifndef ASI_BLK_AIUS_4V
24 #define ASI_BLK_AIUS_4V 0x17
25 #endif
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
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
40 #include "NG2memcpy.S"