From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K11sX-0001EY-Lw for qemu-devel@nongnu.org; Tue, 27 May 2008 12:18:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K11sX-0001E9-4O for qemu-devel@nongnu.org; Tue, 27 May 2008 12:18:25 -0400 Received: from [199.232.76.173] (port=34591 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K11sX-0001DT-0D for qemu-devel@nongnu.org; Tue, 27 May 2008 12:18:25 -0400 Received: from yw-out-1718.google.com ([74.125.46.152]:50832) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K11sU-0001VC-Rk for qemu-devel@nongnu.org; Tue, 27 May 2008 12:18:23 -0400 Received: by yw-out-1718.google.com with SMTP id 6so1392317ywa.82 for ; Tue, 27 May 2008 09:18:15 -0700 (PDT) Message-ID: Date: Tue, 27 May 2008 19:18:13 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH 4/6] simply cpu_exec further In-Reply-To: <1211901505-30519-5-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: <1211901505-30519-1-git-send-email-gcosta@redhat.com> <1211901505-30519-2-git-send-email-gcosta@redhat.com> <1211901505-30519-3-git-send-email-gcosta@redhat.com> <1211901505-30519-4-git-send-email-gcosta@redhat.com> <1211901505-30519-5-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/27/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. > +void arch_handle_interrupt_request(CPUState *env); I'd use cpu_handle_interrupt_request(). > --- a/target-sparc/op_helper.c > +++ b/target-sparc/op_helper.c > @@ -2689,8 +2689,9 @@ static const char * const excp_names[0x50] = { > }; > #endif > > -void do_interrupt(int intno) > +void do_interrupt(CPUState *cpu) env1 would be better. > { > + int intno = cpu->exception_index; > #ifdef DEBUG_PCALL > if (loglevel & CPU_LOG_INT) { > static int count; > @@ -2803,9 +2804,10 @@ static const char * const excp_names[0x80] = { > }; > #endif > > -void do_interrupt(int intno) > +void do_interrupt(CPUState *env) Same here. Otherwise you shadow the AREG0 env. > +void arch_handle_interrupt_request(CPUState *env) And here. I think this function and do_interrupt should belong to helper.c, they are not called from ops. I'll do some rearranging. After that my env comment does not matter.