diff options
Diffstat (limited to 'include/asm-sh/processor.h')
-rw-r--r-- | include/asm-sh/processor.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index fa5bd2d8803e4d..0200d5419566aa 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h @@ -148,6 +148,10 @@ struct thread_struct { union sh_fpu_union fpu; }; +typedef struct { + unsigned long seg; +} mm_segment_t; + /* Count of active tasks with UBC settings */ extern int ubc_usercnt; @@ -265,5 +269,18 @@ extern unsigned long get_wchan(struct task_struct *p); #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") #define cpu_relax() do { } while (0) +#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 */ |