@@ -46,51 +46,12 @@ int riscv_of_processor_hartid(struct device_node *node)
46
46
47
47
#ifdef CONFIG_PROC_FS
48
48
49
- static void print_isa (struct seq_file * f , const char * orig_isa )
49
+ static void print_isa (struct seq_file * f , const char * isa )
50
50
{
51
- static const char * ext = "mafdcsu" ;
52
- const char * isa = orig_isa ;
53
- const char * e ;
54
-
55
- /*
56
- * Linux doesn't support rv32e or rv128i, and we only support booting
57
- * kernels on harts with the same ISA that the kernel is compiled for.
58
- */
59
- #if defined(CONFIG_32BIT )
60
- if (strncmp (isa , "rv32i" , 5 ) != 0 )
61
- return ;
62
- #elif defined(CONFIG_64BIT )
63
- if (strncmp (isa , "rv64i" , 5 ) != 0 )
64
- return ;
65
- #endif
66
-
67
- /* Print the base ISA, as we already know it's legal. */
51
+ /* Print the entire ISA as it is */
68
52
seq_puts (f , "isa\t\t: " );
69
- seq_write (f , isa , 5 );
70
- isa += 5 ;
71
-
72
- /*
73
- * Check the rest of the ISA string for valid extensions, printing those
74
- * we find. RISC-V ISA strings define an order, so we only print the
75
- * extension bits when they're in order. Hide the supervisor (S)
76
- * extension from userspace as it's not accessible from there.
77
- */
78
- for (e = ext ; * e != '\0' ; ++ e ) {
79
- if (isa [0 ] == e [0 ]) {
80
- if (isa [0 ] != 's' )
81
- seq_write (f , isa , 1 );
82
-
83
- isa ++ ;
84
- }
85
- }
53
+ seq_write (f , isa , strlen (isa ));
86
54
seq_puts (f , "\n" );
87
-
88
- /*
89
- * If we were given an unsupported ISA in the device tree then print
90
- * a bit of info describing what went wrong.
91
- */
92
- if (isa [0 ] != '\0' )
93
- pr_info ("unsupported ISA \"%s\" in device tree\n" , orig_isa );
94
55
}
95
56
96
57
static void print_mmu (struct seq_file * f , const char * mmu_type )
0 commit comments