From: John Marvin <jsm@udlkern.fc.hp.com>
To: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] 720 - some progress
Date: Sun, 30 Sep 2001 01:12:45 -0600 (MDT) [thread overview]
Message-ID: <200109300712.BAA15478@udlkern.fc.hp.com> (raw)
> It looks (reads) as if it possible to return to the faulting instruction
> (MFCTL in this case) without executing it. If so, then adjusting the
> instruction (and space) queues within the fault handler can be avoided;
> also avoiding problems with finding the correct "following instruction"
> address.
Using the nullify method you talk about does work, but the normal
convention is to advance the pc queue (there are some performance
advantages, particularly in the case where the instruction we are
emulating is in the delay slot of a branch). The problem you describe
finding the following instruction doesn't exist. You are correct about
the space queue though, but only in the case for a delay slot in the
branch to the gateway page. The correct method of advancing the queue is
the one that has been proposed in the various patches, i.e.:
regs->iaoq[0] = regs->iaoq[1];
regs->iaoq[1] += 4;
To be perfectly correct, this should be added:
regs->iasq[0] = regs->iasq[1];
But, again, that last is only necessary if someone actually puts a mfctl
in the delay slot of the branch to the gateway page (a kernel call) and
since kernel calls are already provided, we know that no such thing
actually happens, nor is it likely to happen unless someone handcodes
their own kernel call. I would put the line in though.
Here is why there is not a problem advancing the queue as above:
the only way that "regs->iaoq[1] += 4" would do the wrong thing would
be if we were emulating a branch instruction. Since we know we are
emulating a mfctl instruction, this is not the case. Note that if
someone needs to emulate a branch instruction, computing the new
value of iaoq[1] would be part of that emulation.
John Marvin
jsm@fc.hp.com
next reply other threads:[~2001-09-30 7:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-30 7:12 John Marvin [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-10-01 16:06 [parisc-linux] 720 - some progress Michael S. Zick
[not found] <200109280925.FAA18777@mail.lokmail.net>
2001-09-28 16:24 ` Albert Strasheim
2001-09-28 18:48 ` Jochen Friedrich
2001-09-29 17:48 ` Carlos O'Donell Jr.
2001-09-27 16:32 Jurij Smakov
2001-09-27 19:18 ` Albert Strasheim
2001-09-27 14:42 Jurij Smakov
2001-09-28 8:49 ` Jochen Friedrich
2001-09-28 9:19 ` Matthew Wilcox
2001-09-28 8:54 ` Matthew Wilcox
2001-09-29 6:00 ` Albert Strasheim
2001-09-29 8:30 ` Albert Strasheim
2001-09-29 10:01 ` Albert Strasheim
2001-09-29 11:17 ` Jochen Friedrich
2001-09-29 11:45 ` Albert Strasheim
2001-09-29 13:23 ` Jochen Friedrich
2001-09-29 18:36 ` Michael S.Zick
2001-09-29 22:19 ` Michael S.Zick
2001-09-27 12:23 Jurij Smakov
2001-09-27 13:04 ` Albert Strasheim
2001-09-27 13:45 ` Matthew Wilcox
2001-09-27 10:03 Jurij Smakov
2001-09-27 11:15 ` Jochen Friedrich
2001-09-27 9:09 Jurij Smakov
2001-09-27 11:11 ` Jochen Friedrich
2001-09-26 22:26 Jochen Friedrich
2001-09-27 0:07 ` Albert Strasheim
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=200109300712.BAA15478@udlkern.fc.hp.com \
--to=jsm@udlkern.fc.hp.com \
--cc=parisc-linux@lists.parisc-linux.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