mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
MIPS: lib: Use kernel_pref & user_pref in memcpy()
memcpy() is the only user of the PREF() & PREFE() macros from asm/asm.h. Switch to using the kernel_pref() & user_pref() macros from asm/asm-eva.h which fit more consistently with other abstractions of EVA vs non-EVA instructions. Signed-off-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/20907/ Cc: linux-mips@linux-mips.org
This commit is contained in:
parent
e2b4054399
commit
1d6fb222bd
@ -204,9 +204,10 @@
|
|||||||
#define LOADB(reg, addr, handler) EXC(lb, LD_INSN, reg, addr, handler)
|
#define LOADB(reg, addr, handler) EXC(lb, LD_INSN, reg, addr, handler)
|
||||||
#define STOREB(reg, addr, handler) EXC(sb, ST_INSN, reg, addr, handler)
|
#define STOREB(reg, addr, handler) EXC(sb, ST_INSN, reg, addr, handler)
|
||||||
|
|
||||||
#define _PREF(hint, addr, type) \
|
#ifdef CONFIG_CPU_HAS_PREFETCH
|
||||||
|
# define _PREF(hint, addr, type) \
|
||||||
.if \mode == LEGACY_MODE; \
|
.if \mode == LEGACY_MODE; \
|
||||||
PREF(hint, addr); \
|
kernel_pref(hint, addr); \
|
||||||
.else; \
|
.else; \
|
||||||
.if ((\from == USEROP) && (type == SRC_PREFETCH)) || \
|
.if ((\from == USEROP) && (type == SRC_PREFETCH)) || \
|
||||||
((\to == USEROP) && (type == DST_PREFETCH)); \
|
((\to == USEROP) && (type == DST_PREFETCH)); \
|
||||||
@ -218,12 +219,15 @@
|
|||||||
* used later on. Therefore use $v1. \
|
* used later on. Therefore use $v1. \
|
||||||
*/ \
|
*/ \
|
||||||
.set at=v1; \
|
.set at=v1; \
|
||||||
PREFE(hint, addr); \
|
user_pref(hint, addr); \
|
||||||
.set noat; \
|
.set noat; \
|
||||||
.else; \
|
.else; \
|
||||||
PREF(hint, addr); \
|
kernel_pref(hint, addr); \
|
||||||
.endif; \
|
.endif; \
|
||||||
.endif
|
.endif
|
||||||
|
#else
|
||||||
|
# define _PREF(hint, addr, type)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PREFS(hint, addr) _PREF(hint, addr, SRC_PREFETCH)
|
#define PREFS(hint, addr) _PREF(hint, addr, SRC_PREFETCH)
|
||||||
#define PREFD(hint, addr) _PREF(hint, addr, DST_PREFETCH)
|
#define PREFD(hint, addr) _PREF(hint, addr, DST_PREFETCH)
|
||||||
|
Loading…
Reference in New Issue
Block a user