From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58245 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsZwf-0004XG-7N for qemu-devel@nongnu.org; Thu, 24 Feb 2011 07:05:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsZwe-0003lg-7X for qemu-devel@nongnu.org; Thu, 24 Feb 2011 07:05:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsZwd-0003lB-Uw for qemu-devel@nongnu.org; Thu, 24 Feb 2011 07:05:20 -0500 Message-ID: <4D66496E.70609@redhat.com> Date: Thu, 24 Feb 2011 13:05:02 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1298548457-10157-1-git-send-email-aurelien@aurel32.net> In-Reply-To: <1298548457-10157-1-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Aurelien Jarno Cc: qemu-devel@nongnu.org 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. Paolo