aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-06-05 14:21:27 -0400
committerRalf Baechle <ralf@linux-mips.org>2017-08-29 09:21:51 -0400
commit3b2db173f01229410129f438d2f261c16a360eef (patch)
tree080f38e2506a8ff4a32a71b16ceaa3e135a10a72 /arch
parent114c370845111d4f2e31f9c6d4eedd9e4fc01f86 (diff)
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/Kconfig17
-rw-r--r--arch/mips/Makefile1
-rw-r--r--arch/mips/include/asm/cpu-type.h5
-rw-r--r--arch/mips/include/asm/cpu.h5
-rw-r--r--arch/mips/include/asm/module.h2
-rw-r--r--arch/mips/kernel/Makefile1
-rw-r--r--arch/mips/kernel/cpu-probe.c18
-rw-r--r--arch/mips/kernel/r6000_fpu.S99
-rw-r--r--arch/mips/kernel/traps.c15
-rw-r--r--arch/mips/mm/tlbex.c5
10 files changed, 3 insertions, 165 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 48d91d5be4e9..a2f6b199776a 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1627,14 +1627,6 @@ config CPU_R5500
1627 NEC VR5500 and VR5500A series processors implement 64-bit MIPS IV 1627 NEC VR5500 and VR5500A series processors implement 64-bit MIPS IV
1628 instruction set. 1628 instruction set.
1629 1629
1630config 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
1638config CPU_NEVADA 1630config CPU_NEVADA
1639 bool "RM52xx" 1631 bool "RM52xx"
1640 depends on SYS_HAS_CPU_NEVADA 1632 depends on SYS_HAS_CPU_NEVADA
@@ -1950,9 +1942,6 @@ config SYS_HAS_CPU_R5432
1950config SYS_HAS_CPU_R5500 1942config SYS_HAS_CPU_R5500
1951 bool 1943 bool
1952 1944
1953config SYS_HAS_CPU_R6000
1954 bool
1955
1956config SYS_HAS_CPU_NEVADA 1945config SYS_HAS_CPU_NEVADA
1957 bool 1946 bool
1958 1947
@@ -2180,7 +2169,7 @@ config PAGE_SIZE_32KB
2180 2169
2181config PAGE_SIZE_64KB 2170config PAGE_SIZE_64KB
2182 bool "64kB" 2171 bool "64kB"
2183 depends on !CPU_R3000 && !CPU_TX39XX && !CPU_R6000 2172 depends on !CPU_R3000 && !CPU_TX39XX
2184 help 2173 help
2185 Using 64kB page size will result in higher performance kernel at 2174 Using 64kB page size will result in higher performance kernel at
2186 the price of higher memory consumption. This option is available on 2175 the price of higher memory consumption. This option is available on
@@ -2248,11 +2237,11 @@ config CPU_HAS_PREFETCH
2248 2237
2249config CPU_GENERIC_DUMP_TLB 2238config CPU_GENERIC_DUMP_TLB
2250 bool 2239 bool
2251 default y if !(CPU_R3000 || CPU_R6000 || CPU_R8000 || CPU_TX39XX) 2240 default y if !(CPU_R3000 || CPU_R8000 || CPU_TX39XX)
2252 2241
2253config CPU_R4K_FPU 2242config CPU_R4K_FPU
2254 bool 2243 bool
2255 default y if !(CPU_R3000 || CPU_R6000 || CPU_TX39XX || CPU_CAVIUM_OCTEON) 2244 default y if !(CPU_R3000 || CPU_TX39XX || CPU_CAVIUM_OCTEON)
2256 2245
2257config CPU_R4K_CACHE_TLB 2246config CPU_R4K_CACHE_TLB
2258 bool 2247 bool
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index bc2708c9ada4..d78d615cd395 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -151,7 +151,6 @@ cflags-y += -fno-stack-check
151# 151#
152cflags-$(CONFIG_CPU_R3000) += -march=r3000 152cflags-$(CONFIG_CPU_R3000) += -march=r3000
153cflags-$(CONFIG_CPU_TX39XX) += -march=r3900 153cflags-$(CONFIG_CPU_TX39XX) += -march=r3900
154cflags-$(CONFIG_CPU_R6000) += -march=r6000 -Wa,--trap
155cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap 154cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
156cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap 155cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
157cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap 156cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
diff --git a/arch/mips/include/asm/cpu-type.h b/arch/mips/include/asm/cpu-type.h
index 175fe565f4e1..a45af3de075d 100644
--- a/arch/mips/include/asm/cpu-type.h
+++ b/arch/mips/include/asm/cpu-type.h
@@ -151,11 +151,6 @@ static inline int __pure __get_cpu_type(const int cpu_type)
151 case CPU_R5500: 151 case CPU_R5500:
152#endif 152#endif
153 153
154#ifdef CONFIG_SYS_HAS_CPU_R6000
155 case CPU_R6000:
156 case CPU_R6000A:
157#endif
158
159#ifdef CONFIG_SYS_HAS_CPU_NEVADA 154#ifdef CONFIG_SYS_HAS_CPU_NEVADA
160 case CPU_NEVADA: 155 case CPU_NEVADA:
161#endif 156#endif
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index d0c152b989f8..ece9b84f3bcb 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -286,11 +286,6 @@ enum cpu_type_enum {
286 CPU_R3081, CPU_R3081E, 286 CPU_R3081, CPU_R3081E,
287 287
288 /* 288 /*
289 * R6000 class processors
290 */
291 CPU_R6000, CPU_R6000A,
292
293 /*
294 * R4000 class processors 289 * R4000 class processors
295 */ 290 */
296 CPU_R4000PC, CPU_R4000SC, CPU_R4000MC, CPU_R4200, CPU_R4300, CPU_R4310, 291 CPU_R4000PC, CPU_R4000SC, CPU_R4000MC, CPU_R4200, CPU_R4300, CPU_R4310,
diff --git a/arch/mips/include/asm/module.h b/arch/mips/include/asm/module.h
index e51add184717..06552a965cf4 100644
--- a/arch/mips/include/asm/module.h
+++ b/arch/mips/include/asm/module.h
@@ -114,8 +114,6 @@ search_module_dbetables(unsigned long addr)
114#define MODULE_PROC_FAMILY "R5432 " 114#define MODULE_PROC_FAMILY "R5432 "
115#elif defined CONFIG_CPU_R5500 115#elif defined CONFIG_CPU_R5500
116#define MODULE_PROC_FAMILY "R5500 " 116#define MODULE_PROC_FAMILY "R5500 "
117#elif defined CONFIG_CPU_R6000
118#define MODULE_PROC_FAMILY "R6000 "
119#elif defined CONFIG_CPU_NEVADA 117#elif defined CONFIG_CPU_NEVADA
120#define MODULE_PROC_FAMILY "NEVADA " 118#define MODULE_PROC_FAMILY "NEVADA "
121#elif defined CONFIG_CPU_R8000 119#elif defined CONFIG_CPU_R8000
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 46c0581256f1..afd66b2d9cf3 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -37,7 +37,6 @@ obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
37 37
38obj-$(CONFIG_CPU_R4K_FPU) += r4k_fpu.o r4k_switch.o 38obj-$(CONFIG_CPU_R4K_FPU) += r4k_fpu.o r4k_switch.o
39obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o 39obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o
40obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o
41obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o 40obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o
42obj-$(CONFIG_CPU_CAVIUM_OCTEON) += r4k_fpu.o octeon_switch.o 41obj-$(CONFIG_CPU_CAVIUM_OCTEON) += r4k_fpu.o octeon_switch.o
43 42
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index d08afc7dc507..19ae0e279c86 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -1394,24 +1394,6 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
1394 MIPS_CPU_DIVEC | MIPS_CPU_LLSC; 1394 MIPS_CPU_DIVEC | MIPS_CPU_LLSC;
1395 c->tlbsize = 48; 1395 c->tlbsize = 48;
1396 break; 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 case PRID_IMP_RM7000: 1397 case PRID_IMP_RM7000:
1416 c->cputype = CPU_RM7000; 1398 c->cputype = CPU_RM7000;
1417 __cpu_name[cpu] = "RM7000"; 1399 __cpu_name[cpu] = "RM7000";
diff --git a/arch/mips/kernel/r6000_fpu.S b/arch/mips/kernel/r6000_fpu.S
deleted file mode 100644
index 9cc7bfab3419..000000000000
--- a/arch/mips/kernel/r6000_fpu.S
+++ /dev/null
@@ -1,99 +0,0 @@
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)
581: 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
951: jr ra
96 nop
97 END(_restore_fp_context)
98
99 .set pop /* SET_HARDFLOAT */
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index b68b4d0726d3..b52a785477f9 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -2428,21 +2428,6 @@ void __init trap_init(void)
2428 set_except_vector(EXCCODE_TR, handle_tr); 2428 set_except_vector(EXCCODE_TR, handle_tr);
2429 set_except_vector(EXCCODE_MSAFPE, handle_msa_fpe); 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 if (board_nmi_handler_setup) 2431 if (board_nmi_handler_setup)
2447 board_nmi_handler_setup(); 2432 board_nmi_handler_setup();
2448 2433
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 5aadc69c8ce3..79b9f2ad3ff5 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -2634,11 +2634,6 @@ void build_tlb_refill_handler(void)
2634#endif 2634#endif
2635 break; 2635 break;
2636 2636
2637 case CPU_R6000:
2638 case CPU_R6000A:
2639 panic("No R6000 TLB refill handler yet");
2640 break;
2641
2642 case CPU_R8000: 2637 case CPU_R8000:
2643 panic("No R8000 TLB refill handler yet"); 2638 panic("No R8000 TLB refill handler yet");
2644 break; 2639 break;