ia64/kvm: compilation fix. export account_system_vtime.
[pv_ops_mirror.git] / arch / sparc64 / lib / NGcopy_to_user.S
blob6ea01c5532a0a87e30f4a737dee0a44b55da3df1
1 /* NGcopy_to_user.S: Niagara optimized copy to userspace.
2  *
3  * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
4  */
6 #define EX_ST(x)                \
7 98:     x;                      \
8         .section .fixup;        \
9         .align 4;               \
10 99:     wr      %g0, ASI_AIUS, %asi;\
11         ret;                    \
12          restore %g0, 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 #define FUNC_NAME               NGcopy_to_user
24 #define STORE(type,src,addr)    type##a src, [addr] ASI_AIUS
25 #define STORE_ASI               ASI_BLK_INIT_QUAD_LDD_AIUS
26 #define EX_RETVAL(x)            %g0
28 #ifdef __KERNEL__
29         /* Writing to %asi is _expensive_ so we hardcode it.
30          * Reading %asi to check for KERNEL_DS is comparatively
31          * cheap.
32          */
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 "NGmemcpy.S"