Skip to contentSkip to conversation

MIPS: Fix boot on Fuloong2 systems

PATCH Applied Guenter Roeck 4 participants 4 messages Nov 27, 2019 – Nov 28, 2019 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Fix boot on Fuloong2 systems

Commit 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES") changed Kconfig symbols as follows:
CPU_LOONGSON2 to CPU_LOONGSON2EF
CPU_LOONGSON3 to CPU_LOONGSON64 SYS_HAS_CPU_LOONGSON3 to SYS_HAS_CPU_LOONGSON64

It did not touch SYS_HAS_CPU_LOONGSON2E or SYS_HAS_CPU_LOONGSON2F. However, the patch changed a conditional from

#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)

to

#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF)

SYS_HAS_CPU_LOONGSON2EF does not exist, resulting in boot failures with the qemu fulong2e emulation. Revert to the original code.

Fixes 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES")
Cc Jiaxun Yang <[email protected]>
---
 arch/mips/include/asm/cpu-type.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/mips/include/asm/cpu-type.h +2 -1
index c46c59b0f1b4..49f0061a6051 100644
@@ -15,7 +15,8 @@
 static inline int __pure __get_cpu_type(const int cpu_type)
 {
 	switch (cpu_type) {
-#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF)
+#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
+    defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)
 	case CPU_LOONGSON2EF:
 #endif
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Guenter Roeck

Commit 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES") changed Kconfig symbols as follows:
CPU_LOONGSON2 to CPU_LOONGSON2EF
CPU_LOONGSON3 to CPU_LOONGSON64 SYS_HAS_CPU_LOONGSON3 to SYS_HAS_CPU_LOONGSON64

It did not touch SYS_HAS_CPU_LOONGSON2E or SYS_HAS_CPU_LOONGSON2F. However, the patch changed a conditional from

#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)

Quoted 6 lines

to

#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF)

SYS_HAS_CPU_LOONGSON2EF does not exist, resulting in boot failures with the qemu fulong2e emulation. Revert to the original code.

Thanks Guenter for running your test suite and catching this!

Quoted 24 lines
Fixes 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES")
Cc Jiaxun Yang <[email protected]>
---
 arch/mips/include/asm/cpu-type.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/mips/include/asm/cpu-type.h +2 -2
index c46c59b0f1b4..49f0061a6051 100644
@@ -15,7 +15,8 @@
 static inline int __pure __get_cpu_type(const int cpu_type)
 {
        switch (cpu_type) {
-#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF)
+#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
+    defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)
        case CPU_LOONGSON2EF:
 #endif
 
--

2.17.1

Applied
#2 lore raw
In reply to Guenter Roeck

Hello,

Quoted 12 lines · Guenter Roeck

Commit 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES") changed Kconfig symbols as follows:
CPU_LOONGSON2 to CPU_LOONGSON2EF
CPU_LOONGSON3 to CPU_LOONGSON64 SYS_HAS_CPU_LOONGSON3 to SYS_HAS_CPU_LOONGSON64

It did not touch SYS_HAS_CPU_LOONGSON2E or SYS_HAS_CPU_LOONGSON2F. However, the patch changed a conditional from

#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)

Quoted 6 lines

to

#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF)

SYS_HAS_CPU_LOONGSON2EF does not exist, resulting in boot failures with the qemu fulong2e emulation. Revert to the original code.

Applied to mips-fixes.

Quoted 7 lines

commit 87f67cc4c7b8
https://git.kernel.org/mips/c/87f67cc4c7b8

Fixes 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES")

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]

Acked-by on v1 1/1
#3 lore raw
In reply to Guenter Roeck

于 2019年11月27日 GMT+08:00 下午11:26:12, Guenter Roeck <[email protected]> 写到:

Quoted 14 lines

Commit 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES") changed Kconfig symbols as follows:
CPU_LOONGSON2 to CPU_LOONGSON2EF
CPU_LOONGSON3 to CPU_LOONGSON64 SYS_HAS_CPU_LOONGSON3 to SYS_HAS_CPU_LOONGSON64

It did not touch SYS_HAS_CPU_LOONGSON2E or SYS_HAS_CPU_LOONGSON2F. However, the patch changed a conditional from

#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)

to

Quoted 8 lines

#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF)

SYS_HAS_CPU_LOONGSON2EF does not exist, resulting in boot failures with the qemu fulong2e emulation. Revert to the original code.

Fixes 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES")
Cc Jiaxun Yang <[email protected]>

Apologies for the mistake. I ran some tests before sending the patch but probably get this missed due to
difference between my local tree and next tree.

Thanks for catching that!

Quoted 1 line

---

Signature · 1 line
Jiaxun Yang