/* SPDX-License-Identifier: GPL-2.0 */1/* NGcopy_to_user.S: Niagara optimized copy to userspace.2*3* Copyright (C) 2006, 2007 David S. Miller ([email protected])4*/56#define EX_ST(x,y) \798: x; \8.section __ex_table,"a";\9.align 4; \10.word 98b, y; \11.text; \12.align 4;1314#ifndef ASI_AIUS15#define ASI_AIUS 0x1116#endif1718#define FUNC_NAME NGcopy_to_user19#define STORE(type,src,addr) type##a src, [addr] ASI_AIUS20#define STORE_ASI ASI_BLK_INIT_QUAD_LDD_AIUS21#define EX_RETVAL(x) %g02223#ifdef __KERNEL__24/* Writing to %asi is _expensive_ so we hardcode it.25* Reading %asi to check for KERNEL_DS is comparatively26* cheap.27*/28#define PREAMBLE \29rd %asi, %g1; \30cmp %g1, ASI_AIUS; \31bne,pn %icc, raw_copy_in_user; \32nop33#endif3435#include "NGmemcpy.S"363738