From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [patch 2.6.11-rc3-bk4] Correctly dereference ia64_mca_data
Date: Tue, 08 Feb 2005 08:25:14 +0000 [thread overview]
Message-ID: <23464.1107851114@kao2.melbourne.sgi.com> (raw)
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
next reply other threads:[~2005-02-08 8:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-08 8:25 Keith Owens [this message]
2005-02-08 18:11 ` [patch 2.6.11-rc3-bk4] Correctly dereference ia64_mca_data 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23464.1107851114@kao2.melbourne.sgi.com \
--to=kaos@sgi.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox