Skip to content

Commit 3b2db17

Browse files
paulburtonralfbaechle
authored andcommitted
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>
1 parent 114c370 commit 3b2db17

File tree

10 files changed

+3
-165
lines changed

10 files changed

+3
-165
lines changed

arch/mips/Kconfig

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,14 +1627,6 @@ config CPU_R5500
16271627
NEC VR5500 and VR5500A series processors implement 64-bit MIPS IV
16281628
instruction set.
16291629

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-
16381630
config CPU_NEVADA
16391631
bool "RM52xx"
16401632
depends on SYS_HAS_CPU_NEVADA
@@ -1950,9 +1942,6 @@ config SYS_HAS_CPU_R5432
19501942
config SYS_HAS_CPU_R5500
19511943
bool
19521944

1953-
config SYS_HAS_CPU_R6000
1954-
bool
1955-
19561945
config SYS_HAS_CPU_NEVADA
19571946
bool
19581947

@@ -2180,7 +2169,7 @@ config PAGE_SIZE_32KB
21802169

21812170
config PAGE_SIZE_64KB
21822171
bool "64kB"
2183-
depends on !CPU_R3000 && !CPU_TX39XX && !CPU_R6000
2172+
depends on !CPU_R3000 && !CPU_TX39XX
21842173
help
21852174
Using 64kB page size will result in higher performance kernel at
21862175
the price of higher memory consumption. This option is available on
@@ -2248,11 +2237,11 @@ config CPU_HAS_PREFETCH
22482237

22492238
config CPU_GENERIC_DUMP_TLB
22502239
bool
2251-
default y if !(CPU_R3000 || CPU_R6000 || CPU_R8000 || CPU_TX39XX)
2240+
default y if !(CPU_R3000 || CPU_R8000 || CPU_TX39XX)
22522241

22532242
config CPU_R4K_FPU
22542243
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)
22562245

22572246
config CPU_R4K_CACHE_TLB
22582247
bool

arch/mips/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ cflags-y += -fno-stack-check
151151
#
152152
cflags-$(CONFIG_CPU_R3000) += -march=r3000
153153
cflags-$(CONFIG_CPU_TX39XX) += -march=r3900
154-
cflags-$(CONFIG_CPU_R6000) += -march=r6000 -Wa,--trap
155154
cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
156155
cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
157156
cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap

arch/mips/include/asm/cpu-type.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,6 @@ static inline int __pure __get_cpu_type(const int cpu_type)
151151
case CPU_R5500:
152152
#endif
153153

154-
#ifdef CONFIG_SYS_HAS_CPU_R6000
155-
case CPU_R6000:
156-
case CPU_R6000A:
157-
#endif
158-
159154
#ifdef CONFIG_SYS_HAS_CPU_NEVADA
160155
case CPU_NEVADA:
161156
#endif

arch/mips/include/asm/cpu.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,6 @@ enum cpu_type_enum {
285285
CPU_R2000, CPU_R3000, CPU_R3000A, CPU_R3041, CPU_R3051, CPU_R3052,
286286
CPU_R3081, CPU_R3081E,
287287

288-
/*
289-
* R6000 class processors
290-
*/
291-
CPU_R6000, CPU_R6000A,
292-
293288
/*
294289
* R4000 class processors
295290
*/

arch/mips/include/asm/module.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ search_module_dbetables(unsigned long addr)
114114
#define MODULE_PROC_FAMILY "R5432 "
115115
#elif defined CONFIG_CPU_R5500
116116
#define MODULE_PROC_FAMILY "R5500 "
117-
#elif defined CONFIG_CPU_R6000
118-
#define MODULE_PROC_FAMILY "R6000 "
119117
#elif defined CONFIG_CPU_NEVADA
120118
#define MODULE_PROC_FAMILY "NEVADA "
121119
#elif defined CONFIG_CPU_R8000

arch/mips/kernel/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
3737

3838
obj-$(CONFIG_CPU_R4K_FPU) += r4k_fpu.o r4k_switch.o
3939
obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o
40-
obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o
4140
obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o
4241
obj-$(CONFIG_CPU_CAVIUM_OCTEON) += r4k_fpu.o octeon_switch.o
4342

arch/mips/kernel/cpu-probe.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,24 +1394,6 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
13941394
MIPS_CPU_DIVEC | MIPS_CPU_LLSC;
13951395
c->tlbsize = 48;
13961396
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;
14151397
case PRID_IMP_RM7000:
14161398
c->cputype = CPU_RM7000;
14171399
__cpu_name[cpu] = "RM7000";

arch/mips/kernel/r6000_fpu.S

Lines changed: 0 additions & 99 deletions
This file was deleted.

arch/mips/kernel/traps.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,21 +2428,6 @@ void __init trap_init(void)
24282428
set_except_vector(EXCCODE_TR, handle_tr);
24292429
set_except_vector(EXCCODE_MSAFPE, handle_msa_fpe);
24302430

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-
24462431
if (board_nmi_handler_setup)
24472432
board_nmi_handler_setup();
24482433

arch/mips/mm/tlbex.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2634,11 +2634,6 @@ void build_tlb_refill_handler(void)
26342634
#endif
26352635
break;
26362636

2637-
case CPU_R6000:
2638-
case CPU_R6000A:
2639-
panic("No R6000 TLB refill handler yet");
2640-
break;
2641-
26422637
case CPU_R8000:
26432638
panic("No R8000 TLB refill handler yet");
26442639
break;

0 commit comments

Comments
 (0)