From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1Q0K-0007Rv-Ic for qemu-devel@nongnu.org; Wed, 28 May 2008 14:04:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K1Q0I-0007Rf-UK for qemu-devel@nongnu.org; Wed, 28 May 2008 14:04:04 -0400 Received: from [199.232.76.173] (port=46628 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1Q0I-0007Rc-QT for qemu-devel@nongnu.org; Wed, 28 May 2008 14:04:02 -0400 Received: from wf-out-1314.google.com ([209.85.200.175]:32105) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K1Q0I-00016N-7s for qemu-devel@nongnu.org; Wed, 28 May 2008 14:04:02 -0400 Received: by wf-out-1314.google.com with SMTP id 27so2641025wfd.4 for ; Wed, 28 May 2008 11:04:00 -0700 (PDT) Message-ID: Date: Wed, 28 May 2008 21:03:59 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH 5/6] simply cpu_exec further In-Reply-To: <1211983296-27395-6-git-send-email-gcosta@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1211983296-27395-1-git-send-email-gcosta@redhat.com> <1211983296-27395-2-git-send-email-gcosta@redhat.com> <1211983296-27395-3-git-send-email-gcosta@redhat.com> <1211983296-27395-4-git-send-email-gcosta@redhat.com> <1211983296-27395-5-git-send-email-gcosta@redhat.com> <1211983296-27395-6-git-send-email-gcosta@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org On 5/28/08, Glauber Costa 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);