From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34224 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Psax8-0006vd-A7 for qemu-devel@nongnu.org; Thu, 24 Feb 2011 08:09:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Psax7-00084T-2A for qemu-devel@nongnu.org; Thu, 24 Feb 2011 08:09:54 -0500 Received: from hall.aurel32.net ([88.191.126.93]:54648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Psax6-00084M-SZ for qemu-devel@nongnu.org; Thu, 24 Feb 2011 08:09:53 -0500 Date: Thu, 24 Feb 2011 14:09:16 +0100 From: Aurelien Jarno Message-ID: <20110224130916.GD21833@volta.aurel32.net> References: <1298548457-10157-1-git-send-email-aurelien@aurel32.net> <4D66496E.70609@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <4D66496E.70609@redhat.com> Subject: [Qemu-devel] Re: [PATCH] target-sh4: move intr_at_halt out of cpu_halted() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Thu, Feb 24, 2011 at 01:05:02PM +0100, Paolo Bonzini wrote: > On 02/24/2011 12:54 PM, Aurelien Jarno wrote: > >All targets except SH4 have the same cpu_halted() routine, and it has > >only one caller. It is therefore a good candidate for inlining. > > > >The difference is the handling of the intr_at_halt, which is necessary > >to ignore SR.BL when sleeping. Move intr_at_halt handling out of it, by > >setting this variable while executing the sleep instruction, and > >clearing it when the CPU has been woken-up by an interrupt, whatever the > >state of SR.BL. > > > >Cc: Paolo Bonzini > >Signed-off-by: Aurelien Jarno > > Makes sense, thanks! > > You may want to rename intr_at_halt to env->in_sleep or something like that. > Agreed, I will send a new patch. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net