2 * Processor capabilities determination functions.
4 * Copyright (C) xxxx the Anonymous
5 * Copyright (C) 1994 - 2006 Ralf Baechle
6 * Copyright (C) 2003, 2004 Maciej W. Rozycki
7 * Copyright (C) 2001, 2004 MIPS Inc.
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
14 #include <linux/init.h>
15 #include <linux/kernel.h>
16 #include <linux/ptrace.h>
17 #include <linux/stddef.h>
22 #include <asm/mipsregs.h>
23 #include <asm/system.h>
24 #include <asm/watch.h>
27 * Not all of the MIPS CPUs have the "wait" instruction available. Moreover,
28 * the implementation of the "wait" feature differs between CPU families. This
29 * points to the function that implements CPU specific wait.
30 * The wait instruction stops the pipeline and reduces the power consumption of
33 void (*cpu_wait)(void) = NULL;
35 static void r3081_wait(void)
37 unsigned long cfg = read_c0_conf();
38 write_c0_conf(cfg | R30XX_CONF_HALT);
41 static void r39xx_wait(void)
45 write_c0_conf(read_c0_conf() | TX39_CONF_HALT);
49 extern void r4k_wait(void);
52 * This variant is preferable as it allows testing need_resched and going to
53 * sleep depending on the outcome atomically. Unfortunately the "It is
54 * implementation-dependent whether the pipeline restarts when a non-enabled
55 * interrupt is requested" restriction in the MIPS32/MIPS64 architecture makes
56 * using this version a gamble.
58 void r4k_wait_irqoff(void)
62 __asm__(" .set push \n"
67 __asm__(" .globl __pastwait \n"
73 * The RM7000 variant has to handle erratum 38. The workaround is to not
74 * have any pending stores when the WAIT instruction is executed.
76 static void rm7k_wait_irqoff(void)
86 " mtc0 $1, $12 # stalls until W stage \n"
88 " mtc0 $1, $12 # stalls until W stage \n"
93 /* The Au1xxx wait is available only if using 32khz counter or
94 * external timer source, but specifically not CP0 Counter. */
97 static void au1k_wait(void)
99 /* using the wait instruction makes CP0 counter unusable */
100 __asm__(" .set mips3 \n"
101 " cache 0x14, 0(%0) \n"
102 " cache 0x14, 32(%0) \n"
111 : : "r" (au1k_wait));
114 static int __initdata nowait = 0;
116 static int __init wait_disable(char *s)
123 __setup("nowait", wait_disable);
125 void __init check_wait(void)
127 struct cpuinfo_mips *c = ¤t_cpu_data;
130 printk("Wait instruction disabled.\n");
134 switch (c->cputype) {
137 cpu_wait = r3081_wait;
140 cpu_wait = r39xx_wait;
143 /* case CPU_R4300: */
161 cpu_wait = rm7k_wait_irqoff;
168 if (read_c0_config7() & MIPS_CONF7_WII)
169 cpu_wait = r4k_wait_irqoff;
174 if ((c->processor_id & 0xff) >= PRID_REV_ENCODE_332(2, 1, 0))
175 cpu_wait = r4k_wait_irqoff;
179 cpu_wait = r4k_wait_irqoff;
189 cpu_wait = au1k_wait;
193 * WAIT on Rev1.0 has E1, E2, E3 and E16.
194 * WAIT on Rev2.0 and Rev3.0 has E16.
195 * Rev3.1 WAIT is nop, why bother
197 if ((c->processor_id & 0xff) <= 0x64)
201 * Another rev is incremeting c0_count at a reduced clock
202 * rate while in WAIT mode. So we basically have the choice
203 * between using the cp0 timer as clocksource or avoiding
204 * the WAIT instruction. Until more details are known,
205 * disable the use of WAIT for 20Kc entirely.
210 if ((c->processor_id & 0x00ff) >= 0x40)
218 static inline void check_errata(void)
220 struct cpuinfo_mips *c = ¤t_cpu_data;
222 switch (c->cputype) {
225 * Erratum "RPS May Cause Incorrect Instruction Execution"
226 * This code only handles VPE0, any SMP/SMTC/RTOS code
227 * making use of VPE1 will be responsable for that VPE.
229 if ((c->processor_id & PRID_REV_MASK) <= PRID_REV_34K_V1_0_2)
230 write_c0_config7(read_c0_config7() | MIPS_CONF7_RPS);
237 void __init check_bugs32(void)
243 * Probe whether cpu has config register by trying to play with
244 * alternate cache bit and see whether it matters.
245 * It's used by cpu_probe to distinguish between R3000A and R3081.
247 static inline int cpu_has_confreg(void)
249 #ifdef CONFIG_CPU_R3000
250 extern unsigned long r3k_cache_size(unsigned long);
251 unsigned long size1, size2;
252 unsigned long cfg = read_c0_conf();
254 size1 = r3k_cache_size(ST0_ISC);
255 write_c0_conf(cfg ^ R30XX_CONF_AC);
256 size2 = r3k_cache_size(ST0_ISC);
258 return size1 != size2;
265 * Get the FPU Implementation/Revision.
267 static inline unsigned long cpu_get_fpu_id(void)
269 unsigned long tmp, fpu_id;
271 tmp = read_c0_status();
273 fpu_id = read_32bit_cp1_register(CP1_REVISION);
274 write_c0_status(tmp);
279 * Check the CPU has an FPU the official way.
281 static inline int __cpu_has_fpu(void)
283 return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE);
286 #define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \
289 static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
291 switch (c->processor_id & 0xff00) {
293 c->cputype = CPU_R2000;
294 __cpu_name[cpu] = "R2000";
295 c->isa_level = MIPS_CPU_ISA_I;
296 c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE |
299 c->options |= MIPS_CPU_FPU;
303 if ((c->processor_id & 0xff) == PRID_REV_R3000A) {
304 if (cpu_has_confreg()) {
305 c->cputype = CPU_R3081E;
306 __cpu_name[cpu] = "R3081";
308 c->cputype = CPU_R3000A;
309 __cpu_name[cpu] = "R3000A";
313 c->cputype = CPU_R3000;
314 __cpu_name[cpu] = "R3000";
316 c->isa_level = MIPS_CPU_ISA_I;
317 c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE |
320 c->options |= MIPS_CPU_FPU;
324 if (read_c0_config() & CONF_SC) {
325 if ((c->processor_id & 0xff) >= PRID_REV_R4400) {
326 c->cputype = CPU_R4400PC;
327 __cpu_name[cpu] = "R4400PC";
329 c->cputype = CPU_R4000PC;
330 __cpu_name[cpu] = "R4000PC";
333 if ((c->processor_id & 0xff) >= PRID_REV_R4400) {
334 c->cputype = CPU_R4400SC;
335 __cpu_name[cpu] = "R4400SC";
337 c->cputype = CPU_R4000SC;
338 __cpu_name[cpu] = "R4000SC";
342 c->isa_level = MIPS_CPU_ISA_III;
343 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
344 MIPS_CPU_WATCH | MIPS_CPU_VCE |
348 case PRID_IMP_VR41XX:
349 switch (c->processor_id & 0xf0) {
350 case PRID_REV_VR4111:
351 c->cputype = CPU_VR4111;
352 __cpu_name[cpu] = "NEC VR4111";
354 case PRID_REV_VR4121:
355 c->cputype = CPU_VR4121;
356 __cpu_name[cpu] = "NEC VR4121";
358 case PRID_REV_VR4122:
359 if ((c->processor_id & 0xf) < 0x3) {
360 c->cputype = CPU_VR4122;
361 __cpu_name[cpu] = "NEC VR4122";
363 c->cputype = CPU_VR4181A;
364 __cpu_name[cpu] = "NEC VR4181A";
367 case PRID_REV_VR4130:
368 if ((c->processor_id & 0xf) < 0x4) {
369 c->cputype = CPU_VR4131;
370 __cpu_name[cpu] = "NEC VR4131";
372 c->cputype = CPU_VR4133;
373 __cpu_name[cpu] = "NEC VR4133";
377 printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
378 c->cputype = CPU_VR41XX;
379 __cpu_name[cpu] = "NEC Vr41xx";
382 c->isa_level = MIPS_CPU_ISA_III;
383 c->options = R4K_OPTS;
387 c->cputype = CPU_R4300;
388 __cpu_name[cpu] = "R4300";
389 c->isa_level = MIPS_CPU_ISA_III;
390 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
395 c->cputype = CPU_R4600;
396 __cpu_name[cpu] = "R4600";
397 c->isa_level = MIPS_CPU_ISA_III;
398 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
405 * This processor doesn't have an MMU, so it's not
406 * "real easy" to run Linux on it. It is left purely
407 * for documentation. Commented out because it shares
408 * it's c0_prid id number with the TX3900.
410 c->cputype = CPU_R4650;
411 __cpu_name[cpu] = "R4650";
412 c->isa_level = MIPS_CPU_ISA_III;
413 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_LLSC;
418 c->isa_level = MIPS_CPU_ISA_I;
419 c->options = MIPS_CPU_TLB | MIPS_CPU_TX39_CACHE;
421 if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) {
422 c->cputype = CPU_TX3927;
423 __cpu_name[cpu] = "TX3927";
426 switch (c->processor_id & 0xff) {
427 case PRID_REV_TX3912:
428 c->cputype = CPU_TX3912;
429 __cpu_name[cpu] = "TX3912";
432 case PRID_REV_TX3922:
433 c->cputype = CPU_TX3922;
434 __cpu_name[cpu] = "TX3922";
441 c->cputype = CPU_R4700;
442 __cpu_name[cpu] = "R4700";
443 c->isa_level = MIPS_CPU_ISA_III;
444 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
449 c->cputype = CPU_TX49XX;
450 __cpu_name[cpu] = "R49XX";
451 c->isa_level = MIPS_CPU_ISA_III;
452 c->options = R4K_OPTS | MIPS_CPU_LLSC;
453 if (!(c->processor_id & 0x08))
454 c->options |= MIPS_CPU_FPU | MIPS_CPU_32FPR;
458 c->cputype = CPU_R5000;
459 __cpu_name[cpu] = "R5000";
460 c->isa_level = MIPS_CPU_ISA_IV;
461 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
466 c->cputype = CPU_R5432;
467 __cpu_name[cpu] = "R5432";
468 c->isa_level = MIPS_CPU_ISA_IV;
469 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
470 MIPS_CPU_WATCH | MIPS_CPU_LLSC;
474 c->cputype = CPU_R5500;
475 __cpu_name[cpu] = "R5500";
476 c->isa_level = MIPS_CPU_ISA_IV;
477 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
478 MIPS_CPU_WATCH | MIPS_CPU_LLSC;
481 case PRID_IMP_NEVADA:
482 c->cputype = CPU_NEVADA;
483 __cpu_name[cpu] = "Nevada";
484 c->isa_level = MIPS_CPU_ISA_IV;
485 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
486 MIPS_CPU_DIVEC | MIPS_CPU_LLSC;
490 c->cputype = CPU_R6000;
491 __cpu_name[cpu] = "R6000";
492 c->isa_level = MIPS_CPU_ISA_II;
493 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU |
497 case PRID_IMP_R6000A:
498 c->cputype = CPU_R6000A;
499 __cpu_name[cpu] = "R6000A";
500 c->isa_level = MIPS_CPU_ISA_II;
501 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU |
505 case PRID_IMP_RM7000:
506 c->cputype = CPU_RM7000;
507 __cpu_name[cpu] = "RM7000";
508 c->isa_level = MIPS_CPU_ISA_IV;
509 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
512 * Undocumented RM7000: Bit 29 in the info register of
513 * the RM7000 v2.0 indicates if the TLB has 48 or 64
516 * 29 1 => 64 entry JTLB
519 c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48;
521 case PRID_IMP_RM9000:
522 c->cputype = CPU_RM9000;
523 __cpu_name[cpu] = "RM9000";
524 c->isa_level = MIPS_CPU_ISA_IV;
525 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
528 * Bit 29 in the info register of the RM9000
529 * indicates if the TLB has 48 or 64 entries.
531 * 29 1 => 64 entry JTLB
534 c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48;
537 c->cputype = CPU_R8000;
538 __cpu_name[cpu] = "RM8000";
539 c->isa_level = MIPS_CPU_ISA_IV;
540 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
541 MIPS_CPU_FPU | MIPS_CPU_32FPR |
543 c->tlbsize = 384; /* has weird TLB: 3-way x 128 */
545 case PRID_IMP_R10000:
546 c->cputype = CPU_R10000;
547 __cpu_name[cpu] = "R10000";
548 c->isa_level = MIPS_CPU_ISA_IV;
549 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
550 MIPS_CPU_FPU | MIPS_CPU_32FPR |
551 MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
555 case PRID_IMP_R12000:
556 c->cputype = CPU_R12000;
557 __cpu_name[cpu] = "R12000";
558 c->isa_level = MIPS_CPU_ISA_IV;
559 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
560 MIPS_CPU_FPU | MIPS_CPU_32FPR |
561 MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
565 case PRID_IMP_R14000:
566 c->cputype = CPU_R14000;
567 __cpu_name[cpu] = "R14000";
568 c->isa_level = MIPS_CPU_ISA_IV;
569 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
570 MIPS_CPU_FPU | MIPS_CPU_32FPR |
571 MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
575 case PRID_IMP_LOONGSON2:
576 c->cputype = CPU_LOONGSON2;
577 __cpu_name[cpu] = "ICT Loongson-2";
578 c->isa_level = MIPS_CPU_ISA_III;
579 c->options = R4K_OPTS |
580 MIPS_CPU_FPU | MIPS_CPU_LLSC |
587 static char unknown_isa[] __cpuinitdata = KERN_ERR \
588 "Unsupported ISA type, c0.config0: %d.";
590 static inline unsigned int decode_config0(struct cpuinfo_mips *c)
592 unsigned int config0;
595 config0 = read_c0_config();
597 if (((config0 & MIPS_CONF_MT) >> 7) == 1)
598 c->options |= MIPS_CPU_TLB;
599 isa = (config0 & MIPS_CONF_AT) >> 13;
602 switch ((config0 & MIPS_CONF_AR) >> 10) {
604 c->isa_level = MIPS_CPU_ISA_M32R1;
607 c->isa_level = MIPS_CPU_ISA_M32R2;
614 switch ((config0 & MIPS_CONF_AR) >> 10) {
616 c->isa_level = MIPS_CPU_ISA_M64R1;
619 c->isa_level = MIPS_CPU_ISA_M64R2;
629 return config0 & MIPS_CONF_M;
632 panic(unknown_isa, config0);
635 static inline unsigned int decode_config1(struct cpuinfo_mips *c)
637 unsigned int config1;
639 config1 = read_c0_config1();
641 if (config1 & MIPS_CONF1_MD)
642 c->ases |= MIPS_ASE_MDMX;
643 if (config1 & MIPS_CONF1_WR)
644 c->options |= MIPS_CPU_WATCH;
645 if (config1 & MIPS_CONF1_CA)
646 c->ases |= MIPS_ASE_MIPS16;
647 if (config1 & MIPS_CONF1_EP)
648 c->options |= MIPS_CPU_EJTAG;
649 if (config1 & MIPS_CONF1_FP) {
650 c->options |= MIPS_CPU_FPU;
651 c->options |= MIPS_CPU_32FPR;
654 c->tlbsize = ((config1 & MIPS_CONF1_TLBS) >> 25) + 1;
656 return config1 & MIPS_CONF_M;
659 static inline unsigned int decode_config2(struct cpuinfo_mips *c)
661 unsigned int config2;
663 config2 = read_c0_config2();
665 if (config2 & MIPS_CONF2_SL)
666 c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
668 return config2 & MIPS_CONF_M;
671 static inline unsigned int decode_config3(struct cpuinfo_mips *c)
673 unsigned int config3;
675 config3 = read_c0_config3();
677 if (config3 & MIPS_CONF3_SM)
678 c->ases |= MIPS_ASE_SMARTMIPS;
679 if (config3 & MIPS_CONF3_DSP)
680 c->ases |= MIPS_ASE_DSP;
681 if (config3 & MIPS_CONF3_VINT)
682 c->options |= MIPS_CPU_VINT;
683 if (config3 & MIPS_CONF3_VEIC)
684 c->options |= MIPS_CPU_VEIC;
685 if (config3 & MIPS_CONF3_MT)
686 c->ases |= MIPS_ASE_MIPSMT;
687 if (config3 & MIPS_CONF3_ULRI)
688 c->options |= MIPS_CPU_ULRI;
690 return config3 & MIPS_CONF_M;
693 static void __cpuinit decode_configs(struct cpuinfo_mips *c)
697 /* MIPS32 or MIPS64 compliant CPU. */
698 c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER |
699 MIPS_CPU_DIVEC | MIPS_CPU_LLSC | MIPS_CPU_MCHECK;
701 c->scache.flags = MIPS_CACHE_NOT_PRESENT;
703 ok = decode_config0(c); /* Read Config registers. */
704 BUG_ON(!ok); /* Arch spec violation! */
706 ok = decode_config1(c);
708 ok = decode_config2(c);
710 ok = decode_config3(c);
712 mips_probe_watch_registers(c);
715 #ifdef CONFIG_CPU_MIPSR2
716 extern void spram_config(void);
718 static inline void spram_config(void) {}
721 static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
724 switch (c->processor_id & 0xff00) {
726 c->cputype = CPU_4KC;
727 __cpu_name[cpu] = "MIPS 4Kc";
730 c->cputype = CPU_4KEC;
731 __cpu_name[cpu] = "MIPS 4KEc";
733 case PRID_IMP_4KECR2:
734 c->cputype = CPU_4KEC;
735 __cpu_name[cpu] = "MIPS 4KEc";
739 c->cputype = CPU_4KSC;
740 __cpu_name[cpu] = "MIPS 4KSc";
743 c->cputype = CPU_5KC;
744 __cpu_name[cpu] = "MIPS 5Kc";
747 c->cputype = CPU_20KC;
748 __cpu_name[cpu] = "MIPS 20Kc";
752 c->cputype = CPU_24K;
753 __cpu_name[cpu] = "MIPS 24Kc";
756 c->cputype = CPU_25KF;
757 __cpu_name[cpu] = "MIPS 25Kc";
760 c->cputype = CPU_34K;
761 __cpu_name[cpu] = "MIPS 34Kc";
764 c->cputype = CPU_74K;
765 __cpu_name[cpu] = "MIPS 74Kc";
768 c->cputype = CPU_1004K;
769 __cpu_name[cpu] = "MIPS 1004Kc";
776 static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu)
779 switch (c->processor_id & 0xff00) {
780 case PRID_IMP_AU1_REV1:
781 case PRID_IMP_AU1_REV2:
782 switch ((c->processor_id >> 24) & 0xff) {
784 c->cputype = CPU_AU1000;
785 __cpu_name[cpu] = "Au1000";
788 c->cputype = CPU_AU1500;
789 __cpu_name[cpu] = "Au1500";
792 c->cputype = CPU_AU1100;
793 __cpu_name[cpu] = "Au1100";
796 c->cputype = CPU_AU1550;
797 __cpu_name[cpu] = "Au1550";
800 c->cputype = CPU_AU1200;
801 __cpu_name[cpu] = "Au1200";
802 if ((c->processor_id & 0xff) == 2) {
803 c->cputype = CPU_AU1250;
804 __cpu_name[cpu] = "Au1250";
808 c->cputype = CPU_AU1210;
809 __cpu_name[cpu] = "Au1210";
812 panic("Unknown Au Core!");
819 static inline void cpu_probe_sibyte(struct cpuinfo_mips *c, unsigned int cpu)
823 switch (c->processor_id & 0xff00) {
825 c->cputype = CPU_SB1;
826 __cpu_name[cpu] = "SiByte SB1";
827 /* FPU in pass1 is known to have issues. */
828 if ((c->processor_id & 0xff) < 0x02)
829 c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);
832 c->cputype = CPU_SB1A;
833 __cpu_name[cpu] = "SiByte SB1A";
838 static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c, unsigned int cpu)
841 switch (c->processor_id & 0xff00) {
842 case PRID_IMP_SR71000:
843 c->cputype = CPU_SR71000;
844 __cpu_name[cpu] = "Sandcraft SR71000";
851 static inline void cpu_probe_nxp(struct cpuinfo_mips *c, unsigned int cpu)
854 switch (c->processor_id & 0xff00) {
855 case PRID_IMP_PR4450:
856 c->cputype = CPU_PR4450;
857 __cpu_name[cpu] = "Philips PR4450";
858 c->isa_level = MIPS_CPU_ISA_M32R1;
863 static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
866 switch (c->processor_id & 0xff00) {
867 case PRID_IMP_BCM3302:
868 c->cputype = CPU_BCM3302;
869 __cpu_name[cpu] = "Broadcom BCM3302";
871 case PRID_IMP_BCM4710:
872 c->cputype = CPU_BCM4710;
873 __cpu_name[cpu] = "Broadcom BCM4710";
878 const char *__cpu_name[NR_CPUS];
880 __cpuinit void cpu_probe(void)
882 struct cpuinfo_mips *c = ¤t_cpu_data;
883 unsigned int cpu = smp_processor_id();
885 c->processor_id = PRID_IMP_UNKNOWN;
886 c->fpu_id = FPIR_IMP_NONE;
887 c->cputype = CPU_UNKNOWN;
889 c->processor_id = read_c0_prid();
890 switch (c->processor_id & 0xff0000) {
891 case PRID_COMP_LEGACY:
892 cpu_probe_legacy(c, cpu);
895 cpu_probe_mips(c, cpu);
897 case PRID_COMP_ALCHEMY:
898 cpu_probe_alchemy(c, cpu);
900 case PRID_COMP_SIBYTE:
901 cpu_probe_sibyte(c, cpu);
903 case PRID_COMP_BROADCOM:
904 cpu_probe_broadcom(c, cpu);
906 case PRID_COMP_SANDCRAFT:
907 cpu_probe_sandcraft(c, cpu);
910 cpu_probe_nxp(c, cpu);
914 BUG_ON(!__cpu_name[cpu]);
915 BUG_ON(c->cputype == CPU_UNKNOWN);
918 * Platform code can force the cpu type to optimize code
919 * generation. In that case be sure the cpu type is correctly
920 * manually setup otherwise it could trigger some nasty bugs.
922 BUG_ON(current_cpu_type() != c->cputype);
924 if (c->options & MIPS_CPU_FPU) {
925 c->fpu_id = cpu_get_fpu_id();
927 if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
928 c->isa_level == MIPS_CPU_ISA_M32R2 ||
929 c->isa_level == MIPS_CPU_ISA_M64R1 ||
930 c->isa_level == MIPS_CPU_ISA_M64R2) {
931 if (c->fpu_id & MIPS_FPIR_3D)
932 c->ases |= MIPS_ASE_MIPS3D;
937 c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1;
942 __cpuinit void cpu_report(void)
944 struct cpuinfo_mips *c = ¤t_cpu_data;
946 printk(KERN_INFO "CPU revision is: %08x (%s)\n",
947 c->processor_id, cpu_name_string());
948 if (c->options & MIPS_CPU_FPU)
949 printk(KERN_INFO "FPU revision is: %08x\n", c->fpu_id);