[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20170601104134.11585-1-Yeking@Red54.com>
Date: Thu, 1 Jun 2017 18:41:34 +0800
From: 谢致邦 (XIE Zhibang)
<Yeking@...54.com>
To: linux-mips@...ux-mips.org, ralf@...ux-mips.org,
keguang.zhang@...il.com, gnaygnil@...il.com, zhoubb@...ote.com,
zhangfx@...ote.com, chenhc@...ote.com, wuzhangjin@...il.com,
sergei.shtylyov@...entembedded.com, james.hogan@...tec.com,
john@...ozen.org, Steven.Hill@...tec.com, aurelien@...el32.net,
linux-kernel@...r.kernel.org
Cc: 谢致邦 (XIE Zhibang)
<Yeking@...54.com>
Subject: [PATCH] MIPS: Loongson: Set Loongson32 to MIPS32R1
LS232 (Loonson 2-issue 32-bit, also called GS232 (Godson 2-issue 32-bit))
is the CPU core (microarchitecture) of Loongson 1A/1B/1C.
According to "LS232 用户手册 (LS232 User Manual)", LS232 implements the
MIPS32 Release 1 instruction set, and part of the MIPS32 Release 2
instruction set.
In the manual, LS232 implements all of the MIPS32R2 instruction set
except the FPU instructions, and LS232 also implements 5 FPU
instructions of the MIPS32R2 instruction set: CEIL.L.fmt, CVT.L.fmt,
FLOOR.L.fmt, TRUNC.L.fmt, and ROUND.L.fmt.
But a bug of the DI instruction has been found during tests, the DI
instruction can not disable interrupts in arch_local_irq_disable() with
CONFIG_PREEMPT_NONE=y and CFLAGS='-mno-branch-likely' in some cases.
Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@...54.com>
---
arch/mips/Kconfig | 8 +++++---
arch/mips/loongson32/Platform | 4 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 0b15978..6258786 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1421,7 +1421,8 @@ config CPU_LOONGSON1B
select LEDS_GPIO_REGISTER
help
The Loongson 1B is a 32-bit SoC, which implements the MIPS32
- release 2 instruction set.
+ Release 1 instruction set and part of the MIPS32 Release 2
+ instruction set.
config CPU_LOONGSON1C
bool "Loongson 1C"
@@ -1430,7 +1431,8 @@ config CPU_LOONGSON1C
select LEDS_GPIO_REGISTER
help
The Loongson 1C is a 32-bit SoC, which implements the MIPS32
- release 2 instruction set.
+ Release 1 instruction set and part of the MIPS32 Release 2
+ instruction set.
config CPU_MIPS32_R1
bool "MIPS32 Release 1"
@@ -1837,7 +1839,7 @@ config CPU_LOONGSON2
config CPU_LOONGSON1
bool
select CPU_MIPS32
- select CPU_MIPSR2
+ select CPU_MIPSR1
select CPU_HAS_PREFETCH
select CPU_SUPPORTS_32BIT_KERNEL
select CPU_SUPPORTS_HIGHMEM
diff --git a/arch/mips/loongson32/Platform b/arch/mips/loongson32/Platform
index ffe01c6..efd4a00 100644
--- a/arch/mips/loongson32/Platform
+++ b/arch/mips/loongson32/Platform
@@ -1,6 +1,6 @@
cflags-$(CONFIG_CPU_LOONGSON1) += \
- $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
- -Wa,-mips32r2 -Wa,--trap
+ $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
+ -Wa,-mips32 -Wa,--trap
platform-$(CONFIG_MACH_LOONGSON32) += loongson32/
cflags-$(CONFIG_MACH_LOONGSON32) += -I$(srctree)/arch/mips/include/asm/mach-loongson32
--
2.10.2
Powered by blists - more mailing lists