1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * This file is subject to the terms and conditions of the GNU General Public
4  * License.  See the file "COPYING" in the main directory of this archive
5  * for more details.
6  *
7  * Copyright (C) 2020 Loongson Technology Co., Ltd.
8  */
9 #ifndef __ASM_PREFETCH_H
10 #define __ASM_PREFETCH_H
11 
12 #define Pref_Load	0
13 #define Pref_Store	8
14 
15 #ifdef __ASSEMBLY__
16 
17 	.macro	__pref hint addr
18 #ifdef CONFIG_CPU_HAS_PREFETCH
19 	preld	\hint, \addr, 0
20 #endif
21 	.endm
22 
23 	.macro	pref_load addr
24 	__pref	Pref_Load, \addr
25 	.endm
26 
27 	.macro	pref_store addr
28 	__pref	Pref_Store, \addr
29 	.endm
30 
31 #endif
32 
33 #endif /* __ASM_PREFETCH_H */
34