/* * Writeback and invalidate the primary cache dcache before DMA. * (XXX These need to be fixed ...)
*/ staticvoid rm7k_sc_wback_inv(unsignedlong addr, unsignedlong size)
{ unsignedlong end, a;
/* * This is a probing function like the one found in c-r4k.c, we look for the * wrap around point with different addresses.
*/ staticvoid __probe_tcache(void)
{ unsignedlong flags, addr, begin, end, pow2;
begin = (unsignedlong) &_stext;
begin &= ~((8 * 1024 * 1024) - 1);
end = begin + (8 * 1024 * 1024);
local_irq_save(flags);
set_c0_config(RM7K_CONF_TE);
/* Fill size-multiple lines with a valid tag */
pow2 = (256 * 1024); for (addr = begin; addr <= end; addr = (begin + pow2)) { unsignedlong *p = (unsignedlong *) addr;
__asm__ __volatile__("nop" : : "r" (*p));
pow2 <<= 1;
}
/* Load first line with a 0 tag, to check after */
write_c0_taglo(0);
write_c0_taghi(0);
cache_op(Index_Store_Tag_T, begin);
/* Look for the wrap-around */
pow2 = (512 * 1024); for (addr = begin + (512 * 1024); addr <= end; addr = begin + pow2) {
cache_op(Index_Load_Tag_T, addr); if (!read_c0_taglo()) break;
pow2 <<= 1;
}
/* * While we're at it let's deal with the tertiary cache.
*/
rm7k_tcache_init = 0;
tcache_size = 0;
if (config & RM7K_CONF_TC) return;
/* * No efficient way to ask the hardware for the size of the tcache, * so must probe for it.
*/
run_uncached(__probe_tcache);
rm7k_tc_enable();
rm7k_tcache_init = 1;
c->tcache.linesz = tc_lsize;
c->tcache.ways = 1;
pr_info("Tertiary cache size %ldK.\n", (tcache_size >> 10));
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-04-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.