diff options
Diffstat (limited to 'include/asm-sh/cache.h')
| -rw-r--r-- | include/asm-sh/cache.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h index 656fdfe9e8b4..e3a180cf5062 100644 --- a/include/asm-sh/cache.h +++ b/include/asm-sh/cache.h | |||
| @@ -10,7 +10,6 @@ | |||
| 10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
| 11 | 11 | ||
| 12 | #include <asm/cpu/cache.h> | 12 | #include <asm/cpu/cache.h> |
| 13 | #include <asm/cpu/cacheflush.h> | ||
| 14 | 13 | ||
| 15 | #define SH_CACHE_VALID 1 | 14 | #define SH_CACHE_VALID 1 |
| 16 | #define SH_CACHE_UPDATED 2 | 15 | #define SH_CACHE_UPDATED 2 |
| @@ -23,24 +22,31 @@ | |||
| 23 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | 22 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) |
| 24 | 23 | ||
| 25 | struct cache_info { | 24 | struct cache_info { |
| 26 | unsigned int ways; | 25 | unsigned int ways; /* Number of cache ways */ |
| 27 | unsigned int sets; | 26 | unsigned int sets; /* Number of cache sets */ |
| 28 | unsigned int linesz; | 27 | unsigned int linesz; /* Cache line size (bytes) */ |
| 29 | 28 | ||
| 30 | unsigned int way_incr; | 29 | unsigned int way_size; /* sets * line size */ |
| 31 | 30 | ||
| 31 | /* | ||
| 32 | * way_incr is the address offset for accessing the next way | ||
| 33 | * in memory mapped cache array ops. | ||
| 34 | */ | ||
| 35 | unsigned int way_incr; | ||
| 32 | unsigned int entry_shift; | 36 | unsigned int entry_shift; |
| 33 | unsigned int entry_mask; | 37 | unsigned int entry_mask; |
| 34 | 38 | ||
| 39 | /* | ||
| 40 | * Compute a mask which selects the address bits which overlap between | ||
| 41 | * 1. those used to select the cache set during indexing | ||
| 42 | * 2. those in the physical page number. | ||
| 43 | */ | ||
| 44 | unsigned int alias_mask; | ||
| 45 | |||
| 46 | unsigned int n_aliases; /* Number of aliases */ | ||
| 47 | |||
| 35 | unsigned long flags; | 48 | unsigned long flags; |
| 36 | }; | 49 | }; |
| 37 | 50 | ||
| 38 | /* Flush (write-back only) a region (smaller than a page) */ | ||
| 39 | extern void __flush_wback_region(void *start, int size); | ||
| 40 | /* Flush (write-back & invalidate) a region (smaller than a page) */ | ||
| 41 | extern void __flush_purge_region(void *start, int size); | ||
| 42 | /* Flush (invalidate only) a region (smaller than a page) */ | ||
| 43 | extern void __flush_invalidate_region(void *start, int size); | ||
| 44 | |||
| 45 | #endif /* __KERNEL__ */ | 51 | #endif /* __KERNEL__ */ |
| 46 | #endif /* __ASM_SH_CACHE_H */ | 52 | #endif /* __ASM_SH_CACHE_H */ |
