diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 09:20:54 +0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 09:20:54 +0400 |
commit | e86d6b66f5b38680746b2cb71186d90af17f150f (patch) | |
tree | aa1074d77c65c578ece46f33a112955e0b0081e0 /include/asm-sh/processor.h | |
parent | e7be853df79fe8ae08ba7d933bd21e1dbb0db7bc (diff) | |
download | linux-e86d6b66f5b38680746b2cb71186d90af17f150f.tar.xz |
sh: prefetch()/prefetchw() support.
SH-2/3/4 are able to prefetch, add support for it..
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/processor.h')
-rw-r--r-- | include/asm-sh/processor.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index eeb0f48bb99e..e99aff706cf7 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h @@ -266,5 +266,18 @@ extern unsigned long get_wchan(struct task_struct *p); #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") #define cpu_relax() barrier() +#if defined(CONFIG_CPU_SH2A) || defined(CONFIG_CPU_SH3) || \ + defined(CONFIG_CPU_SH4) +#define PREFETCH_STRIDE L1_CACHE_BYTES +#define ARCH_HAS_PREFETCH +#define ARCH_HAS_PREFETCHW +static inline void prefetch(void *x) +{ + __asm__ __volatile__ ("pref @%0\n\t" : : "r" (x) : "memory"); +} + +#define prefetchw(x) prefetch(x) +#endif + #endif /* __KERNEL__ */ #endif /* __ASM_SH_PROCESSOR_H */ |