All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: SMTC: Correct saving of CP0_STATUS
@ 2011-08-29 23:20 Edgar E. Iglesias
  2011-08-29 23:45   ` David Daney
  0 siblings, 1 reply; 16+ messages in thread
From: Edgar E. Iglesias @ 2011-08-29 23:20 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle

Hi,

Commit 362e696428590f7d0a5d0971a2d04b0372a761b8
reorders a bunch of insns to improve the flow of the pipeline but
for MT_SMTC kernels, AFAICT, the saving of CP0_STATUS seems wrong.

Am I missing something?

If not here is a patch, tested with qemu.

Cheers

commit 1a72dd0ed0a238007d3d67c1e3a634d477527ce2
Author: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Date:   Tue Aug 30 01:07:15 2011 +0200

    MIPS: SMTC: Correct saving of CP0_STATUS
    
    Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>

diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h
index b4ba244..1b8d9a0 100644
--- a/arch/mips/include/asm/stackframe.h
+++ b/arch/mips/include/asm/stackframe.h
@@ -189,6 +189,9 @@
 		LONG_S	$0, PT_R0(sp)
 		mfc0	v1, CP0_STATUS
 		LONG_S	$2, PT_R2(sp)
+		LONG_S	$4, PT_R4(sp)
+		LONG_S	$5, PT_R5(sp)
+		LONG_S	v1, PT_STATUS(sp)
 #ifdef CONFIG_MIPS_MT_SMTC
 		/*
 		 * Ideally, these instructions would be shuffled in
@@ -199,9 +202,6 @@
 		.set	mips0
 		LONG_S	v1, PT_TCSTATUS(sp)
 #endif /* CONFIG_MIPS_MT_SMTC */
-		LONG_S	$4, PT_R4(sp)
-		LONG_S	$5, PT_R5(sp)
-		LONG_S	v1, PT_STATUS(sp)
 		mfc0	v1, CP0_CAUSE
 		LONG_S	$6, PT_R6(sp)
 		LONG_S	$7, PT_R7(sp)

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-09-17  2:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-29 23:20 [PATCH] MIPS: SMTC: Correct saving of CP0_STATUS Edgar E. Iglesias
2011-08-29 23:45 ` David Daney
2011-08-29 23:45   ` David Daney
2011-08-29 23:53   ` David Daney
2011-08-29 23:55   ` Kevin D. Kissell
2011-08-30  0:14     ` David Daney
2011-08-30  0:35       ` Kevin D. Kissell
2011-08-30 11:16         ` Edgar E. Iglesias
2011-08-30 16:54           ` Kevin D. Kissell
2011-09-14 15:12             ` Ralf Baechle
2011-09-14 18:20               ` Kevin D. Kissell
2011-08-30  5:57   ` Edgar E. Iglesias
2011-09-15 16:00   ` Ralf Baechle
2011-09-17  1:23     ` Edgar E. Iglesias
2011-09-17  2:00       ` Ralf Baechle
2011-09-17  2:08         ` Edgar E. Iglesias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.