Path: blob/master/arch/sparc/lib/GENcopy_to_user.S
10817 views
/* GENcopy_to_user.S: Generic sparc64 copy to userspace.1*2* Copyright (C) 2007 David S. Miller ([email protected])3*/45#define EX_ST(x) \698: x; \7.section __ex_table,"a";\8.align 4; \9.word 98b, __retl_one; \10.text; \11.align 4;1213#ifndef ASI_AIUS14#define ASI_AIUS 0x1115#endif1617#define FUNC_NAME GENcopy_to_user18#define STORE(type,src,addr) type##a src, [addr] ASI_AIUS19#define EX_RETVAL(x) 02021#ifdef __KERNEL__22/* Writing to %asi is _expensive_ so we hardcode it.23* Reading %asi to check for KERNEL_DS is comparatively24* cheap.25*/26#define PREAMBLE \27rd %asi, %g1; \28cmp %g1, ASI_AIUS; \29bne,pn %icc, ___copy_in_user; \30nop31#endif3233#include "GENmemcpy.S"343536