aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven J. Hill <sjhill@mips.com>2012-12-06 23:31:36 -0500
committerRalf Baechle <ralf@linux-mips.org>2013-02-15 17:07:38 -0500
commita96102be700f87283f168942cd09a2b30f86f324 (patch)
tree65537d4868587037e25f2ae648ebfceb31274f36
parent0e49caf661fbba12c9a38eca13b64d6680259018 (diff)
MIPS: Add printing of ISA version in cpuinfo.
Display the MIPS ISA version release in the /proc/cpuinfo file. [ralf@linux-mips.org: Add support for MIPS I ... IV legacy architecture revisions. Also differenciate between MIPS32 and MIPS64 versions instead of lumping them together as just r1 and r2. Note to application programmers: this indicates the CPU's ISA level It does not imply the current execution environment does support it. For example an O32 application seeing "mips64r2" would still be restricted by by the execution environment to 32-bit - but the kernel could run mips64r2 code. The same for a 32-bit kernel running on a 64-bit processor. This field doesn't include ASEs or optional architecture modules nor other detailed flags such as the availability of an FPU.] Signed-off-by: Steven J. Hill <sjhill@mips.com> Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/4714/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/cpu-features.h13
-rw-r--r--arch/mips/kernel/cpu-probe.c88
-rw-r--r--arch/mips/kernel/proc.c22
3 files changed, 93 insertions, 30 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index e0ac24759d92..1e83b24fa461 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -130,6 +130,19 @@
130#endif 130#endif
131#endif 131#endif
132 132
133# define cpu_has_mips_1 (cpu_data[0].isa_level & MIPS_CPU_ISA_I)
134#ifndef cpu_has_mips_2
135# define cpu_has_mips_2 (cpu_data[0].isa_level & MIPS_CPU_ISA_II)
136#endif
137#ifndef cpu_has_mips_3
138# define cpu_has_mips_3 (cpu_data[0].isa_level & MIPS_CPU_ISA_III)
139#endif
140#ifndef cpu_has_mips_4
141# define cpu_has_mips_4 (cpu_data[0].isa_level & MIPS_CPU_ISA_IV)
142#endif
143#ifndef cpu_has_mips_5
144# define cpu_has_mips_5 (cpu_data[0].isa_level & MIPS_CPU_ISA_V)
145#endif
133# ifndef cpu_has_mips32r1 146# ifndef cpu_has_mips32r1
134# define cpu_has_mips32r1 (cpu_data[0].isa_level & MIPS_CPU_ISA_M32R1) 147# define cpu_has_mips32r1 (cpu_data[0].isa_level & MIPS_CPU_ISA_M32R1)
135# endif 148# endif
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 760139ee7a99..2656c898e337 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -331,6 +331,34 @@ static inline void cpu_probe_vmbits(struct cpuinfo_mips *c)
331#endif 331#endif
332} 332}
333 333
334static void __cpuinit set_isa(struct cpuinfo_mips *c, unsigned int isa)
335{
336 switch (isa) {
337 case MIPS_CPU_ISA_M64R2:
338 c->isa_level |= MIPS_CPU_ISA_M32R2 | MIPS_CPU_ISA_M64R2;
339 case MIPS_CPU_ISA_M64R1:
340 c->isa_level |= MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M64R1;
341 case MIPS_CPU_ISA_V:
342 c->isa_level |= MIPS_CPU_ISA_V;
343 case MIPS_CPU_ISA_IV:
344 c->isa_level |= MIPS_CPU_ISA_IV;
345 case MIPS_CPU_ISA_III:
346 c->isa_level |= MIPS_CPU_ISA_I | MIPS_CPU_ISA_II |
347 MIPS_CPU_ISA_III;
348 break;
349
350 case MIPS_CPU_ISA_M32R2:
351 c->isa_level |= MIPS_CPU_ISA_M32R2;
352 case MIPS_CPU_ISA_M32R1:
353 c->isa_level |= MIPS_CPU_ISA_M32R1;
354 case MIPS_CPU_ISA_II:
355 c->isa_level |= MIPS_CPU_ISA_II;
356 case MIPS_CPU_ISA_I:
357 c->isa_level |= MIPS_CPU_ISA_I;
358 break;
359 }
360}
361
334static char unknown_isa[] __cpuinitdata = KERN_ERR \ 362static char unknown_isa[] __cpuinitdata = KERN_ERR \
335 "Unsupported ISA type, c0.config0: %d."; 363 "Unsupported ISA type, c0.config0: %d.";
336 364
@@ -348,10 +376,10 @@ static inline unsigned int decode_config0(struct cpuinfo_mips *c)
348 case 0: 376 case 0:
349 switch ((config0 & MIPS_CONF_AR) >> 10) { 377 switch ((config0 & MIPS_CONF_AR) >> 10) {
350 case 0: 378 case 0:
351 c->isa_level = MIPS_CPU_ISA_M32R1; 379 set_isa(c, MIPS_CPU_ISA_M32R1);
352 break; 380 break;
353 case 1: 381 case 1:
354 c->isa_level = MIPS_CPU_ISA_M32R2; 382 set_isa(c, MIPS_CPU_ISA_M32R2);
355 break; 383 break;
356 default: 384 default:
357 goto unknown; 385 goto unknown;
@@ -360,10 +388,10 @@ static inline unsigned int decode_config0(struct cpuinfo_mips *c)
360 case 2: 388 case 2:
361 switch ((config0 & MIPS_CONF_AR) >> 10) { 389 switch ((config0 & MIPS_CONF_AR) >> 10) {
362 case 0: 390 case 0:
363 c->isa_level = MIPS_CPU_ISA_M64R1; 391 set_isa(c, MIPS_CPU_ISA_M64R1);
364 break; 392 break;
365 case 1: 393 case 1:
366 c->isa_level = MIPS_CPU_ISA_M64R2; 394 set_isa(c, MIPS_CPU_ISA_M64R2);
367 break; 395 break;
368 default: 396 default:
369 goto unknown; 397 goto unknown;
@@ -494,7 +522,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
494 case PRID_IMP_R2000: 522 case PRID_IMP_R2000:
495 c->cputype = CPU_R2000; 523 c->cputype = CPU_R2000;
496 __cpu_name[cpu] = "R2000"; 524 __cpu_name[cpu] = "R2000";
497 c->isa_level = MIPS_CPU_ISA_I; 525 set_isa(c, MIPS_CPU_ISA_I);
498 c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE | 526 c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE |
499 MIPS_CPU_NOFPUEX; 527 MIPS_CPU_NOFPUEX;
500 if (__cpu_has_fpu()) 528 if (__cpu_has_fpu())
@@ -514,7 +542,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
514 c->cputype = CPU_R3000; 542 c->cputype = CPU_R3000;
515 __cpu_name[cpu] = "R3000"; 543 __cpu_name[cpu] = "R3000";
516 } 544 }
517 c->isa_level = MIPS_CPU_ISA_I; 545 set_isa(c, MIPS_CPU_ISA_I);
518 c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE | 546 c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE |
519 MIPS_CPU_NOFPUEX; 547 MIPS_CPU_NOFPUEX;
520 if (__cpu_has_fpu()) 548 if (__cpu_has_fpu())
@@ -540,7 +568,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
540 } 568 }
541 } 569 }
542 570
543 c->isa_level = MIPS_CPU_ISA_III; 571 set_isa(c, MIPS_CPU_ISA_III);
544 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 572 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
545 MIPS_CPU_WATCH | MIPS_CPU_VCE | 573 MIPS_CPU_WATCH | MIPS_CPU_VCE |
546 MIPS_CPU_LLSC; 574 MIPS_CPU_LLSC;
@@ -580,14 +608,14 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
580 __cpu_name[cpu] = "NEC Vr41xx"; 608 __cpu_name[cpu] = "NEC Vr41xx";
581 break; 609 break;
582 } 610 }
583 c->isa_level = MIPS_CPU_ISA_III; 611 set_isa(c, MIPS_CPU_ISA_III);
584 c->options = R4K_OPTS; 612 c->options = R4K_OPTS;
585 c->tlbsize = 32; 613 c->tlbsize = 32;
586 break; 614 break;
587 case PRID_IMP_R4300: 615 case PRID_IMP_R4300:
588 c->cputype = CPU_R4300; 616 c->cputype = CPU_R4300;
589 __cpu_name[cpu] = "R4300"; 617 __cpu_name[cpu] = "R4300";
590 c->isa_level = MIPS_CPU_ISA_III; 618 set_isa(c, MIPS_CPU_ISA_III);
591 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 619 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
592 MIPS_CPU_LLSC; 620 MIPS_CPU_LLSC;
593 c->tlbsize = 32; 621 c->tlbsize = 32;
@@ -595,7 +623,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
595 case PRID_IMP_R4600: 623 case PRID_IMP_R4600:
596 c->cputype = CPU_R4600; 624 c->cputype = CPU_R4600;
597 __cpu_name[cpu] = "R4600"; 625 __cpu_name[cpu] = "R4600";
598 c->isa_level = MIPS_CPU_ISA_III; 626 set_isa(c, MIPS_CPU_ISA_III);
599 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 627 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
600 MIPS_CPU_LLSC; 628 MIPS_CPU_LLSC;
601 c->tlbsize = 48; 629 c->tlbsize = 48;
@@ -610,13 +638,13 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
610 */ 638 */
611 c->cputype = CPU_R4650; 639 c->cputype = CPU_R4650;
612 __cpu_name[cpu] = "R4650"; 640 __cpu_name[cpu] = "R4650";
613 c->isa_level = MIPS_CPU_ISA_III; 641 set_isa(c, MIPS_CPU_ISA_III);
614 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_LLSC; 642 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_LLSC;
615 c->tlbsize = 48; 643 c->tlbsize = 48;
616 break; 644 break;
617 #endif 645 #endif
618 case PRID_IMP_TX39: 646 case PRID_IMP_TX39:
619 c->isa_level = MIPS_CPU_ISA_I; 647 set_isa(c, MIPS_CPU_ISA_I);
620 c->options = MIPS_CPU_TLB | MIPS_CPU_TX39_CACHE; 648 c->options = MIPS_CPU_TLB | MIPS_CPU_TX39_CACHE;
621 649
622 if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) { 650 if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) {
@@ -641,7 +669,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
641 case PRID_IMP_R4700: 669 case PRID_IMP_R4700:
642 c->cputype = CPU_R4700; 670 c->cputype = CPU_R4700;
643 __cpu_name[cpu] = "R4700"; 671 __cpu_name[cpu] = "R4700";
644 c->isa_level = MIPS_CPU_ISA_III; 672 set_isa(c, MIPS_CPU_ISA_III);
645 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 673 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
646 MIPS_CPU_LLSC; 674 MIPS_CPU_LLSC;
647 c->tlbsize = 48; 675 c->tlbsize = 48;
@@ -649,7 +677,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
649 case PRID_IMP_TX49: 677 case PRID_IMP_TX49:
650 c->cputype = CPU_TX49XX; 678 c->cputype = CPU_TX49XX;
651 __cpu_name[cpu] = "R49XX"; 679 __cpu_name[cpu] = "R49XX";
652 c->isa_level = MIPS_CPU_ISA_III; 680 set_isa(c, MIPS_CPU_ISA_III);
653 c->options = R4K_OPTS | MIPS_CPU_LLSC; 681 c->options = R4K_OPTS | MIPS_CPU_LLSC;
654 if (!(c->processor_id & 0x08)) 682 if (!(c->processor_id & 0x08))
655 c->options |= MIPS_CPU_FPU | MIPS_CPU_32FPR; 683 c->options |= MIPS_CPU_FPU | MIPS_CPU_32FPR;
@@ -658,7 +686,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
658 case PRID_IMP_R5000: 686 case PRID_IMP_R5000:
659 c->cputype = CPU_R5000; 687 c->cputype = CPU_R5000;
660 __cpu_name[cpu] = "R5000"; 688 __cpu_name[cpu] = "R5000";
661 c->isa_level = MIPS_CPU_ISA_IV; 689 set_isa(c, MIPS_CPU_ISA_IV);
662 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 690 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
663 MIPS_CPU_LLSC; 691 MIPS_CPU_LLSC;
664 c->tlbsize = 48; 692 c->tlbsize = 48;
@@ -666,7 +694,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
666 case PRID_IMP_R5432: 694 case PRID_IMP_R5432:
667 c->cputype = CPU_R5432; 695 c->cputype = CPU_R5432;
668 __cpu_name[cpu] = "R5432"; 696 __cpu_name[cpu] = "R5432";
669 c->isa_level = MIPS_CPU_ISA_IV; 697 set_isa(c, MIPS_CPU_ISA_IV);
670 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 698 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
671 MIPS_CPU_WATCH | MIPS_CPU_LLSC; 699 MIPS_CPU_WATCH | MIPS_CPU_LLSC;
672 c->tlbsize = 48; 700 c->tlbsize = 48;
@@ -674,7 +702,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
674 case PRID_IMP_R5500: 702 case PRID_IMP_R5500:
675 c->cputype = CPU_R5500; 703 c->cputype = CPU_R5500;
676 __cpu_name[cpu] = "R5500"; 704 __cpu_name[cpu] = "R5500";
677 c->isa_level = MIPS_CPU_ISA_IV; 705 set_isa(c, MIPS_CPU_ISA_IV);
678 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 706 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
679 MIPS_CPU_WATCH | MIPS_CPU_LLSC; 707 MIPS_CPU_WATCH | MIPS_CPU_LLSC;
680 c->tlbsize = 48; 708 c->tlbsize = 48;
@@ -682,7 +710,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
682 case PRID_IMP_NEVADA: 710 case PRID_IMP_NEVADA:
683 c->cputype = CPU_NEVADA; 711 c->cputype = CPU_NEVADA;
684 __cpu_name[cpu] = "Nevada"; 712 __cpu_name[cpu] = "Nevada";
685 c->isa_level = MIPS_CPU_ISA_IV; 713 set_isa(c, MIPS_CPU_ISA_IV);
686 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 714 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
687 MIPS_CPU_DIVEC | MIPS_CPU_LLSC; 715 MIPS_CPU_DIVEC | MIPS_CPU_LLSC;
688 c->tlbsize = 48; 716 c->tlbsize = 48;
@@ -690,7 +718,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
690 case PRID_IMP_R6000: 718 case PRID_IMP_R6000:
691 c->cputype = CPU_R6000; 719 c->cputype = CPU_R6000;
692 __cpu_name[cpu] = "R6000"; 720 __cpu_name[cpu] = "R6000";
693 c->isa_level = MIPS_CPU_ISA_II; 721 set_isa(c, MIPS_CPU_ISA_II);
694 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU | 722 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU |
695 MIPS_CPU_LLSC; 723 MIPS_CPU_LLSC;
696 c->tlbsize = 32; 724 c->tlbsize = 32;
@@ -698,7 +726,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
698 case PRID_IMP_R6000A: 726 case PRID_IMP_R6000A:
699 c->cputype = CPU_R6000A; 727 c->cputype = CPU_R6000A;
700 __cpu_name[cpu] = "R6000A"; 728 __cpu_name[cpu] = "R6000A";
701 c->isa_level = MIPS_CPU_ISA_II; 729 set_isa(c, MIPS_CPU_ISA_II);
702 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU | 730 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU |
703 MIPS_CPU_LLSC; 731 MIPS_CPU_LLSC;
704 c->tlbsize = 32; 732 c->tlbsize = 32;
@@ -706,7 +734,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
706 case PRID_IMP_RM7000: 734 case PRID_IMP_RM7000:
707 c->cputype = CPU_RM7000; 735 c->cputype = CPU_RM7000;
708 __cpu_name[cpu] = "RM7000"; 736 __cpu_name[cpu] = "RM7000";
709 c->isa_level = MIPS_CPU_ISA_IV; 737 set_isa(c, MIPS_CPU_ISA_IV);
710 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 738 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
711 MIPS_CPU_LLSC; 739 MIPS_CPU_LLSC;
712 /* 740 /*
@@ -722,7 +750,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
722 case PRID_IMP_RM9000: 750 case PRID_IMP_RM9000:
723 c->cputype = CPU_RM9000; 751 c->cputype = CPU_RM9000;
724 __cpu_name[cpu] = "RM9000"; 752 __cpu_name[cpu] = "RM9000";
725 c->isa_level = MIPS_CPU_ISA_IV; 753 set_isa(c, MIPS_CPU_ISA_IV);
726 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | 754 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
727 MIPS_CPU_LLSC; 755 MIPS_CPU_LLSC;
728 /* 756 /*
@@ -737,7 +765,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
737 case PRID_IMP_R8000: 765 case PRID_IMP_R8000:
738 c->cputype = CPU_R8000; 766 c->cputype = CPU_R8000;
739 __cpu_name[cpu] = "RM8000"; 767 __cpu_name[cpu] = "RM8000";
740 c->isa_level = MIPS_CPU_ISA_IV; 768 set_isa(c, MIPS_CPU_ISA_IV);
741 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | 769 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
742 MIPS_CPU_FPU | MIPS_CPU_32FPR | 770 MIPS_CPU_FPU | MIPS_CPU_32FPR |
743 MIPS_CPU_LLSC; 771 MIPS_CPU_LLSC;
@@ -746,7 +774,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
746 case PRID_IMP_R10000: 774 case PRID_IMP_R10000:
747 c->cputype = CPU_R10000; 775 c->cputype = CPU_R10000;
748 __cpu_name[cpu] = "R10000"; 776 __cpu_name[cpu] = "R10000";
749 c->isa_level = MIPS_CPU_ISA_IV; 777 set_isa(c, MIPS_CPU_ISA_IV);
750 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX | 778 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
751 MIPS_CPU_FPU | MIPS_CPU_32FPR | 779 MIPS_CPU_FPU | MIPS_CPU_32FPR |
752 MIPS_CPU_COUNTER | MIPS_CPU_WATCH | 780 MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
@@ -756,7 +784,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
756 case PRID_IMP_R12000: 784 case PRID_IMP_R12000:
757 c->cputype = CPU_R12000; 785 c->cputype = CPU_R12000;
758 __cpu_name[cpu] = "R12000"; 786 __cpu_name[cpu] = "R12000";
759 c->isa_level = MIPS_CPU_ISA_IV; 787 set_isa(c, MIPS_CPU_ISA_IV);
760 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX | 788 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
761 MIPS_CPU_FPU | MIPS_CPU_32FPR | 789 MIPS_CPU_FPU | MIPS_CPU_32FPR |
762 MIPS_CPU_COUNTER | MIPS_CPU_WATCH | 790 MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
@@ -766,7 +794,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
766 case PRID_IMP_R14000: 794 case PRID_IMP_R14000:
767 c->cputype = CPU_R14000; 795 c->cputype = CPU_R14000;
768 __cpu_name[cpu] = "R14000"; 796 __cpu_name[cpu] = "R14000";
769 c->isa_level = MIPS_CPU_ISA_IV; 797 set_isa(c, MIPS_CPU_ISA_IV);
770 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX | 798 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
771 MIPS_CPU_FPU | MIPS_CPU_32FPR | 799 MIPS_CPU_FPU | MIPS_CPU_32FPR |
772 MIPS_CPU_COUNTER | MIPS_CPU_WATCH | 800 MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
@@ -786,7 +814,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
786 break; 814 break;
787 } 815 }
788 816
789 c->isa_level = MIPS_CPU_ISA_III; 817 set_isa(c, MIPS_CPU_ISA_III);
790 c->options = R4K_OPTS | 818 c->options = R4K_OPTS |
791 MIPS_CPU_FPU | MIPS_CPU_LLSC | 819 MIPS_CPU_FPU | MIPS_CPU_LLSC |
792 MIPS_CPU_32FPR; 820 MIPS_CPU_32FPR;
@@ -946,7 +974,7 @@ static inline void cpu_probe_nxp(struct cpuinfo_mips *c, unsigned int cpu)
946 case PRID_IMP_PR4450: 974 case PRID_IMP_PR4450:
947 c->cputype = CPU_PR4450; 975 c->cputype = CPU_PR4450;
948 __cpu_name[cpu] = "Philips PR4450"; 976 __cpu_name[cpu] = "Philips PR4450";
949 c->isa_level = MIPS_CPU_ISA_M32R1; 977 set_isa(c, MIPS_CPU_ISA_M32R1);
950 break; 978 break;
951 } 979 }
952} 980}
@@ -1105,12 +1133,12 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu)
1105 } 1133 }
1106 1134
1107 if (c->cputype == CPU_XLP) { 1135 if (c->cputype == CPU_XLP) {
1108 c->isa_level = MIPS_CPU_ISA_M64R2; 1136 set_isa(c, MIPS_CPU_ISA_M64R2);
1109 c->options |= (MIPS_CPU_FPU | MIPS_CPU_ULRI | MIPS_CPU_MCHECK); 1137 c->options |= (MIPS_CPU_FPU | MIPS_CPU_ULRI | MIPS_CPU_MCHECK);
1110 /* This will be updated again after all threads are woken up */ 1138 /* This will be updated again after all threads are woken up */
1111 c->tlbsize = ((read_c0_config6() >> 16) & 0xffff) + 1; 1139 c->tlbsize = ((read_c0_config6() >> 16) & 0xffff) + 1;
1112 } else { 1140 } else {
1113 c->isa_level = MIPS_CPU_ISA_M64R1; 1141 set_isa(c, MIPS_CPU_ISA_M64R1);
1114 c->tlbsize = ((read_c0_config1() >> 25) & 0x3f) + 1; 1142 c->tlbsize = ((read_c0_config1() >> 25) & 0x3f) + 1;
1115 } 1143 }
1116} 1144}
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 9dafed058136..79d4b8edbd76 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -64,6 +64,28 @@ static int show_cpuinfo(struct seq_file *m, void *v)
64 cpu_data[n].watch_reg_masks[i]); 64 cpu_data[n].watch_reg_masks[i]);
65 seq_printf(m, "]\n"); 65 seq_printf(m, "]\n");
66 } 66 }
67 if (cpu_has_mips_r) {
68 seq_printf(m, "isa\t\t\t:");
69 if (cpu_has_mips_1)
70 seq_printf(m, "%s", "mips1");
71 if (cpu_has_mips_2)
72 seq_printf(m, "%s", " mips2");
73 if (cpu_has_mips_3)
74 seq_printf(m, "%s", " mips3");
75 if (cpu_has_mips_4)
76 seq_printf(m, "%s", " mips4");
77 if (cpu_has_mips_5)
78 seq_printf(m, "%s", " mips5");
79 if (cpu_has_mips32r1)
80 seq_printf(m, "%s", " mips32r1");
81 if (cpu_has_mips32r2)
82 seq_printf(m, "%s", " mips32r2");
83 if (cpu_has_mips64r1)
84 seq_printf(m, "%s", " mips64r1");
85 if (cpu_has_mips64r2)
86 seq_printf(m, "%s", " mips64r2");
87 seq_printf(m, "\n");
88 }
67 89
68 seq_printf(m, "ASEs implemented\t:"); 90 seq_printf(m, "ASEs implemented\t:");
69 if (cpu_has_mips16) seq_printf(m, "%s", " mips16"); 91 if (cpu_has_mips16) seq_printf(m, "%s", " mips16");