X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-mips%2Fprefetch.h;h=71293ec1657c3319b52e83651007d239500139bd;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=0b712cac8b192cb1d683f26a7fc1338c4dfacea7;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-mips/prefetch.h b/include/asm-mips/prefetch.h index 0b712cac8..71293ec16 100644 --- a/include/asm-mips/prefetch.h +++ b/include/asm-mips/prefetch.h @@ -8,6 +8,8 @@ #ifndef __ASM_PREFETCH_H #define __ASM_PREFETCH_H +#include + /* * R5000 and RM5200 implements pref and prefx instructions but they're nops, so * rather than wasting time we pretend these processors don't support @@ -41,4 +43,46 @@ #define Pref_WriteBackInvalidate 25 #define Pref_PrepareForStore 30 +#ifdef __ASSEMBLY__ + + .macro __pref hint addr +#ifdef CONFIG_CPU_HAS_PREFETCH + pref \hint, \addr +#endif + .endm + + .macro pref_load addr + __pref Pref_Load, \addr + .endm + + .macro pref_store addr + __pref Pref_Store, \addr + .endm + + .macro pref_load_streamed addr + __pref Pref_LoadStreamed, \addr + .endm + + .macro pref_store_streamed addr + __pref Pref_StoreStreamed, \addr + .endm + + .macro pref_load_retained addr + __pref Pref_LoadRetained, \addr + .endm + + .macro pref_store_retained addr + __pref Pref_StoreRetained, \addr + .endm + + .macro pref_wback_inv addr + __pref Pref_WriteBackInvalidate, \addr + .endm + + .macro pref_prepare_for_store addr + __pref Pref_PrepareForStore, \addr + .endm + +#endif + #endif /* __ASM_PREFETCH_H */