Lines Matching +full:d +full:- +full:cache +full:- +full:sets

6  * Copyright (C) 2005-2007 Cavium Networks
20 #include <asm/cpu-features.h>
21 #include <asm/cpu-type.h>
35 * tagged cache. No flushing is needed
49 * Flush local I-cache for the specified range.
58 * octeon_flush_icache_all_cores - Flush caches as necessary for all cores
82 mask = *mm_cpumask(vma->vm_mm); in octeon_flush_icache_all_cores()
104 * octeon_flush_cache_mm - flush all memory associated with a memory context.
128 * octeon_flush_cache_range - Flush a range out of a vma
137 if (vma->vm_flags & VM_EXEC) in octeon_flush_cache_range()
143 * octeon_flush_cache_page - Flush a specific page of a vma
152 if (vma->vm_flags & VM_EXEC) in octeon_flush_cache_page()
177 c->icache.linesz = 2 << ((config1 >> 19) & 7); in probe_octeon()
178 c->icache.sets = 64 << ((config1 >> 22) & 7); in probe_octeon()
179 c->icache.ways = 1 + ((config1 >> 16) & 7); in probe_octeon()
180 c->icache.flags |= MIPS_CACHE_VTAG; in probe_octeon()
182 c->icache.sets * c->icache.ways * c->icache.linesz; in probe_octeon()
183 c->icache.waybit = ffs(icache_size / c->icache.ways) - 1; in probe_octeon()
184 c->dcache.linesz = 128; in probe_octeon()
186 c->dcache.sets = 2; /* CN5XXX has two Dcache sets */ in probe_octeon()
188 c->dcache.sets = 1; /* CN3XXX has one Dcache set */ in probe_octeon()
189 c->dcache.ways = 64; in probe_octeon()
191 c->dcache.sets * c->dcache.ways * c->dcache.linesz; in probe_octeon()
192 c->dcache.waybit = ffs(dcache_size / c->dcache.ways) - 1; in probe_octeon()
193 c->options |= MIPS_CPU_PREFETCH; in probe_octeon()
197 c->icache.linesz = 2 << ((config1 >> 19) & 7); in probe_octeon()
198 c->icache.sets = 8; in probe_octeon()
199 c->icache.ways = 37; in probe_octeon()
200 c->icache.flags |= MIPS_CACHE_VTAG; in probe_octeon()
201 icache_size = c->icache.sets * c->icache.ways * c->icache.linesz; in probe_octeon()
203 c->dcache.linesz = 128; in probe_octeon()
204 c->dcache.ways = 32; in probe_octeon()
205 c->dcache.sets = 8; in probe_octeon()
206 dcache_size = c->dcache.sets * c->dcache.ways * c->dcache.linesz; in probe_octeon()
207 c->options |= MIPS_CPU_PREFETCH; in probe_octeon()
211 c->icache.linesz = 128; in probe_octeon()
212 c->icache.sets = 16; in probe_octeon()
213 c->icache.ways = 39; in probe_octeon()
214 c->icache.flags |= MIPS_CACHE_VTAG; in probe_octeon()
215 icache_size = c->icache.sets * c->icache.ways * c->icache.linesz; in probe_octeon()
217 c->dcache.linesz = 128; in probe_octeon()
218 c->dcache.ways = 32; in probe_octeon()
219 c->dcache.sets = 8; in probe_octeon()
220 dcache_size = c->dcache.sets * c->dcache.ways * c->dcache.linesz; in probe_octeon()
221 c->options |= MIPS_CPU_PREFETCH; in probe_octeon()
229 /* compute a couple of other cache variables */ in probe_octeon()
230 c->icache.waysize = icache_size / c->icache.ways; in probe_octeon()
231 c->dcache.waysize = dcache_size / c->dcache.ways; in probe_octeon()
233 c->icache.sets = icache_size / (c->icache.linesz * c->icache.ways); in probe_octeon()
234 c->dcache.sets = dcache_size / (c->dcache.linesz * c->dcache.ways); in probe_octeon()
237 pr_info("Primary instruction cache %ldkB, %s, %d way, " in probe_octeon()
238 "%d sets, linesize %d bytes.\n", in probe_octeon()
242 c->icache.ways, c->icache.sets, c->icache.linesz); in probe_octeon()
244 pr_info("Primary data cache %ldkB, %d-way, %d sets, " in probe_octeon()
245 "linesize %d bytes.\n", in probe_octeon()
246 dcache_size >> 10, c->dcache.ways, in probe_octeon()
247 c->dcache.sets, c->dcache.linesz); in probe_octeon()
258 * Setup the Octeon cache flush routines
265 shm_align_mask = PAGE_SIZE - 1; in octeon_cache_init()
288 * Handle a cache error exception
319 pr_err("Core%lu: Cache error exception:\n", coreid); in co_cache_error_call_notifiers()
349 panic("Can't handle cache error: nested exception"); in cache_parity_error_octeon_non_recoverable()