public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2.6.11-rc3-bk4] Correctly dereference ia64_mca_data
@ 2005-02-08  8:25 Keith Owens
  2005-02-08 18:11 ` Luck, Tony
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Keith Owens @ 2005-02-08  8:25 UTC (permalink / raw)
  To: linux-ia64

arch/ia64/kernel/mca_asm.S is treating per_cpu__ia64_mca_data as the
start of the mca data, instead of as a pointer to the mca data.  It
ends up overwriting the rest of the per cpu area with the MCA stack and
bspstore.  Since we dereference ia64_mca_data several times, make it a
macro.

Signed-off-by: Keith Owens <kaos@sgi.com>

Index: linux/arch/ia64/kernel/mca_asm.S
=================================--- linux.orig/arch/ia64/kernel/mca_asm.S	2005-02-08 18:02:43.000000000 +1100
+++ linux/arch/ia64/kernel/mca_asm.S	2005-02-08 19:08:25.000000000 +1100
@@ -101,6 +101,11 @@
 	ld8	tmp=[sal_to_os_handoff];;				\
 	st8     [os_to_sal_handoff]=tmp;;
 
+#define GET_IA64_MCA_DATA(reg)						\
+	GET_THIS_PADDR(reg, ia64_mca_data)				\
+	;;								\
+	ld8 reg=[reg]
+
 	.global ia64_os_mca_dispatch
 	.global ia64_os_mca_dispatch_end
 	.global ia64_sal_to_os_handoff_state
@@ -309,14 +314,14 @@ err:
 done_tlb_purge_and_reload:
 
 	// Setup new stack frame for OS_MCA handling
-	GET_THIS_PADDR(r2, ia64_mca_data)
+	GET_IA64_MCA_DATA(r2)
 	;;
 	add r3 = IA64_MCA_CPU_STACKFRAME_OFFSET, r2
 	add r2 = IA64_MCA_CPU_RBSTORE_OFFSET, r2
 	;;
 	rse_switch_context(r6,r3,r2);;	// RSC management in this new context
 
-	GET_THIS_PADDR(r2, ia64_mca_data)
+	GET_IA64_MCA_DATA(r2)
 	;;
 	add r2 = IA64_MCA_CPU_STACK_OFFSET+IA64_MCA_STACK_SIZE-16, r2
 	;;
@@ -336,7 +341,7 @@ ia64_os_mca_virtual_begin:
 ia64_os_mca_virtual_end:
 
 	// restore the original stack frame here
-	GET_THIS_PADDR(r2, ia64_mca_data)
+	GET_IA64_MCA_DATA(r2)
 	;;
 	add r2 = IA64_MCA_CPU_STACKFRAME_OFFSET, r2
 	;;
@@ -380,7 +385,7 @@ ia64_os_mca_dispatch_end:
 ia64_os_mca_proc_state_dump:
 // Save bank 1 GRs 16-31 which will be used by c-language code when we switch
 //  to virtual addressing mode.
-	GET_THIS_PADDR(r2, ia64_mca_data)
+	GET_IA64_MCA_DATA(r2)
 	;;
 	add r2 = IA64_MCA_CPU_PROC_STATE_DUMP_OFFSET, r2
 	;;
@@ -613,7 +618,7 @@ end_os_mca_dump:
 ia64_os_mca_proc_state_restore:
 
 // Restore bank1 GR16-31
-	GET_THIS_PADDR(r2, ia64_mca_data)
+	GET_IA64_MCA_DATA(r2)
 	;;
 	add r2 = IA64_MCA_CPU_PROC_STATE_DUMP_OFFSET, r2
 


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

end of thread, other threads:[~2005-03-04 19:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-08  8:25 [patch 2.6.11-rc3-bk4] Correctly dereference ia64_mca_data Keith Owens
2005-02-08 18:11 ` Luck, Tony
2005-02-08 18:14 ` David Mosberger
2005-02-08 18:42 ` Luck, Tony
2005-02-08 19:35 ` Robin Holt
2005-02-08 23:45 ` Luck, Tony
2005-02-09  0:59 ` Grant Grundler
2005-02-10  0:18 ` Luck, Tony
2005-02-10  0:44 ` Luck, Tony
2005-02-10  0:54 ` David Mosberger
2005-02-10  1:05 ` Luck, Tony
2005-02-10  1:13 ` David Mosberger
2005-02-10 23:59 ` Russ Anderson
2005-02-11  6:57 ` Luck, Tony
2005-02-11  7:33 ` Keith Owens
2005-02-11 14:45 ` Luck, Tony
2005-02-11 14:53 ` Russ Anderson
2005-03-01 23:32 ` Luck, Tony
2005-03-04 18:44 ` Russ Anderson
2005-03-04 18:55 ` Russ Anderson
2005-03-04 19:28 ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox