[linux] 02/02: [mips*el/loongson3] Set Loongson 3 ISA to MIPS64R1 to correctly emulate the corresponding FP instructions.

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Mon Sep 14 22:22:15 UTC 2015


This is an automated email from the git hooks/post-receive script.

aurel32 pushed a commit to branch jessie
in repository linux.

commit 9b176d3d97ddde833fd30dbe8f7ba1a9668e776a
Author: Aurelien Jarno <aurelien at aurel32.net>
Date:   Mon Sep 14 22:30:16 2015 +0200

    [mips*el/loongson3] Set Loongson 3 ISA to MIPS64R1 to correctly emulate the corresponding FP instructions.
---
 debian/changelog                                   |  2 +
 ...on-set-loongson-3-s-isa-level-to-mips64r1.patch | 75 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 78 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d387579..076126e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -477,6 +477,8 @@ linux (3.16.7-ckt15-1) UNRELEASED; urgency=medium
 
   [ Aurelien Jarno ]
   * [mips*] Correct FP emulation delay slot exception propagation.
+  * [mips*el/loongson3] Set Loongson 3 ISA to MIPS64R1 to correctly emulate
+    the corresponding FP instructions.
 
  -- Ben Hutchings <ben at decadent.org.uk>  Tue, 26 May 2015 01:42:36 +0100
 
diff --git a/debian/patches/features/mips/mips-loongson-set-loongson-3-s-isa-level-to-mips64r1.patch b/debian/patches/features/mips/mips-loongson-set-loongson-3-s-isa-level-to-mips64r1.patch
new file mode 100644
index 0000000..aed59e8
--- /dev/null
+++ b/debian/patches/features/mips/mips-loongson-set-loongson-3-s-isa-level-to-mips64r1.patch
@@ -0,0 +1,75 @@
+From: Huacai Chen <chenhc at lemote.com>
+Date: Tue, 4 Nov 2014 14:13:23 +0800
+Subject: MIPS: Loongson: Set Loongson-3's ISA level to MIPS64R1
+Origin: https://git.kernel.org/linus/7352c8b13dd9a848b0c5d6209d62761afb164dcb
+
+In CPU manual Loongson-3 is MIPS64R2 compatible, but during tests we
+found that its EI/DI instructions have problems. So we just set the ISA
+level to MIPS64R1.
+
+Signed-off-by: Huacai Chen <chenhc at lemote.com>
+Cc: John Crispin <john at phrozen.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: linux-mips at linux-mips.org
+Cc: Fuxin Zhang <zhangfx at lemote.com>
+Cc: Zhangjin Wu <wuzhangjin at gmail.com>
+Patchwork: https://patchwork.linux-mips.org/patch/8320/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h | 2 --
+ arch/mips/kernel/cpu-probe.c                                | 5 ++++-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h
+index 7d28f95..6d69332 100644
+--- a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h
++++ b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h
+@@ -41,10 +41,8 @@
+ #define cpu_has_mcheck		0
+ #define cpu_has_mdmx		0
+ #define cpu_has_mips16		0
+-#define cpu_has_mips32r1	0
+ #define cpu_has_mips32r2	0
+ #define cpu_has_mips3d		0
+-#define cpu_has_mips64r1	0
+ #define cpu_has_mips64r2	0
+ #define cpu_has_mipsmt		0
+ #define cpu_has_prefetch	0
+diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
+index 08dc945..d5a4f38 100644
+--- a/arch/mips/kernel/cpu-probe.c
++++ b/arch/mips/kernel/cpu-probe.c
+@@ -757,26 +757,29 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
+ 			c->cputype = CPU_LOONGSON2;
+ 			__cpu_name[cpu] = "ICT Loongson-2";
+ 			set_elf_platform(cpu, "loongson2e");
++			set_isa(c, MIPS_CPU_ISA_III);
+ 			break;
+ 		case PRID_REV_LOONGSON2F:
+ 			c->cputype = CPU_LOONGSON2;
+ 			__cpu_name[cpu] = "ICT Loongson-2";
+ 			set_elf_platform(cpu, "loongson2f");
++			set_isa(c, MIPS_CPU_ISA_III);
+ 			break;
+ 		case PRID_REV_LOONGSON3A:
+ 			c->cputype = CPU_LOONGSON3;
+ 			__cpu_name[cpu] = "ICT Loongson-3";
+ 			set_elf_platform(cpu, "loongson3a");
++			set_isa(c, MIPS_CPU_ISA_M64R1);
+ 			break;
+ 		case PRID_REV_LOONGSON3B_R1:
+ 		case PRID_REV_LOONGSON3B_R2:
+ 			c->cputype = CPU_LOONGSON3;
+ 			__cpu_name[cpu] = "ICT Loongson-3";
+ 			set_elf_platform(cpu, "loongson3b");
++			set_isa(c, MIPS_CPU_ISA_M64R1);
+ 			break;
+ 		}
+ 
+-		set_isa(c, MIPS_CPU_ISA_III);
+ 		c->options = R4K_OPTS |
+ 			     MIPS_CPU_FPU | MIPS_CPU_LLSC |
+ 			     MIPS_CPU_32FPR;
+-- 
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index c4ad450..5366789 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -109,6 +109,7 @@ features/mips/MIPS-Loongson-3-Enable-the-COP2-usage.patch
 features/mips/MIPS-Loongson-Rename-CONFIG_LEMOTE_MACH3A-to-CONFIG_.patch
 features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch
 features/mips/MIPS-octeon-Add-support-for-the-UBNT-E200-board.patch
+features/mips/mips-loongson-set-loongson-3-s-isa-level-to-mips64r1.patch
 features/powerpc/KVM-prepare-for-KVM_-S-G-ET_MP_STATE-on-other-archit.patch
 features/powerpc/KVM-PPC-Book3s-PR-Disable-AIL-mode-with-OPAL.patch
 features/powerpc/KVM-PPC-Book3s-HV-Fix-tlbie-compile-error.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list