18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 48c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 58c2ecf20Sopenharmony_ci * for more details. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright (C) 2020 Loongson Technology Co., Ltd. 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci#ifndef __ASM_PREFETCH_H 108c2ecf20Sopenharmony_ci#define __ASM_PREFETCH_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define Pref_Load 0 138c2ecf20Sopenharmony_ci#define Pref_Store 8 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#ifdef __ASSEMBLY__ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci .macro __pref hint addr 188c2ecf20Sopenharmony_ci#ifdef CONFIG_CPU_HAS_PREFETCH 198c2ecf20Sopenharmony_ci preld \hint, \addr, 0 208c2ecf20Sopenharmony_ci#endif 218c2ecf20Sopenharmony_ci .endm 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci .macro pref_load addr 248c2ecf20Sopenharmony_ci __pref Pref_Load, \addr 258c2ecf20Sopenharmony_ci .endm 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci .macro pref_store addr 288c2ecf20Sopenharmony_ci __pref Pref_Store, \addr 298c2ecf20Sopenharmony_ci .endm 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#endif 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#endif /* __ASM_PREFETCH_H */ 34