/* NGcopy_to_user.S: Niagara optimized copy to userspace.1*2* Copyright (C) 2006, 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, __ret_one_asi;\10.text; \11.align 4;1213#ifndef ASI_AIUS14#define ASI_AIUS 0x1115#endif1617#define FUNC_NAME NGcopy_to_user18#define STORE(type,src,addr) type##a src, [addr] ASI_AIUS19#define STORE_ASI ASI_BLK_INIT_QUAD_LDD_AIUS20#define EX_RETVAL(x) %g02122#ifdef __KERNEL__23/* Writing to %asi is _expensive_ so we hardcode it.24* Reading %asi to check for KERNEL_DS is comparatively25* cheap.26*/27#define PREAMBLE \28rd %asi, %g1; \29cmp %g1, ASI_AIUS; \30bne,pn %icc, ___copy_in_user; \31nop32#endif3334#include "NGmemcpy.S"353637