qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Blue Swirl" <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 5/6] simply cpu_exec further
Date: Wed, 28 May 2008 21:03:59 +0300	[thread overview]
Message-ID: <f43fc5580805281103j5c750cdcq8f6c3f36f3874e0@mail.gmail.com> (raw)
In-Reply-To: <1211983296-27395-6-git-send-email-gcosta@redhat.com>

On 5/28/08, Glauber Costa <gcosta@redhat.com> wrote:
> We change interrupt functions so they have the same
>  signature, getting only an env parameter. When necessary,
>  some more attributed were added to the relevant CPUState to
>  make it possible.

>  -#elif defined(TARGET_SPARC)
>  -                    if ((interrupt_request & CPU_INTERRUPT_HARD) &&
>  -                       (env->psret != 0)) {
>  -                       int pil = env->interrupt_index & 15;
>  -                       int type = env->interrupt_index & 0xf0;
>  -
>  -                       if (((type == TT_EXTINT) &&
>  -                            (pil == 15 || pil > env->psrpil)) ||
>  -                           type != TT_EXTINT) {
>  -                           env->interrupt_request &= ~CPU_INTERRUPT_HARD;
>  -                            env->exception_index = env->interrupt_index;

The above line, which I added in the previous commit is missing below.

>  -                            do_interrupt(env);

>  +/* implemented by the targets */
>  +void cpu_handle_interrupt_request(CPUState *env);
>  +/* implemented by cpu-exec.c */
>  +void handle_interrupt_common(CPUState *env);
>  +void reset_tb(void);

Maybe also do_interrupt(CPUState *env) prototype could be better
defined here to save space and to discourage making different
versions.

>  diff --git a/target-sparc/helper.c b/target-sparc/helper.c
>  index 78a3fe5..68cf78c 100644
>  --- a/target-sparc/helper.c
>  +++ b/target-sparc/helper.c
>  @@ -866,6 +866,29 @@ void do_interrupt(CPUState *env)
>   }
>   #endif
>
>  +void cpu_handle_interrupt_request(CPUState *env)
>  +{
>  +    handle_interrupt_common(env);
>  +    if ((env->interrupt_request & CPU_INTERRUPT_HARD) && (env->psret != 0)) {
>  +        int pil = env->interrupt_index & 15;
>  +        int type = env->interrupt_index & 0xf0;
>  +
>  +        if (((type == TT_EXTINT) &&
>  +            (pil == 15 || pil > env->psrpil)) || type != TT_EXTINT) {
>  +            env->interrupt_request &= ~CPU_INTERRUPT_HARD;

One line missing here.

>  +            do_interrupt(env);

  parent reply	other threads:[~2008-05-28 18:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 14:01 [Qemu-devel] [PATCH 0/6] Simplify cpu_exec - spin 3 Glauber Costa
2008-05-28 14:01 ` [Qemu-devel] [PATCH 1/6] remove REGWPTR Glauber Costa
2008-05-28 14:01   ` [Qemu-devel] [PATCH 2/6] simplify cpu_exec Glauber Costa
2008-05-28 14:01     ` [Qemu-devel] [PATCH 3/6] Push common interrupt variables to cpu-defs.h Glauber Costa
2008-05-28 14:01       ` [Qemu-devel] [PATCH 4/6] use halted attribute for i386 too Glauber Costa
2008-05-28 14:01         ` [Qemu-devel] [PATCH 5/6] simply cpu_exec further Glauber Costa
2008-05-28 14:01           ` [Qemu-devel] [PATCH 6/6] cpu-exec-dump Glauber Costa
2008-05-28 18:03           ` Blue Swirl [this message]
2008-05-28 14:25 ` [Qemu-devel] [PATCH 0/6] Simplify cpu_exec - spin 3 Paul Brook
2008-05-28 14:44   ` Glauber Costa

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=f43fc5580805281103j5c750cdcq8f6c3f36f3874e0@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=kvm@vger.kernel.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).