linux_dsm_epyc7002/arch/mips/kernel
Maciej W. Rozycki 051ff44a8b MIPS: Handle COP3 Unusable exception as COP1X for FP emulation
Our FP emulator is hardcoded for the MIPS IV FP instruction set and does
not match the FP ISA with the general ISA.  However for the few MIPS IV FP
instructions that use the COP1X major opcode it relies on the Coprocessor
Unusable exception to be delivered as a COP1 rather than COP3 exception.
This includes indexed transfer (LDXC1, etc.) and FP multiply-accumulate
(MADD.D, etc.) instructions.

 All the MIPS I, II, III and IV processors and some newer chips that do not
implement the FPU use the COP3 exception however.  Therefore I believe the
kernel should follow and redirect any COP3 Unusable traps to the emulator
unless an actual FPU part or core is present.

 This is a change that implements it.  Any minor opcode encodings that are
not recognised as valid FP instructions are rejected by the emulator and
will result in a SIGILL signal being delivered as they currently do.  We
do not support vendor-specific coprocessor 3 implementations supported
with MIPS I and MIPS II ISA processors; we never set CP0.Status.CU3.

[Ralf: On MIPS IV processors the kernel always enables the XX bit which
replaces the CU3 bit off earlier architecture revisions.]

 If matching between the CPU and the FPU ISA is considered required one
day, this can still be done in the emulator itself.  I think the CpU
exception dispatcher is not the right place to do this anyway, as there
are further differences between MIPS I, MIPS II, MIPS III, MIPS IV and
MIPS32 FP ISAs.

 Corresponding explanation of this implementation is included within the
change itself.

Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/project/linux-mips/list/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-12-13 18:15:27 +01:00
..
cpufreq MIPS: Loongson 2: Sort out clock managment. 2012-08-01 18:10:06 +02:00
.gitignore [MIPS] Ignore vmlinux.lds generated files 2008-08-26 09:10:27 +01:00
8250-platform.c mips: remove needless include of module.h from core kernel files. 2011-10-31 19:30:57 -04:00
asm-offsets.c MIPS: Remove leftovers from the IRIX binary compat code. 2012-12-12 16:52:07 +01:00
binfmt_elfn32.c remove div_long_long_rem 2008-05-01 08:03:58 -07:00
binfmt_elfo32.c MIPS: 64-bit: Fix o32 core dump 2009-07-03 15:45:27 +01:00
bmips_vec.S MIPS: BMIPS: Add SMP support code for BMIPS43xx/BMIPS5000 2011-12-07 22:03:18 +00:00
branch.c MIPS Kprobes: Refactor branch emulation 2011-12-07 22:04:03 +00:00
cevt-bcm1480.c MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
cevt-ds1287.c MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
cevt-gt641xx.c MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
cevt-r4k.c MIPS: Add EIC support for GIC. 2012-09-13 15:43:49 -05:00
cevt-sb1250.c MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
cevt-smtc.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
cevt-txx9.c MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
cpu-bugs64.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
cpu-probe.c MIPS: Add detection of DSP ASE Revision 2. 2012-10-11 11:05:03 +02:00
crash_dump.c MIPS: Octeon: Add kexec and kdump support 2012-12-13 17:00:39 +01:00
crash.c MIPS: kdump: Add support 2012-12-13 16:46:47 +01:00
csrc-bcm1480.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
csrc-ioasic.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
csrc-powertv.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
csrc-r4k.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
csrc-sb1250.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
early_printk.c [MIPS] fix sparse warning about setup_early_printk() 2008-07-15 18:44:29 +01:00
entry.S MIPS: Merge the identical "return from syscall" per-ABI code 2012-09-22 15:47:31 +02:00
ftrace.c MIPS: Ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile 2011-09-21 17:52:04 +02:00
genex.S MIPS: Read watch registers with interrupts disabled. 2009-01-30 21:32:58 +00:00
gpio_txx9.c [MIPS] txx9: Make gpio_txx9 entirely spinlock-safe 2008-07-15 18:44:34 +01:00
head.S MIPS: Avoid potential hazard on Context register 2009-11-02 12:00:07 +01:00
i8253.c MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
i8259.c MIPS: i8259: Mark cascade interrupt non-threaded 2011-09-21 17:52:28 +02:00
irq_cpu.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
irq_txx9.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
irq-gic.c MIPS: Make VPE count to be one-based. 2012-09-13 15:43:51 -05:00
irq-gt641xx.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
irq-msc01.c mips: remove needless include of module.h from core kernel files. 2011-10-31 19:30:57 -04:00
irq-rm7000.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
irq-rm9000.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
irq.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
jump_label.c MIPS: jump label: Add MIPS support. 2011-01-18 19:30:24 +01:00
kgdb.c mips,kgdb: fix recursive page fault with CONFIG_KPROBES 2012-10-12 06:37:34 -05:00
kprobes.c MIPS Kprobes: Support branch instructions probing 2011-12-07 22:04:03 +00:00
linux32.c vfs: define struct filename and have getname() return it 2012-10-12 20:14:55 -04:00
machine_kexec.c MIPS: kdump: Add support 2012-12-13 16:46:47 +01:00
Makefile MIPS: Remove usage of CEVT_R4K_LIB config option. 2012-12-13 18:15:24 +01:00
mcount.S MIPS: tracing: Fix the indentation of mcount.S 2010-08-05 13:26:06 +01:00
mips_ksyms.c MIPS: Transparent Huge Pages support 2012-12-12 16:48:52 +01:00
mips_machine.c MIPS: Add generic support for multiple machines within a single kernel 2011-01-18 19:30:21 +01:00
mips-mt-fpaff.c MIPS: MT: Fix build with CONFIG_UIDGID_STRICT_TYPE_CHECKS=y 2012-12-13 18:15:26 +01:00
mips-mt.c Merge branch 'master' into for-next 2012-04-08 21:48:52 +02:00
module-rela.c MIPS: Fix module.c build for 32 bit 2012-09-28 14:31:02 +09:30
module.c MIPS: Fix module.c build for 32 bit 2012-09-28 14:31:02 +09:30
octeon_switch.S MIPS: Fix race condition with FPU thread task flag during context switch. 2012-07-19 11:23:43 +02:00
perf_event_mipsxx.c MIPS: perf: Add perf functionality for BMIPS5000 2012-10-11 11:04:34 +02:00
perf_event.c MIPS: perf: Reorganize contents of perf support files. 2011-10-24 23:34:26 +01:00
proc.c MIPS: proc: Cleanup printing of ASEs. 2012-10-11 11:10:43 +02:00
process.c MIPS: Fix poweroff failure when HOTPLUG_CPU configured. 2012-12-13 18:15:26 +01:00
prom.c MIPS: Prune some target specific code out of prom.c 2012-07-23 13:54:52 +01:00
ptrace32.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
ptrace.c seccomp: ignore secure_computing return values 2012-04-18 12:24:50 +10:00
r4k_fpu.S update David Miller's old email address 2011-04-06 06:19:38 -07:00
r4k_switch.S MIPS: Fix race condition with FPU thread task flag during context switch. 2012-07-19 11:23:43 +02:00
r2300_fpu.S update David Miller's old email address 2011-04-06 06:19:38 -07:00
r2300_switch.S MIPS: Fix race condition with FPU thread task flag during context switch. 2012-07-19 11:23:43 +02:00
r6000_fpu.S update David Miller's old email address 2011-04-06 06:19:38 -07:00
relocate_kernel.S MIPS: Octeon: Add kexec and kdump support 2012-12-13 17:00:39 +01:00
reset.c mips: migrate core kernel file from module.h --> export.h 2011-10-31 19:30:56 -04:00
rtlx.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
scall32-o32.S MIPS: Wire kcmp syscall. 2012-09-26 11:24:28 +02:00
scall64-64.S MIPS: Wire kcmp syscall. 2012-09-26 11:24:28 +02:00
scall64-n32.S MIPS: N32: Remove unused defines. 2012-11-26 13:41:05 +01:00
scall64-o32.S MIPS: Wire kcmp syscall. 2012-09-26 11:24:28 +02:00
setup.c MIPS: kdump: Add support 2012-12-13 16:46:47 +01:00
signal32.c most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set 2012-06-01 12:58:51 -04:00
signal_n32.c most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set 2012-06-01 12:58:51 -04:00
signal-common.h most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set 2012-06-01 12:58:51 -04:00
signal.c MIPS: Fix harmlessly missing else statement. 2012-12-12 16:52:07 +01:00
smp-bmips.c MIPS: BMIPS: delay irq enable to ->smp_finish() 2012-07-19 11:23:44 +02:00
smp-cmp.c MIPS: CMP: Fix physical core number calculation logic 2012-10-18 11:45:41 +02:00
smp-mt.c MIPS: Fix build error for non-malta VSMP kernel 2012-08-22 23:46:38 +02:00
smp-up.c cpumask: arch_send_call_function_ipi_mask: mips 2009-09-24 09:34:45 +09:30
smp.c MIPS: kdump: Add support 2012-12-13 16:46:47 +01:00
smtc-asm.S [MIPS] SMTC: Don't set and restore irqregs ptr from self_ipi. 2007-06-11 18:20:53 +01:00
smtc-proc.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
smtc.c MIPS: SMTC: Support for Multi-threaded FPUs 2012-07-23 13:55:53 +01:00
spinlock_test.c mips: migrate core kernel file from module.h --> export.h 2011-10-31 19:30:56 -04:00
spram.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
stacktrace.c mips: migrate core kernel file from module.h --> export.h 2011-10-31 19:30:56 -04:00
sync-r4k.c MIPS: Synchronize MIPS count one CPU at a time 2012-08-17 10:57:28 +02:00
syscall.c vfs: define struct filename and have getname() return it 2012-10-12 20:14:55 -04:00
time.c mips: migrate core kernel file from module.h --> export.h 2011-10-31 19:30:56 -04:00
topology.c MIPS: Add arch generic CPU hotplug 2009-06-24 18:34:40 +01:00
traps.c MIPS: Handle COP3 Unusable exception as COP1X for FP emulation 2012-12-13 18:15:27 +01:00
unaligned.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
vdso.c coredump: remove VM_ALWAYSDUMP flag 2012-03-23 16:58:42 -07:00
vmlinux.lds.S MIPS: Align swapper_pg_dir to 64K for better TLB Refill code. 2012-10-11 11:02:40 +02:00
vpe.c MIPS: MT: Remove kspd. 2012-10-11 11:14:12 +02:00
watch.c MIPS: Add HARDWARE_WATCHPOINTS definitions and support code. 2008-10-11 16:18:56 +01:00