qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: gerg@uclinux.org, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH v2 3/3] m68k: fix usp processing on interrupt entry and exception exit
Date: Fri, 19 Jun 2015 21:35:21 +0200	[thread overview]
Message-ID: <55846EF9.20302@vivier.eu> (raw)
In-Reply-To: <1434721406-25288-4-git-send-email-gerg@uclinux.org>



Le 19/06/2015 15:43, gerg@uclinux.org a écrit :
> From: Greg Ungerer <gerg@uclinux.org>
> 
> The action to potentially switch sp register is not occurring at the correct
> point in the interrupt entry or exception exit sequences.
> 
> For the interrupt entry case the sp on entry is used to create the stack
> exception frame - but this may well be the user stack pointer, since we
> haven't done the switch yet. Re-order the flow to switch the sp regs then
> use the current sp to create the exception frame.
> 
> For the return from exception case the code is unwinding the sp after
> switching sp registers. But it should always unwind the supervisor sp
> first, then carry out any required sp switch.
> 
> Note that these problems don't effect operation unless the user sp bit is
> set in the CACR register. Only a single sp is used in the default power up
> state. Previously Linux only used this single sp mode. But modern versions
> of Linux use the user sp mode now, so we need correct behavior for Linux
> to work.
> 
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> ---
>  target-m68k/op_helper.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

Reviewed-by: Laurent Vivier <laurent@vivier.eu>

  reply	other threads:[~2015-06-19 19:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19 13:43 [Qemu-devel] [PATCH v2 0/3] m68k: fix ColdFire support gerg
2015-06-19 13:43 ` [Qemu-devel] [PATCH v2 1/3] m68k: implement more ColdFire 5208 interrupt controller functionality gerg
2015-06-19 13:43 ` [Qemu-devel] [PATCH v2 2/3] m68k: implement move to/from usp register instruction gerg
2015-06-19 19:28   ` Laurent Vivier
2015-06-19 13:43 ` [Qemu-devel] [PATCH v2 3/3] m68k: fix usp processing on interrupt entry and exception exit gerg
2015-06-19 19:35   ` Laurent Vivier [this message]
2015-06-21 23:11     ` Greg Ungerer
2015-06-19 19:39 ` [Qemu-devel] [PATCH v2 0/3] m68k: fix ColdFire support Laurent Vivier
2015-06-20  4:55   ` Greg Ungerer
2015-06-20 17:03     ` Laurent Vivier
2015-06-22 16:49     ` Andreas Färber
2015-06-23  0:37       ` Greg Ungerer
2015-06-20 17:24 ` Laurent Vivier
2015-06-22 15:34 ` Peter Maydell

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=55846EF9.20302@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=gerg@uclinux.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).