aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/riscv/kernel/cpu.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
index cccc6f61c538..3a5a2ee31547 100644
--- a/arch/riscv/kernel/cpu.c
+++ b/arch/riscv/kernel/cpu.c
@@ -81,7 +81,7 @@ static void print_isa(struct seq_file *f, const char *orig_isa)
81#endif 81#endif
82 82
83 /* Print the base ISA, as we already know it's legal. */ 83 /* Print the base ISA, as we already know it's legal. */
84 seq_puts(f, "isa\t: "); 84 seq_puts(f, "isa\t\t: ");
85 seq_write(f, isa, 5); 85 seq_write(f, isa, 5);
86 isa += 5; 86 isa += 5;
87 87
@@ -96,6 +96,7 @@ static void print_isa(struct seq_file *f, const char *orig_isa)
96 isa++; 96 isa++;
97 } 97 }
98 } 98 }
99 seq_puts(f, "\n");
99 100
100 /* 101 /*
101 * If we were given an unsupported ISA in the device tree then print 102 * If we were given an unsupported ISA in the device tree then print
@@ -116,7 +117,7 @@ static void print_mmu(struct seq_file *f, const char *mmu_type)
116 return; 117 return;
117#endif 118#endif
118 119
119 seq_printf(f, "mmu\t: %s\n", mmu_type+6); 120 seq_printf(f, "mmu\t\t: %s\n", mmu_type+6);
120} 121}
121 122
122static void *c_start(struct seq_file *m, loff_t *pos) 123static void *c_start(struct seq_file *m, loff_t *pos)
@@ -144,14 +145,15 @@ static int c_show(struct seq_file *m, void *v)
144 NULL); 145 NULL);
145 const char *compat, *isa, *mmu; 146 const char *compat, *isa, *mmu;
146 147
147 seq_printf(m, "hart\t: %lu\n", cpu_id); 148 seq_printf(m, "processor\t: %lu\n", cpu_id);
149 seq_printf(m, "hart\t\t: %lu\n", cpuid_to_hartid_map(cpu_id));
148 if (!of_property_read_string(node, "riscv,isa", &isa)) 150 if (!of_property_read_string(node, "riscv,isa", &isa))
149 print_isa(m, isa); 151 print_isa(m, isa);
150 if (!of_property_read_string(node, "mmu-type", &mmu)) 152 if (!of_property_read_string(node, "mmu-type", &mmu))
151 print_mmu(m, mmu); 153 print_mmu(m, mmu);
152 if (!of_property_read_string(node, "compatible", &compat) 154 if (!of_property_read_string(node, "compatible", &compat)
153 && strcmp(compat, "riscv")) 155 && strcmp(compat, "riscv"))
154 seq_printf(m, "uarch\t: %s\n", compat); 156 seq_printf(m, "uarch\t\t: %s\n", compat);
155 seq_puts(m, "\n"); 157 seq_puts(m, "\n");
156 158
157 return 0; 159 return 0;