Skip to contentSkip to conversation

mips: make mips_cps_{core_init,boot_vpes} work on mips32r2

PATCH In review Nikolay Martynov 2 participants 2 messages Dec 8, 2015 – Dec 9, 2015 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: make mips_cps_{core_init,boot_vpes} work on mips32r2

mips_cps_{core_init,boot_vpes} had 'mips64r2' hardcoded which prevented them from being run on mips32. Fix that by choosing cpu type based on CONFIG_64BIT.

Tested on mt7621.

---
 arch/mips/kernel/cps-vec.S | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/mips/kernel/cps-vec.S +8 -0
index 8fd5a27..1254a51 100644
@@ -257,7 +257,11 @@ LEAF(mips_cps_core_init)
 	has_mt	t0, 3f
 
 	.set	push
+#ifdef CONFIG_64BIT
 	.set	mips64r2
+#else
+	.set	mips32r2
+#endif
 	.set	mt
 
 	/* Only allow 1 TC per VPE to execute... */
@@ -376,7 +380,11 @@ LEAF(mips_cps_boot_vpes)
 	 nop
 
 	.set	push
+#ifdef CONFIG_64BIT
 	.set	mips64r2
+#else
+	.set	mips32r2
+#endif
 	.set	mt
 
 1:	/* Enter VPE configuration state */
Signature · 1 line
2.6.3
#1 lore raw
Quoted 29 lines · Nikolay Martynov

mips_cps_{core_init,boot_vpes} had 'mips64r2' hardcoded which prevented them from being run on mips32. Fix that by choosing cpu type based on CONFIG_64BIT.

Tested on mt7621.

---
  arch/mips/kernel/cps-vec.S | 8 ++++++++
  1 file changed, 8 insertions(+)
arch/mips/kernel/cps-vec.S +4 -0
index 8fd5a27..1254a51 100644
@@ -257,7 +257,11 @@ LEAF(mips_cps_core_init)
  	has_mt	t0, 3f
 
  	.set	push
+#ifdef CONFIG_64BIT
  	.set	mips64r2
+#else
+	.set	mips32r2
+#endif
  	.set	mt
 
  	/* Only allow 1 TC per VPE to execute... */
@@ -376,7 +380,11 @@ LEAF(mips_cps_boot_vpes)
  	 nop

arch/mips/kernel/cps-vec.S LEAF(mips_cps_boot_vpes) · line 390

Quoted 10 lines
arch/mips/kernel/cps-vec.S +4 -0
 
  	.set	push
+#ifdef CONFIG_64BIT
  	.set	mips64r2
+#else
+	.set	mips32r2
+#endif
  	.set	mt
 
  1:	/* Enter VPE configuration state */

This should have already been fixed in this

    http://patchwork.linux-mips.org/patch/10869/

Thanks,
Qais