blob: f9113e77bc560210746e1f65af6d7b10b61ce508 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* include/asm-sh/cache.h
* Copyright 1999 (C) Niibe Yutaka
*/
#ifndef __ASM_SH_CACHE_H
#define __ASM_SH_CACHE_H
/* bytes per L1 cache line */
#if defined(__sh3__)
#define L1_CACHE_BYTES 16
#elif defined(__SH4__)
#define L1_CACHE_BYTES 32
#endif
#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
#define SMP_CACHE_BYTES L1_CACHE_BYTES
#ifdef MODULE
#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES)))
#else
#define __cacheline_aligned \
__attribute__((__aligned__(L1_CACHE_BYTES), \
__section__(".data.cacheline_aligned")))
#endif
extern void cache_flush_area(unsigned long start, unsigned long end);
extern void cache_purge_area(unsigned long start, unsigned long end);
extern void cache_wback_area(unsigned long start, unsigned long end);
#endif /* __ASM_SH_CACHE_H */
|