/* * If there is one or more L2 prefetch unit present then enable * prefetching for both code & data, for all ports.
*/
pftctl = read_gcr_l2_pft_control(); if (pftctl & CM_GCR_L2_PFT_CONTROL_NPFT) {
pftctl &= ~CM_GCR_L2_PFT_CONTROL_PAGEMASK;
pftctl |= PAGE_MASK & CM_GCR_L2_PFT_CONTROL_PAGEMASK;
pftctl |= CM_GCR_L2_PFT_CONTROL_PFTEN;
write_gcr_l2_pft_control(pftctl);
/* * Check if the L2 cache controller is activated on a particular platform. * MTI's L2 controller and the L2 cache controller of Broadcom's BMIPS * cores both use c0_config2's bit 12 as "L2 Bypass" bit, that is the * cache being disabled. However there is no guarantee for this to be * true on all platforms. In an act of stupidity the spec defined bits * 12..15 as implementation defined so below function will eventually have * to be replaced by a platform specific probe.
*/ staticinlineint mips_sc_is_activated(struct cpuinfo_mips *c)
{ unsignedint config2 = read_c0_config2(); unsignedint tmp;
/* Check the bypass bit (L2B) */ switch (current_cpu_type()) { case CPU_34K: case CPU_74K: case CPU_1004K: case CPU_1074K: case CPU_INTERAPTIV: case CPU_PROAPTIV: case CPU_P5600: case CPU_BMIPS5000: case CPU_QEMU_GENERIC: case CPU_P6600: if (config2 & (1 << 12)) return 0;
}
if (current_cpu_type() == CPU_XBURST) { switch (mips_machtype) { /* * According to config2 it would be 5-ways, but that is * contradicted by all documentation.
*/ case MACH_INGENIC_JZ4770: case MACH_INGENIC_JZ4775:
c->scache.ways = 4; break;
/* * According to config2 it would be 5-ways and 512-sets, * but that is contradicted by all documentation.
*/ case MACH_INGENIC_X1000: case MACH_INGENIC_X1000E:
c->scache.sets = 256;
c->scache.ways = 4; break;
}
}
int mips_sc_init(void)
{ int found = mips_sc_probe(); if (found) {
mips_sc_enable();
mips_sc_prefetch_enable();
bcops = &mips_sc_ops;
} return found;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
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.