Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Remove unused R6000 support

The kernel contains a small amount of incomplete code aimed at
supporting old R6000 CPUs. This is:

- Unused, as no machine selects CONFIG_SYS_HAS_CPU_R6000.

- Broken, since there are glaring errors such as r6000_fpu.S moving
the FCSR register to t1, then ignoring it & instead saving t0 into
struct sigcontext...

- A maintenance headache, since it's code that nobody can test which
nevertheless imposes constraints on code which it shares with other
machines.

Remove this incomplete & broken R6000 CPU support in order to clean up
and in preparation for changes which will no longer need to consider
dragging the pretense of R6000 support along with them.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16236/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Paul Burton and committed by
Ralf Baechle
3b2db173 114c3708

+3 -165
+3 -14
arch/mips/Kconfig
··· 1627 1627 NEC VR5500 and VR5500A series processors implement 64-bit MIPS IV 1628 1628 instruction set. 1629 1629 1630 - config CPU_R6000 1631 - bool "R6000" 1632 - depends on SYS_HAS_CPU_R6000 1633 - select CPU_SUPPORTS_32BIT_KERNEL 1634 - help 1635 - MIPS Technologies R6000 and R6000A series processors. Note these 1636 - processors are extremely rare and the support for them is incomplete. 1637 - 1638 1630 config CPU_NEVADA 1639 1631 bool "RM52xx" 1640 1632 depends on SYS_HAS_CPU_NEVADA ··· 1942 1950 config SYS_HAS_CPU_R5500 1943 1951 bool 1944 1952 1945 - config SYS_HAS_CPU_R6000 1946 - bool 1947 - 1948 1953 config SYS_HAS_CPU_NEVADA 1949 1954 bool 1950 1955 ··· 2169 2180 2170 2181 config PAGE_SIZE_64KB 2171 2182 bool "64kB" 2172 - depends on !CPU_R3000 && !CPU_TX39XX && !CPU_R6000 2183 + depends on !CPU_R3000 && !CPU_TX39XX 2173 2184 help 2174 2185 Using 64kB page size will result in higher performance kernel at 2175 2186 the price of higher memory consumption. This option is available on ··· 2237 2248 2238 2249 config CPU_GENERIC_DUMP_TLB 2239 2250 bool 2240 - default y if !(CPU_R3000 || CPU_R6000 || CPU_R8000 || CPU_TX39XX) 2251 + default y if !(CPU_R3000 || CPU_R8000 || CPU_TX39XX) 2241 2252 2242 2253 config CPU_R4K_FPU 2243 2254 bool 2244 - default y if !(CPU_R3000 || CPU_R6000 || CPU_TX39XX || CPU_CAVIUM_OCTEON) 2255 + default y if !(CPU_R3000 || CPU_TX39XX || CPU_CAVIUM_OCTEON) 2245 2256 2246 2257 config CPU_R4K_CACHE_TLB 2247 2258 bool
-1
arch/mips/Makefile
··· 151 151 # 152 152 cflags-$(CONFIG_CPU_R3000) += -march=r3000 153 153 cflags-$(CONFIG_CPU_TX39XX) += -march=r3900 154 - cflags-$(CONFIG_CPU_R6000) += -march=r6000 -Wa,--trap 155 154 cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap 156 155 cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap 157 156 cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
-5
arch/mips/include/asm/cpu-type.h
··· 151 151 case CPU_R5500: 152 152 #endif 153 153 154 - #ifdef CONFIG_SYS_HAS_CPU_R6000 155 - case CPU_R6000: 156 - case CPU_R6000A: 157 - #endif 158 - 159 154 #ifdef CONFIG_SYS_HAS_CPU_NEVADA 160 155 case CPU_NEVADA: 161 156 #endif
-5
arch/mips/include/asm/cpu.h
··· 286 286 CPU_R3081, CPU_R3081E, 287 287 288 288 /* 289 - * R6000 class processors 290 - */ 291 - CPU_R6000, CPU_R6000A, 292 - 293 - /* 294 289 * R4000 class processors 295 290 */ 296 291 CPU_R4000PC, CPU_R4000SC, CPU_R4000MC, CPU_R4200, CPU_R4300, CPU_R4310,
-2
arch/mips/include/asm/module.h
··· 114 114 #define MODULE_PROC_FAMILY "R5432 " 115 115 #elif defined CONFIG_CPU_R5500 116 116 #define MODULE_PROC_FAMILY "R5500 " 117 - #elif defined CONFIG_CPU_R6000 118 - #define MODULE_PROC_FAMILY "R6000 " 119 117 #elif defined CONFIG_CPU_NEVADA 120 118 #define MODULE_PROC_FAMILY "NEVADA " 121 119 #elif defined CONFIG_CPU_R8000
-1
arch/mips/kernel/Makefile
··· 37 37 38 38 obj-$(CONFIG_CPU_R4K_FPU) += r4k_fpu.o r4k_switch.o 39 39 obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o 40 - obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o 41 40 obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o 42 41 obj-$(CONFIG_CPU_CAVIUM_OCTEON) += r4k_fpu.o octeon_switch.o 43 42
-18
arch/mips/kernel/cpu-probe.c
··· 1394 1394 MIPS_CPU_DIVEC | MIPS_CPU_LLSC; 1395 1395 c->tlbsize = 48; 1396 1396 break; 1397 - case PRID_IMP_R6000: 1398 - c->cputype = CPU_R6000; 1399 - __cpu_name[cpu] = "R6000"; 1400 - set_isa(c, MIPS_CPU_ISA_II); 1401 - c->fpu_msk31 |= FPU_CSR_CONDX | FPU_CSR_FS; 1402 - c->options = MIPS_CPU_TLB | MIPS_CPU_FPU | 1403 - MIPS_CPU_LLSC; 1404 - c->tlbsize = 32; 1405 - break; 1406 - case PRID_IMP_R6000A: 1407 - c->cputype = CPU_R6000A; 1408 - __cpu_name[cpu] = "R6000A"; 1409 - set_isa(c, MIPS_CPU_ISA_II); 1410 - c->fpu_msk31 |= FPU_CSR_CONDX | FPU_CSR_FS; 1411 - c->options = MIPS_CPU_TLB | MIPS_CPU_FPU | 1412 - MIPS_CPU_LLSC; 1413 - c->tlbsize = 32; 1414 - break; 1415 1397 case PRID_IMP_RM7000: 1416 1398 c->cputype = CPU_RM7000; 1417 1399 __cpu_name[cpu] = "RM7000";
-99
arch/mips/kernel/r6000_fpu.S
··· 1 - /* 2 - * r6000_fpu.S: Save/restore floating point context for signal handlers. 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 1996 by Ralf Baechle 9 - * 10 - * Multi-arch abstraction and asm macros for easier reading: 11 - * Copyright (C) 1996 David S. Miller (davem@davemloft.net) 12 - */ 13 - #include <asm/asm.h> 14 - #include <asm/fpregdef.h> 15 - #include <asm/mipsregs.h> 16 - #include <asm/asm-offsets.h> 17 - #include <asm/regdef.h> 18 - 19 - .set noreorder 20 - .set mips2 21 - .set push 22 - SET_HARDFLOAT 23 - 24 - /** 25 - * _save_fp_context() - save FP context from the FPU 26 - * @a0 - pointer to fpregs field of sigcontext 27 - * @a1 - pointer to fpc_csr field of sigcontext 28 - * 29 - * Save FP context, including the 32 FP data registers and the FP 30 - * control & status register, from the FPU to signal context. 31 - */ 32 - LEAF(_save_fp_context) 33 - mfc0 t0,CP0_STATUS 34 - sll t0,t0,2 35 - bgez t0,1f 36 - nop 37 - 38 - cfc1 t1,fcr31 39 - /* Store the 16 double precision registers */ 40 - sdc1 $f0,0(a0) 41 - sdc1 $f2,16(a0) 42 - sdc1 $f4,32(a0) 43 - sdc1 $f6,48(a0) 44 - sdc1 $f8,64(a0) 45 - sdc1 $f10,80(a0) 46 - sdc1 $f12,96(a0) 47 - sdc1 $f14,112(a0) 48 - sdc1 $f16,128(a0) 49 - sdc1 $f18,144(a0) 50 - sdc1 $f20,160(a0) 51 - sdc1 $f22,176(a0) 52 - sdc1 $f24,192(a0) 53 - sdc1 $f26,208(a0) 54 - sdc1 $f28,224(a0) 55 - sdc1 $f30,240(a0) 56 - jr ra 57 - sw t0,(a1) 58 - 1: jr ra 59 - nop 60 - END(_save_fp_context) 61 - 62 - /** 63 - * _restore_fp_context() - restore FP context to the FPU 64 - * @a0 - pointer to fpregs field of sigcontext 65 - * @a1 - pointer to fpc_csr field of sigcontext 66 - * 67 - * Restore FP context, including the 32 FP data registers and the FP 68 - * control & status register, from signal context to the FPU. 69 - */ 70 - LEAF(_restore_fp_context) 71 - mfc0 t0,CP0_STATUS 72 - sll t0,t0,2 73 - 74 - bgez t0,1f 75 - lw t0,(a1) 76 - /* Restore the 16 double precision registers */ 77 - ldc1 $f0,0(a0) 78 - ldc1 $f2,16(a0) 79 - ldc1 $f4,32(a0) 80 - ldc1 $f6,48(a0) 81 - ldc1 $f8,64(a0) 82 - ldc1 $f10,80(a0) 83 - ldc1 $f12,96(a0) 84 - ldc1 $f14,112(a0) 85 - ldc1 $f16,128(a0) 86 - ldc1 $f18,144(a0) 87 - ldc1 $f20,160(a0) 88 - ldc1 $f22,176(a0) 89 - ldc1 $f24,192(a0) 90 - ldc1 $f26,208(a0) 91 - ldc1 $f28,224(a0) 92 - ldc1 $f30,240(a0) 93 - jr ra 94 - ctc1 t0,fcr31 95 - 1: jr ra 96 - nop 97 - END(_restore_fp_context) 98 - 99 - .set pop /* SET_HARDFLOAT */
-15
arch/mips/kernel/traps.c
··· 2428 2428 set_except_vector(EXCCODE_TR, handle_tr); 2429 2429 set_except_vector(EXCCODE_MSAFPE, handle_msa_fpe); 2430 2430 2431 - if (current_cpu_type() == CPU_R6000 || 2432 - current_cpu_type() == CPU_R6000A) { 2433 - /* 2434 - * The R6000 is the only R-series CPU that features a machine 2435 - * check exception (similar to the R4000 cache error) and 2436 - * unaligned ldc1/sdc1 exception. The handlers have not been 2437 - * written yet. Well, anyway there is no R6000 machine on the 2438 - * current list of targets for Linux/MIPS. 2439 - * (Duh, crap, there is someone with a triple R6k machine) 2440 - */ 2441 - //set_except_vector(14, handle_mc); 2442 - //set_except_vector(15, handle_ndc); 2443 - } 2444 - 2445 - 2446 2431 if (board_nmi_handler_setup) 2447 2432 board_nmi_handler_setup(); 2448 2433
-5
arch/mips/mm/tlbex.c
··· 2634 2634 #endif 2635 2635 break; 2636 2636 2637 - case CPU_R6000: 2638 - case CPU_R6000A: 2639 - panic("No R6000 TLB refill handler yet"); 2640 - break; 2641 - 2642 2637 case CPU_R8000: 2643 2638 panic("No R8000 TLB refill handler yet"); 2644 2639 break;