/* * LOONGSON-2 has a 4 entry itlb which is a subset of jtlb, LOONGSON-3 has * a 4 entry itlb and a 4 entry dtlb which are subsets of jtlb. Unfortunately, * itlb/dtlb are not totally transparent to software. */ static inline void flush_micro_tlb(void) { switch (current_cpu_type()) { case CPU_LOONGSON2: write_c0_diag(LOONGSON_DIAG_ITLB); break; case CPU_LOONGSON3: write_c0_diag(LOONGSON_DIAG_ITLB | LOONGSON_DIAG_DTLB); break; default: break; } }
/* * LOONGSON2/3 has a 4 entry itlb which is a subset of dtlb, * unfortunately, itlb is not totally transparent to software. */ static inline void flush_itlb(void) { switch (current_cpu_type()) { case CPU_LOONGSON2: case CPU_LOONGSON3: write_c0_diag(4); break; default: break; } }