Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / arch / sparc64 / lib / NGcopy_to_user.S
CommitLineData
398d1083
DM
1/* NGcopy_to_user.S: Niagara optimized copy to userspace.
2 *
25e5566e 3 * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
398d1083
DM
4 */
5
6#define EX_ST(x) \
798: x; \
8 .section .fixup; \
9 .align 4; \
1099: wr %g0, ASI_AIUS, %asi;\
25e5566e
DM
11 ret; \
12 restore %g0, 1, %o0; \
398d1083
DM
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#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
25e5566e 26#define EX_RETVAL(x) %g0
398d1083
DM
27
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
39
0d4bc95b 40#include "NGmemcpy.S"
This page took 0.253824 seconds and 5 git commands to generate.