From 1bb6b3860b56a5851aa7c31562c2fe10b2a6a684 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 27 Sep 2006 14:20:54 +0900 Subject: [PATCH] --- yaml --- r: 36243 b: refs/heads/master c: e86d6b66f5b38680746b2cb71186d90af17f150f h: refs/heads/master i: 36241: 8bf86edf1dc5beb8c6db7c60d8319578917b333a 36239: afa4c25ab06df4b7bf100b8f913624abe182d730 v: v3 --- [refs] | 2 +- trunk/include/asm-sh/processor.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 476f85708a2d..2e3a482df37e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e7be853df79fe8ae08ba7d933bd21e1dbb0db7bc +refs/heads/master: e86d6b66f5b38680746b2cb71186d90af17f150f diff --git a/trunk/include/asm-sh/processor.h b/trunk/include/asm-sh/processor.h index eeb0f48bb99e..e99aff706cf7 100644 --- a/trunk/include/asm-sh/processor.h +++ b/trunk/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 */