diff options
Diffstat (limited to 'arch/mips/kernel')
| -rw-r--r-- | arch/mips/kernel/Makefile | 25 | ||||
| -rw-r--r-- | arch/mips/kernel/cpu-probe.c | 13 | ||||
| -rw-r--r-- | arch/mips/kernel/linux32.c | 2 | ||||
| -rw-r--r-- | arch/mips/kernel/mcount.S | 11 | ||||
| -rw-r--r-- | arch/mips/kernel/proc.c | 2 | ||||
| -rw-r--r-- | arch/mips/kernel/traps.c | 2 |
6 files changed, 22 insertions, 33 deletions
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index f81d98f6184c..de75fb50562b 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
| @@ -100,29 +100,16 @@ obj-$(CONFIG_HW_PERF_EVENTS) += perf_event_mipsxx.o | |||
| 100 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o | 100 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
| 101 | 101 | ||
| 102 | # | 102 | # |
| 103 | # DSP ASE supported for MIPS32 or MIPS64 Release 2 cores only. It is safe | 103 | # DSP ASE supported for MIPS32 or MIPS64 Release 2 cores only. It is not |
| 104 | # to enable DSP assembler support here even if the MIPS Release 2 CPU we | 104 | # safe to unconditionnaly use the assembler -mdsp / -mdspr2 switches |
| 105 | # are targetting does not support DSP because all code-paths making use of | 105 | # here because the compiler may use DSP ASE instructions (such as lwx) in |
| 106 | # it properly check that the running CPU *actually does* support these | 106 | # code paths where we cannot check that the CPU we are running on supports it. |
| 107 | # instructions. | 107 | # Proper abstraction using HAVE_AS_DSP and macros is done in |
| 108 | # arch/mips/include/asm/mipsregs.h. | ||
| 108 | # | 109 | # |
| 109 | ifeq ($(CONFIG_CPU_MIPSR2), y) | 110 | ifeq ($(CONFIG_CPU_MIPSR2), y) |
| 110 | CFLAGS_DSP = -DHAVE_AS_DSP | 111 | CFLAGS_DSP = -DHAVE_AS_DSP |
| 111 | 112 | ||
| 112 | # | ||
| 113 | # Check if assembler supports DSP ASE | ||
| 114 | # | ||
| 115 | ifeq ($(call cc-option-yn,-mdsp), y) | ||
| 116 | CFLAGS_DSP += -mdsp | ||
| 117 | endif | ||
| 118 | |||
| 119 | # | ||
| 120 | # Check if assembler supports DSP ASE Rev2 | ||
| 121 | # | ||
| 122 | ifeq ($(call cc-option-yn,-mdspr2), y) | ||
| 123 | CFLAGS_DSP += -mdspr2 | ||
| 124 | endif | ||
| 125 | |||
| 126 | CFLAGS_signal.o = $(CFLAGS_DSP) | 113 | CFLAGS_signal.o = $(CFLAGS_DSP) |
| 127 | CFLAGS_signal32.o = $(CFLAGS_DSP) | 114 | CFLAGS_signal32.o = $(CFLAGS_DSP) |
| 128 | CFLAGS_process.o = $(CFLAGS_DSP) | 115 | CFLAGS_process.o = $(CFLAGS_DSP) |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 6bfccc227a95..5fe66a0c3224 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
| @@ -580,6 +580,9 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
| 580 | c->tlbsize = 48; | 580 | c->tlbsize = 48; |
| 581 | break; | 581 | break; |
| 582 | case PRID_IMP_VR41XX: | 582 | case PRID_IMP_VR41XX: |
| 583 | set_isa(c, MIPS_CPU_ISA_III); | ||
| 584 | c->options = R4K_OPTS; | ||
| 585 | c->tlbsize = 32; | ||
| 583 | switch (c->processor_id & 0xf0) { | 586 | switch (c->processor_id & 0xf0) { |
| 584 | case PRID_REV_VR4111: | 587 | case PRID_REV_VR4111: |
| 585 | c->cputype = CPU_VR4111; | 588 | c->cputype = CPU_VR4111; |
| @@ -604,6 +607,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
| 604 | __cpu_name[cpu] = "NEC VR4131"; | 607 | __cpu_name[cpu] = "NEC VR4131"; |
| 605 | } else { | 608 | } else { |
| 606 | c->cputype = CPU_VR4133; | 609 | c->cputype = CPU_VR4133; |
| 610 | c->options |= MIPS_CPU_LLSC; | ||
| 607 | __cpu_name[cpu] = "NEC VR4133"; | 611 | __cpu_name[cpu] = "NEC VR4133"; |
| 608 | } | 612 | } |
| 609 | break; | 613 | break; |
| @@ -613,9 +617,6 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
| 613 | __cpu_name[cpu] = "NEC Vr41xx"; | 617 | __cpu_name[cpu] = "NEC Vr41xx"; |
| 614 | break; | 618 | break; |
| 615 | } | 619 | } |
| 616 | set_isa(c, MIPS_CPU_ISA_III); | ||
| 617 | c->options = R4K_OPTS; | ||
| 618 | c->tlbsize = 32; | ||
| 619 | break; | 620 | break; |
| 620 | case PRID_IMP_R4300: | 621 | case PRID_IMP_R4300: |
| 621 | c->cputype = CPU_R4300; | 622 | c->cputype = CPU_R4300; |
| @@ -1226,10 +1227,8 @@ __cpuinit void cpu_probe(void) | |||
| 1226 | if (c->options & MIPS_CPU_FPU) { | 1227 | if (c->options & MIPS_CPU_FPU) { |
| 1227 | c->fpu_id = cpu_get_fpu_id(); | 1228 | c->fpu_id = cpu_get_fpu_id(); |
| 1228 | 1229 | ||
| 1229 | if (c->isa_level == MIPS_CPU_ISA_M32R1 || | 1230 | if (c->isa_level & (MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M32R2 | |
| 1230 | c->isa_level == MIPS_CPU_ISA_M32R2 || | 1231 | MIPS_CPU_ISA_M64R1 | MIPS_CPU_ISA_M64R2)) { |
| 1231 | c->isa_level == MIPS_CPU_ISA_M64R1 || | ||
| 1232 | c->isa_level == MIPS_CPU_ISA_M64R2) { | ||
| 1233 | if (c->fpu_id & MIPS_FPIR_3D) | 1232 | if (c->fpu_id & MIPS_FPIR_3D) |
| 1234 | c->ases |= MIPS_ASE_MIPS3D; | 1233 | c->ases |= MIPS_ASE_MIPS3D; |
| 1235 | } | 1234 | } |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 8eeee1c860c0..db9655f08892 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
| @@ -171,7 +171,7 @@ SYSCALL_DEFINE6(32_ipc, u32, call, long, first, long, second, long, third, | |||
| 171 | err = compat_sys_shmctl(first, second, compat_ptr(ptr)); | 171 | err = compat_sys_shmctl(first, second, compat_ptr(ptr)); |
| 172 | break; | 172 | break; |
| 173 | default: | 173 | default: |
| 174 | err = -EINVAL; | 174 | err = -ENOSYS; |
| 175 | break; | 175 | break; |
| 176 | } | 176 | } |
| 177 | 177 | ||
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S index 165867673357..33d067148e61 100644 --- a/arch/mips/kernel/mcount.S +++ b/arch/mips/kernel/mcount.S | |||
| @@ -46,10 +46,9 @@ | |||
| 46 | PTR_L a5, PT_R9(sp) | 46 | PTR_L a5, PT_R9(sp) |
| 47 | PTR_L a6, PT_R10(sp) | 47 | PTR_L a6, PT_R10(sp) |
| 48 | PTR_L a7, PT_R11(sp) | 48 | PTR_L a7, PT_R11(sp) |
| 49 | #else | ||
| 50 | PTR_ADDIU sp, PT_SIZE | ||
| 51 | #endif | 49 | #endif |
| 52 | .endm | 50 | PTR_ADDIU sp, PT_SIZE |
| 51 | .endm | ||
| 53 | 52 | ||
| 54 | .macro RETURN_BACK | 53 | .macro RETURN_BACK |
| 55 | jr ra | 54 | jr ra |
| @@ -68,7 +67,11 @@ NESTED(ftrace_caller, PT_SIZE, ra) | |||
| 68 | .globl _mcount | 67 | .globl _mcount |
| 69 | _mcount: | 68 | _mcount: |
| 70 | b ftrace_stub | 69 | b ftrace_stub |
| 71 | addiu sp,sp,8 | 70 | #ifdef CONFIG_32BIT |
| 71 | addiu sp,sp,8 | ||
| 72 | #else | ||
| 73 | nop | ||
| 74 | #endif | ||
| 72 | 75 | ||
| 73 | /* When tracing is activated, it calls ftrace_caller+8 (aka here) */ | 76 | /* When tracing is activated, it calls ftrace_caller+8 (aka here) */ |
| 74 | lw t1, function_trace_stop | 77 | lw t1, function_trace_stop |
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index 135c4aadccbe..7a54f74b7818 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c | |||
| @@ -67,7 +67,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
| 67 | if (cpu_has_mips_r) { | 67 | if (cpu_has_mips_r) { |
| 68 | seq_printf(m, "isa\t\t\t:"); | 68 | seq_printf(m, "isa\t\t\t:"); |
| 69 | if (cpu_has_mips_1) | 69 | if (cpu_has_mips_1) |
| 70 | seq_printf(m, "%s", "mips1"); | 70 | seq_printf(m, "%s", " mips1"); |
| 71 | if (cpu_has_mips_2) | 71 | if (cpu_has_mips_2) |
| 72 | seq_printf(m, "%s", " mips2"); | 72 | seq_printf(m, "%s", " mips2"); |
| 73 | if (cpu_has_mips_3) | 73 | if (cpu_has_mips_3) |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index a200b5bdbb87..c3abb88170fc 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
| @@ -1571,7 +1571,7 @@ void __cpuinit per_cpu_trap_init(bool is_boot_cpu) | |||
| 1571 | #ifdef CONFIG_64BIT | 1571 | #ifdef CONFIG_64BIT |
| 1572 | status_set |= ST0_FR|ST0_KX|ST0_SX|ST0_UX; | 1572 | status_set |= ST0_FR|ST0_KX|ST0_SX|ST0_UX; |
| 1573 | #endif | 1573 | #endif |
| 1574 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) | 1574 | if (current_cpu_data.isa_level & MIPS_CPU_ISA_IV) |
| 1575 | status_set |= ST0_XX; | 1575 | status_set |= ST0_XX; |
| 1576 | if (cpu_has_dsp) | 1576 | if (cpu_has_dsp) |
| 1577 | status_set |= ST0_MX; | 1577 | status_set |= ST0_MX; |
