File tree Expand file tree Collapse file tree 5 files changed +59
-74
lines changed Expand file tree Collapse file tree 5 files changed +59
-74
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ config SUPERH
6
6
select ARCH_ENABLE_MEMORY_HOTREMOVE if SPARSEMEM && MMU
7
7
select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
8
8
select ARCH_HAS_BINFMT_FLAT if !MMU
9
+ select ARCH_HAS_CPU_FINALIZE_INIT
9
10
select ARCH_HAS_CURRENT_STACK_POINTER
10
11
select ARCH_HAS_GIGANTIC_PAGE
11
12
select ARCH_HAS_GCOV_PROFILE_ALL
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -166,6 +166,8 @@ extern unsigned int instruction_size(unsigned int insn);
166
166
#define instruction_size (insn ) (2)
167
167
#endif
168
168
169
+ void select_idle_routine (void );
170
+
169
171
#endif /* __ASSEMBLY__ */
170
172
171
173
#include <asm/processor_32.h>
Original file line number Diff line number Diff line change 15
15
#include <linux/irqflags.h>
16
16
#include <linux/smp.h>
17
17
#include <linux/atomic.h>
18
+ #include <asm/processor.h>
18
19
#include <asm/smp.h>
19
20
#include <asm/bl_bit.h>
20
21
Original file line number Diff line number Diff line change 43
43
#include <asm/smp.h>
44
44
#include <asm/mmu_context.h>
45
45
#include <asm/mmzone.h>
46
+ #include <asm/processor.h>
46
47
#include <asm/sparsemem.h>
47
48
#include <asm/platform_early.h>
48
49
@@ -354,3 +355,57 @@ int test_mode_pin(int pin)
354
355
{
355
356
return sh_mv .mv_mode_pins () & pin ;
356
357
}
358
+
359
+ void __init arch_cpu_finalize_init (void )
360
+ {
361
+ char * p = & init_utsname ()-> machine [2 ]; /* "sh" */
362
+
363
+ select_idle_routine ();
364
+
365
+ current_cpu_data .loops_per_jiffy = loops_per_jiffy ;
366
+
367
+ switch (current_cpu_data .family ) {
368
+ case CPU_FAMILY_SH2 :
369
+ * p ++ = '2' ;
370
+ break ;
371
+ case CPU_FAMILY_SH2A :
372
+ * p ++ = '2' ;
373
+ * p ++ = 'a' ;
374
+ break ;
375
+ case CPU_FAMILY_SH3 :
376
+ * p ++ = '3' ;
377
+ break ;
378
+ case CPU_FAMILY_SH4 :
379
+ * p ++ = '4' ;
380
+ break ;
381
+ case CPU_FAMILY_SH4A :
382
+ * p ++ = '4' ;
383
+ * p ++ = 'a' ;
384
+ break ;
385
+ case CPU_FAMILY_SH4AL_DSP :
386
+ * p ++ = '4' ;
387
+ * p ++ = 'a' ;
388
+ * p ++ = 'l' ;
389
+ * p ++ = '-' ;
390
+ * p ++ = 'd' ;
391
+ * p ++ = 's' ;
392
+ * p ++ = 'p' ;
393
+ break ;
394
+ case CPU_FAMILY_UNKNOWN :
395
+ /*
396
+ * Specifically use CPU_FAMILY_UNKNOWN rather than
397
+ * default:, so we're able to have the compiler whine
398
+ * about unhandled enumerations.
399
+ */
400
+ break ;
401
+ }
402
+
403
+ pr_info ("CPU: %s\n" , get_cpu_subtype (& current_cpu_data ));
404
+
405
+ #ifndef __LITTLE_ENDIAN__
406
+ /* 'eb' means 'Endian Big' */
407
+ * p ++ = 'e' ;
408
+ * p ++ = 'b' ;
409
+ #endif
410
+ * p = '\0' ;
411
+ }
You can’t perform that action at this time.
0 commit comments