brintos

brintos / linux-shallow public Read only

0
0
Text · 1.6 KiB · 1d293ab Raw
63 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2#ifndef __SELFTESTS_POWERPC_PPC_ASM_H3#define __SELFTESTS_POWERPC_PPC_ASM_H4#include <ppc-asm.h>5 6#define CONFIG_ALTIVEC7 8#define r1	19 10#define R14 r1411#define R15 r1512#define R16 r1613#define R17 r1714#define R18 r1815#define R19 r1916#define R20 r2017#define R21 r2118#define R22 r2219#define R29 r2920#define R30 r3021#define R31 r3122 23#define STACKFRAMESIZE	25624#define STK_REG(i)	(112 + ((i)-14)*8)25 26#define _GLOBAL(A) FUNC_START(test_ ## A)27#define _GLOBAL_TOC(A) _GLOBAL(A)28#define _GLOBAL_TOC_KASAN(A) _GLOBAL(A)29#define _GLOBAL_KASAN(A) _GLOBAL(A)30#define CFUNC(name) name31 32#define PPC_MTOCRF(A, B)	mtocrf A, B33 34#define EX_TABLE(x, y)			\35	.section __ex_table,"a";	\36	.8byte	x, y;			\37	.previous38 39#define BEGIN_FTR_SECTION		.if test_feature40#define FTR_SECTION_ELSE		.else41#define ALT_FTR_SECTION_END_IFCLR(x)	.endif42#define ALT_FTR_SECTION_END_IFSET(x)	.endif43#define ALT_FTR_SECTION_END(x, y)	.endif44#define END_FTR_SECTION_IFCLR(x)	.endif45#define END_FTR_SECTION_IFSET(x)	.endif46 47/* Default to taking the first of any alternative feature sections */48test_feature = 149 50#define DCBT_SETUP_STREAMS(from, from_parms, to, to_parms, scratch)	\51	lis	scratch,0x8000;	/* GO=1 */				\52	clrldi	scratch,scratch,32;					\53	/* setup read stream 0 */					\54	dcbt	0,from,0b01000;		/* addr from */			\55	dcbt	0,from_parms,0b01010;	/* length and depth from */	\56	/* setup write stream 1 */					\57	dcbtst	0,to,0b01000;		/* addr to */			\58	dcbtst	0,to_parms,0b01010;	/* length and depth to */	\59	eieio;								\60	dcbt	0,scratch,0b01010;	/* all streams GO */61 62#endif /* __SELFTESTS_POWERPC_PPC_ASM_H */63