Lines Matching refs:c

74 	struct cpuinfo_mips *c = &current_cpu_data;  in check_wait()  local
77 switch (c->cputype) { in check_wait()
469 static inline void cpu_probe_legacy(struct cpuinfo_mips *c) in cpu_probe_legacy() argument
471 switch (c->processor_id & 0xff00) { in cpu_probe_legacy()
473 c->cputype = CPU_R2000; in cpu_probe_legacy()
474 c->isa_level = MIPS_CPU_ISA_I; in cpu_probe_legacy()
475 c->options = MIPS_CPU_TLB | MIPS_CPU_NOFPUEX; in cpu_probe_legacy()
477 c->options |= MIPS_CPU_FPU; in cpu_probe_legacy()
478 c->tlbsize = 64; in cpu_probe_legacy()
481 if ((c->processor_id & 0xff) == PRID_REV_R3000A) in cpu_probe_legacy()
483 c->cputype = CPU_R3081E; in cpu_probe_legacy()
485 c->cputype = CPU_R3000A; in cpu_probe_legacy()
487 c->cputype = CPU_R3000; in cpu_probe_legacy()
488 c->isa_level = MIPS_CPU_ISA_I; in cpu_probe_legacy()
489 c->options = MIPS_CPU_TLB | MIPS_CPU_NOFPUEX; in cpu_probe_legacy()
491 c->options |= MIPS_CPU_FPU; in cpu_probe_legacy()
492 c->tlbsize = 64; in cpu_probe_legacy()
496 if ((c->processor_id & 0xff) >= PRID_REV_R4400) in cpu_probe_legacy()
497 c->cputype = CPU_R4400PC; in cpu_probe_legacy()
499 c->cputype = CPU_R4000PC; in cpu_probe_legacy()
501 if ((c->processor_id & 0xff) >= PRID_REV_R4400) in cpu_probe_legacy()
502 c->cputype = CPU_R4400SC; in cpu_probe_legacy()
504 c->cputype = CPU_R4000SC; in cpu_probe_legacy()
507 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
508 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
511 c->tlbsize = 48; in cpu_probe_legacy()
514 switch (c->processor_id & 0xf0) { in cpu_probe_legacy()
517 c->cputype = CPU_VR4111; in cpu_probe_legacy()
521 c->cputype = CPU_VR4181; in cpu_probe_legacy()
525 c->cputype = CPU_VR4121; in cpu_probe_legacy()
528 if ((c->processor_id & 0xf) < 0x3) in cpu_probe_legacy()
529 c->cputype = CPU_VR4122; in cpu_probe_legacy()
531 c->cputype = CPU_VR4181A; in cpu_probe_legacy()
534 if ((c->processor_id & 0xf) < 0x4) in cpu_probe_legacy()
535 c->cputype = CPU_VR4131; in cpu_probe_legacy()
537 c->cputype = CPU_VR4133; in cpu_probe_legacy()
541 c->cputype = CPU_VR41XX; in cpu_probe_legacy()
544 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
545 c->options = R4K_OPTS; in cpu_probe_legacy()
546 c->tlbsize = 32; in cpu_probe_legacy()
549 c->cputype = CPU_R4300; in cpu_probe_legacy()
550 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
551 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
553 c->tlbsize = 32; in cpu_probe_legacy()
556 c->cputype = CPU_R4600; in cpu_probe_legacy()
557 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
558 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_LLSC; in cpu_probe_legacy()
559 c->tlbsize = 48; in cpu_probe_legacy()
569 c->cputype = CPU_R4650; in cpu_probe_legacy()
570 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
571 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_LLSC; in cpu_probe_legacy()
572 c->tlbsize = 48; in cpu_probe_legacy()
576 c->isa_level = MIPS_CPU_ISA_I; in cpu_probe_legacy()
577 c->options = MIPS_CPU_TLB; in cpu_probe_legacy()
579 if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) { in cpu_probe_legacy()
580 c->cputype = CPU_TX3927; in cpu_probe_legacy()
581 c->tlbsize = 64; in cpu_probe_legacy()
583 switch (c->processor_id & 0xff) { in cpu_probe_legacy()
585 c->cputype = CPU_TX3912; in cpu_probe_legacy()
586 c->tlbsize = 32; in cpu_probe_legacy()
589 c->cputype = CPU_TX3922; in cpu_probe_legacy()
590 c->tlbsize = 64; in cpu_probe_legacy()
593 c->cputype = CPU_UNKNOWN; in cpu_probe_legacy()
599 c->cputype = CPU_R4700; in cpu_probe_legacy()
600 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
601 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
603 c->tlbsize = 48; in cpu_probe_legacy()
606 c->cputype = CPU_TX49XX; in cpu_probe_legacy()
607 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
608 c->options = R4K_OPTS | MIPS_CPU_LLSC; in cpu_probe_legacy()
609 if (!(c->processor_id & 0x08)) in cpu_probe_legacy()
610 c->options |= MIPS_CPU_FPU | MIPS_CPU_32FPR; in cpu_probe_legacy()
611 c->tlbsize = 48; in cpu_probe_legacy()
614 c->cputype = CPU_R5000; in cpu_probe_legacy()
615 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
616 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
618 c->tlbsize = 48; in cpu_probe_legacy()
621 c->cputype = CPU_R5432; in cpu_probe_legacy()
622 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
623 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
625 c->tlbsize = 48; in cpu_probe_legacy()
628 c->cputype = CPU_R5500; in cpu_probe_legacy()
629 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
630 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
632 c->tlbsize = 48; in cpu_probe_legacy()
635 c->cputype = CPU_NEVADA; in cpu_probe_legacy()
636 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
637 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
639 c->tlbsize = 48; in cpu_probe_legacy()
642 c->cputype = CPU_R6000; in cpu_probe_legacy()
643 c->isa_level = MIPS_CPU_ISA_II; in cpu_probe_legacy()
644 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU | in cpu_probe_legacy()
646 c->tlbsize = 32; in cpu_probe_legacy()
649 c->cputype = CPU_R6000A; in cpu_probe_legacy()
650 c->isa_level = MIPS_CPU_ISA_II; in cpu_probe_legacy()
651 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU | in cpu_probe_legacy()
653 c->tlbsize = 32; in cpu_probe_legacy()
656 c->cputype = CPU_RM7000; in cpu_probe_legacy()
657 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
658 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
668 c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48; in cpu_probe_legacy()
671 c->cputype = CPU_RM9000; in cpu_probe_legacy()
672 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
673 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
682 c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48; in cpu_probe_legacy()
685 c->cputype = CPU_R8000; in cpu_probe_legacy()
686 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
687 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_legacy()
690 c->tlbsize = 384; /* has weird TLB: 3-way x 128 */ in cpu_probe_legacy()
693 c->cputype = CPU_R10000; in cpu_probe_legacy()
694 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
695 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_legacy()
699 c->tlbsize = 64; in cpu_probe_legacy()
702 c->cputype = CPU_R12000; in cpu_probe_legacy()
703 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
704 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_legacy()
708 c->tlbsize = 64; in cpu_probe_legacy()
711 c->cputype = CPU_UNKNOWN; in cpu_probe_legacy()
716 static inline void decode_config1(struct cpuinfo_mips *c) in decode_config1() argument
725 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in decode_config1()
730 c->options |= MIPS_CPU_WATCH; in decode_config1()
732 c->options |= MIPS_CPU_MIPS16; in decode_config1()
734 c->options |= MIPS_CPU_EJTAG; in decode_config1()
736 c->options |= MIPS_CPU_FPU; in decode_config1()
737 c->options |= MIPS_CPU_32FPR; in decode_config1()
739 c->scache.flags = MIPS_CACHE_NOT_PRESENT; in decode_config1()
741 c->tlbsize = ((config1 >> 25) & 0x3f) + 1; in decode_config1()
744 static inline void cpu_probe_mips(struct cpuinfo_mips *c) in cpu_probe_mips() argument
746 decode_config1(c); in cpu_probe_mips()
747 switch (c->processor_id & 0xff00) { in cpu_probe_mips()
749 c->cputype = CPU_4KC; in cpu_probe_mips()
750 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_mips()
753 c->cputype = CPU_4KEC; in cpu_probe_mips()
754 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_mips()
757 c->cputype = CPU_4KSC; in cpu_probe_mips()
758 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_mips()
761 c->cputype = CPU_5KC; in cpu_probe_mips()
762 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_mips()
765 c->cputype = CPU_20KC; in cpu_probe_mips()
766 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_mips()
769 c->cputype = CPU_24K; in cpu_probe_mips()
770 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_mips()
773 c->cputype = CPU_25KF; in cpu_probe_mips()
774 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_mips()
776 c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; in cpu_probe_mips()
779 c->cputype = CPU_UNKNOWN; in cpu_probe_mips()
784 static inline void cpu_probe_alchemy(struct cpuinfo_mips *c) in cpu_probe_alchemy() argument
786 decode_config1(c); in cpu_probe_alchemy()
787 switch (c->processor_id & 0xff00) { in cpu_probe_alchemy()
790 switch ((c->processor_id >> 24) & 0xff) { in cpu_probe_alchemy()
792 c->cputype = CPU_AU1000; in cpu_probe_alchemy()
795 c->cputype = CPU_AU1500; in cpu_probe_alchemy()
798 c->cputype = CPU_AU1100; in cpu_probe_alchemy()
804 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_alchemy()
809 static inline void cpu_probe_sibyte(struct cpuinfo_mips *c) in cpu_probe_sibyte() argument
811 decode_config1(c); in cpu_probe_sibyte()
812 switch (c->processor_id & 0xff00) { in cpu_probe_sibyte()
814 c->cputype = CPU_SB1; in cpu_probe_sibyte()
815 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_sibyte()
816 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_sibyte()
822 c->options |= MIPS_CPU_FPU | MIPS_CPU_32FPR; in cpu_probe_sibyte()
826 c->cputype = CPU_UNKNOWN; in cpu_probe_sibyte()
831 static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c) in cpu_probe_sandcraft() argument
833 decode_config1(c); in cpu_probe_sandcraft()
834 switch (c->processor_id & 0xff00) { in cpu_probe_sandcraft()
836 c->cputype = CPU_SR71000; in cpu_probe_sandcraft()
837 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_sandcraft()
838 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_sandcraft()
841 c->scache.ways = 8; in cpu_probe_sandcraft()
842 c->tlbsize = 64; in cpu_probe_sandcraft()
845 c->cputype = CPU_UNKNOWN; in cpu_probe_sandcraft()
852 struct cpuinfo_mips *c = &current_cpu_data; in cpu_probe() local
854 c->processor_id = PRID_IMP_UNKNOWN; in cpu_probe()
855 c->fpu_id = FPIR_IMP_NONE; in cpu_probe()
856 c->cputype = CPU_UNKNOWN; in cpu_probe()
858 c->processor_id = read_c0_prid(); in cpu_probe()
859 switch (c->processor_id & 0xff0000) { in cpu_probe()
861 cpu_probe_legacy(c); in cpu_probe()
864 cpu_probe_mips(c); in cpu_probe()
867 cpu_probe_alchemy(c); in cpu_probe()
870 cpu_probe_sibyte(c); in cpu_probe()
874 cpu_probe_sandcraft(c); in cpu_probe()
877 c->cputype = CPU_UNKNOWN; in cpu_probe()
879 if (c->options & MIPS_CPU_FPU) in cpu_probe()
880 c->fpu_id = cpu_get_fpu_id(); in cpu_probe()
885 struct cpuinfo_mips *c = &current_cpu_data; in cpu_report() local
887 printk("CPU revision is: %08x\n", c->processor_id); in cpu_report()
888 if (c->options & MIPS_CPU_FPU) in cpu_report()
889 printk("FPU revision is: %08x\n", c->fpu_id); in cpu_report()