Lines Matching refs:c
648 struct cpuinfo_mips *c = ¤t_cpu_data; in probe_pcache() local
654 switch (c->cputype) { in probe_pcache()
660 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); in probe_pcache()
661 c->icache.ways = 2; in probe_pcache()
662 c->icache.waybit = ffs(icache_size/2) - 1; in probe_pcache()
665 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); in probe_pcache()
666 c->dcache.ways = 2; in probe_pcache()
667 c->dcache.waybit= ffs(dcache_size/2) - 1; in probe_pcache()
669 c->options |= MIPS_CPU_CACHE_CDEX_P; in probe_pcache()
675 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); in probe_pcache()
676 c->icache.ways = 2; in probe_pcache()
677 c->icache.waybit= 0; in probe_pcache()
680 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); in probe_pcache()
681 c->dcache.ways = 2; in probe_pcache()
682 c->dcache.waybit = 0; in probe_pcache()
684 c->options |= MIPS_CPU_CACHE_CDEX_P; in probe_pcache()
689 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); in probe_pcache()
690 c->icache.ways = 4; in probe_pcache()
691 c->icache.waybit= 0; in probe_pcache()
694 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); in probe_pcache()
695 c->dcache.ways = 4; in probe_pcache()
696 c->dcache.waybit = 0; in probe_pcache()
698 c->options |= MIPS_CPU_CACHE_CDEX_P; in probe_pcache()
709 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); in probe_pcache()
710 c->icache.ways = 1; in probe_pcache()
711 c->icache.waybit = 0; /* doesn't matter */ in probe_pcache()
714 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); in probe_pcache()
715 c->dcache.ways = 1; in probe_pcache()
716 c->dcache.waybit = 0; /* does not matter */ in probe_pcache()
718 c->options |= MIPS_CPU_CACHE_CDEX_P; in probe_pcache()
724 c->icache.linesz = 64; in probe_pcache()
725 c->icache.ways = 2; in probe_pcache()
726 c->icache.waybit = 0; in probe_pcache()
729 c->dcache.linesz = 32; in probe_pcache()
730 c->dcache.ways = 2; in probe_pcache()
731 c->dcache.waybit = 0; in probe_pcache()
733 c->options |= MIPS_CPU_PREFETCH; in probe_pcache()
740 if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U || in probe_pcache()
741 c->processor_id == 0x0c82U) { in probe_pcache()
747 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); in probe_pcache()
748 c->icache.ways = 2; in probe_pcache()
749 c->icache.waybit = ffs(icache_size/2) - 1; in probe_pcache()
752 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); in probe_pcache()
753 c->dcache.ways = 2; in probe_pcache()
754 c->dcache.waybit = ffs(dcache_size/2) - 1; in probe_pcache()
756 c->options |= MIPS_CPU_CACHE_CDEX_P; in probe_pcache()
766 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); in probe_pcache()
767 c->icache.ways = 1; in probe_pcache()
768 c->icache.waybit = 0; /* doesn't matter */ in probe_pcache()
771 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); in probe_pcache()
772 c->dcache.ways = 1; in probe_pcache()
773 c->dcache.waybit = 0; /* does not matter */ in probe_pcache()
775 c->options |= MIPS_CPU_CACHE_CDEX_P; in probe_pcache()
783 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); in probe_pcache()
784 c->icache.ways = 4; in probe_pcache()
785 c->icache.waybit = ffs(icache_size / c->icache.ways) - 1; in probe_pcache()
788 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); in probe_pcache()
789 c->dcache.ways = 4; in probe_pcache()
790 c->dcache.waybit = ffs(dcache_size / c->dcache.ways) - 1; in probe_pcache()
793 c->options |= MIPS_CPU_CACHE_CDEX_P; in probe_pcache()
795 c->options |= MIPS_CPU_PREFETCH; in probe_pcache()
809 c->icache.linesz = 2 << lsize; in probe_pcache()
811 c->icache.linesz = lsize; in probe_pcache()
812 c->icache.sets = 64 << ((config1 >> 22) & 7); in probe_pcache()
813 c->icache.ways = 1 + ((config1 >> 16) & 7); in probe_pcache()
815 icache_size = c->icache.sets * in probe_pcache()
816 c->icache.ways * in probe_pcache()
817 c->icache.linesz; in probe_pcache()
818 c->icache.waybit = ffs(icache_size/c->icache.ways) - 1; in probe_pcache()
821 c->icache.flags |= MIPS_CACHE_VTAG; in probe_pcache()
826 c->dcache.flags = 0; in probe_pcache()
829 c->dcache.linesz = 2 << lsize; in probe_pcache()
831 c->dcache.linesz= lsize; in probe_pcache()
832 c->dcache.sets = 64 << ((config1 >> 13) & 7); in probe_pcache()
833 c->dcache.ways = 1 + ((config1 >> 7) & 7); in probe_pcache()
835 dcache_size = c->dcache.sets * in probe_pcache()
836 c->dcache.ways * in probe_pcache()
837 c->dcache.linesz; in probe_pcache()
838 c->dcache.waybit = ffs(dcache_size/c->dcache.ways) - 1; in probe_pcache()
840 c->options |= MIPS_CPU_PREFETCH; in probe_pcache()
853 !(config & CONF_SC) && c->icache.linesz != 16 && in probe_pcache()
858 c->icache.waysize = icache_size / c->icache.ways; in probe_pcache()
859 c->dcache.waysize = dcache_size / c->dcache.ways; in probe_pcache()
861 c->icache.sets = icache_size / (c->icache.linesz * c->icache.ways); in probe_pcache()
862 c->dcache.sets = dcache_size / (c->dcache.linesz * c->dcache.ways); in probe_pcache()
870 if (c->cputype != CPU_R10000 && c->cputype != CPU_R12000) in probe_pcache()
871 if (c->dcache.waysize > PAGE_SIZE) in probe_pcache()
872 c->dcache.flags |= MIPS_CACHE_ALIASES; in probe_pcache()
874 switch (c->cputype) { in probe_pcache()
880 c->icache.flags |= MIPS_CACHE_VTAG; in probe_pcache()
884 c->icache.flags |= MIPS_CACHE_IC_F_DC; in probe_pcache()
891 way_string[c->icache.ways], c->icache.linesz); in probe_pcache()
894 dcache_size >> 10, way_string[c->dcache.ways], c->dcache.linesz); in probe_pcache()
908 struct cpuinfo_mips *c = ¤t_cpu_data; in probe_scache() local
954 c->scache.linesz = 16 << ((config & R4K_CONF_SB) >> 22); in probe_scache()
955 c->scache.ways = 1; in probe_scache()
956 c->dcache.waybit = 0; /* does not matter */ in probe_scache()
967 struct cpuinfo_mips *c = ¤t_cpu_data; in setup_scache() local
977 switch (c->cputype) { in setup_scache()
985 c->options |= MIPS_CPU_CACHE_CDEX_S; in setup_scache()
991 c->scache.linesz = 64 << ((config >> 13) & 1); in setup_scache()
992 c->scache.ways = 2; in setup_scache()
993 c->scache.waybit= 0; in setup_scache()
1018 if ((c->isa_level == MIPS_CPU_ISA_M32 || in setup_scache()
1019 c->isa_level == MIPS_CPU_ISA_M64) && in setup_scache()
1020 !(c->scache.flags & MIPS_CACHE_NOT_PRESENT)) in setup_scache()
1024 c->scache.waysize = scache_size / c->scache.ways; in setup_scache()
1026 c->scache.sets = scache_size / (c->scache.linesz * c->scache.ways); in setup_scache()
1029 scache_size >> 10, way_string[c->scache.ways], c->scache.linesz); in setup_scache()
1031 c->options |= MIPS_CPU_SUBSET_CACHES; in setup_scache()
1063 struct cpuinfo_mips *c = ¤t_cpu_data; in ld_mmu_r4xx0() local
1072 if (c->dcache.sets * c->dcache.ways > PAGE_SIZE) in ld_mmu_r4xx0()
1073 c->dcache.flags |= MIPS_CACHE_ALIASES; in ld_mmu_r4xx0()
1090 c->dcache.sets * c->dcache.linesz - 1, in ld_mmu_r4xx0()