public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* why ms->pmsa_xip is used?
@ 2009-10-20 19:25 Takao Indoh
  2009-10-20 23:53 ` Keith Owens
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Takao Indoh @ 2009-10-20 19:25 UTC (permalink / raw)
  To: linux-ia64

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

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

end of thread, other threads:[~2009-11-05 23:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 19:25 why ms->pmsa_xip is used? Takao Indoh
2009-10-20 23:53 ` 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

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