aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-10-02 09:54:20 -0400
committerVineet Gupta <vgupta@synopsys.com>2015-10-17 08:18:26 -0400
commitd0890ea5b68f63d7b8641455dc5534886fee2fa1 (patch)
tree104314abfdcb73e3a914138b12dfa92a8b772a7c
parent964cf28f9d10f4e5229e4365258c292bc5c856b2 (diff)
ARC: boot log: decode more mmu config items
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r--arch/arc/include/asm/arcregs.h2
-rw-r--r--arch/arc/mm/tlb.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h
index dc9e65a8d722..7fac7d85ed6a 100644
--- a/arch/arc/include/asm/arcregs.h
+++ b/arch/arc/include/asm/arcregs.h
@@ -327,7 +327,7 @@ struct bcr_generic {
327 */ 327 */
328 328
329struct cpuinfo_arc_mmu { 329struct cpuinfo_arc_mmu {
330 unsigned int ver:4, pg_sz_k:8, s_pg_sz_m:8, pad:12; 330 unsigned int ver:4, pg_sz_k:8, s_pg_sz_m:8, pad:10, sasid:1, pae:1;
331 unsigned int sets:12, ways:4, u_dtlb:8, u_itlb:8; 331 unsigned int sets:12, ways:4, u_dtlb:8, u_itlb:8;
332}; 332};
333 333
diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c
index a69f2078a96d..2a30c91f7977 100644
--- a/arch/arc/mm/tlb.c
+++ b/arch/arc/mm/tlb.c
@@ -723,10 +723,10 @@ void read_decode_mmu_bcr(void)
723 723
724 struct bcr_mmu_3 { 724 struct bcr_mmu_3 {
725#ifdef CONFIG_CPU_BIG_ENDIAN 725#ifdef CONFIG_CPU_BIG_ENDIAN
726 unsigned int ver:8, ways:4, sets:4, osm:1, reserv:3, pg_sz:4, 726 unsigned int ver:8, ways:4, sets:4, res:3, sasid:1, pg_sz:4,
727 u_itlb:4, u_dtlb:4; 727 u_itlb:4, u_dtlb:4;
728#else 728#else
729 unsigned int u_dtlb:4, u_itlb:4, pg_sz:4, reserv:3, osm:1, sets:4, 729 unsigned int u_dtlb:4, u_itlb:4, pg_sz:4, sasid:1, res:3, sets:4,
730 ways:4, ver:8; 730 ways:4, ver:8;
731#endif 731#endif
732 } *mmu3; 732 } *mmu3;
@@ -747,7 +747,7 @@ void read_decode_mmu_bcr(void)
747 747
748 if (mmu->ver <= 2) { 748 if (mmu->ver <= 2) {
749 mmu2 = (struct bcr_mmu_1_2 *)&tmp; 749 mmu2 = (struct bcr_mmu_1_2 *)&tmp;
750 mmu->pg_sz_k = TO_KB(PAGE_SIZE); 750 mmu->pg_sz_k = TO_KB(0x2000);
751 mmu->sets = 1 << mmu2->sets; 751 mmu->sets = 1 << mmu2->sets;
752 mmu->ways = 1 << mmu2->ways; 752 mmu->ways = 1 << mmu2->ways;
753 mmu->u_dtlb = mmu2->u_dtlb; 753 mmu->u_dtlb = mmu2->u_dtlb;
@@ -759,6 +759,7 @@ void read_decode_mmu_bcr(void)
759 mmu->ways = 1 << mmu3->ways; 759 mmu->ways = 1 << mmu3->ways;
760 mmu->u_dtlb = mmu3->u_dtlb; 760 mmu->u_dtlb = mmu3->u_dtlb;
761 mmu->u_itlb = mmu3->u_itlb; 761 mmu->u_itlb = mmu3->u_itlb;
762 mmu->sasid = mmu3->sasid;
762 } else { 763 } else {
763 mmu4 = (struct bcr_mmu_4 *)&tmp; 764 mmu4 = (struct bcr_mmu_4 *)&tmp;
764 mmu->pg_sz_k = 1 << (mmu4->sz0 - 1); 765 mmu->pg_sz_k = 1 << (mmu4->sz0 - 1);
@@ -767,6 +768,8 @@ void read_decode_mmu_bcr(void)
767 mmu->ways = mmu4->n_ways * 2; 768 mmu->ways = mmu4->n_ways * 2;
768 mmu->u_dtlb = mmu4->u_dtlb * 4; 769 mmu->u_dtlb = mmu4->u_dtlb * 4;
769 mmu->u_itlb = mmu4->u_itlb * 4; 770 mmu->u_itlb = mmu4->u_itlb * 4;
771 mmu->sasid = mmu4->sasid;
772 mmu->pae = mmu4->pae;
770 } 773 }
771} 774}
772 775
@@ -782,11 +785,10 @@ char *arc_mmu_mumbojumbo(int cpu_id, char *buf, int len)
782 IS_USED_CFG(CONFIG_TRANSPARENT_HUGEPAGE)); 785 IS_USED_CFG(CONFIG_TRANSPARENT_HUGEPAGE));
783 786
784 n += scnprintf(buf + n, len - n, 787 n += scnprintf(buf + n, len - n,
785 "MMU [v%x]\t: %dk PAGE, %sJTLB %d (%dx%d), uDTLB %d, uITLB %d %s\n", 788 "MMU [v%x]\t: %dK PAGE, %sJTLB %d (%dx%d), uDTLB %d, uITLB %d\n",
786 p_mmu->ver, p_mmu->pg_sz_k, super_pg, 789 p_mmu->ver, p_mmu->pg_sz_k, super_pg,
787 p_mmu->sets * p_mmu->ways, p_mmu->sets, p_mmu->ways, 790 p_mmu->sets * p_mmu->ways, p_mmu->sets, p_mmu->ways,
788 p_mmu->u_dtlb, p_mmu->u_itlb, 791 p_mmu->u_dtlb, p_mmu->u_itlb);
789 IS_ENABLED(CONFIG_ARC_MMU_SASID) ? ",SASID" : "");
790 792
791 return buf; 793 return buf;
792} 794}