From: Takao Indoh <indou.takao@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: why ms->pmsa_xip is used?
Date: Tue, 20 Oct 2009 19:25:23 +0000 [thread overview]
Message-ID: <F6CA51BB11EE80indou.takao@jp.fujitsu.com> (raw)
Hi,
I have a question about how to restore cr_{iip,ipsr,ifs} register
in the INIT handler.
This is a part of ia64_mca_modify_original_stack().
/* If ipsr.ic then use pmsa_{iip,ipsr,ifs}, else use
* pmsa_{xip,xpsr,xfs}
*/
if (ia64_psr(regs)->ic) {
old_regs->cr_iip = ms->pmsa_iip;
old_regs->cr_ipsr = ms->pmsa_ipsr;
old_regs->cr_ifs = ms->pmsa_ifs;
} else {
old_regs->cr_iip = ms->pmsa_xip;
old_regs->cr_ipsr = ms->pmsa_xpsr;
old_regs->cr_ifs = ms->pmsa_xfs;
}
Does anybody know why ms->pmsa_{xip,xpsr,xfs} are used instead of
ms->pmsa_{iip,ipsr,ifs} when PSR.ic is 0?
What we want to do here is to modify the original stack so it looks as
if it's interrupted by INIT, right? In my understainding, if PSR.ic is 0,
pmsa_iip has the value of IP register and pmsa_xip has the value of IIP
register. In other words, the value of pmsa_iip is where INIT handler
returns to, and the value of pmsa_xip is where interruption handler (not
INIT handler) returns to. So, to create pt_regs which has the state at
the time of interrupt by INIT, ms->pmsa_iip should be used when PSR.ic
is 0, I think. My understanding is correct?
Thanks,
Takao Indoh
next reply other threads:[~2009-10-20 19:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 19:25 Takao Indoh [this message]
2009-10-20 23:53 ` why ms->pmsa_xip is used? Keith Owens
2009-10-26 22:15 ` Takao Indoh
2009-10-26 23:36 ` Keith Owens
2009-10-27 22:21 ` Takao Indoh
2009-11-05 22:53 ` Takao Indoh
2009-11-05 23:10 ` Keith Owens
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=F6CA51BB11EE80indou.takao@jp.fujitsu.com \
--to=indou.takao@jp.fujitsu.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