[PATCH] NFS: Fix race in nfs_release_page()
[linux-2.6/mini2440.git] / arch / sparc64 / lib / NGcopy_to_user.S
blob34112d5054ef9895e21d365284ce76b0042bbab0
1 /* NGcopy_to_user.S: Niagara optimized copy to userspace.
2  *
3  * Copyright (C) 2006 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         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 #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)            0
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"