From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIecY-00061S-MR for qemu-devel@nongnu.org; Fri, 24 Jul 2015 11:10:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIecU-0003es-Hm for qemu-devel@nongnu.org; Fri, 24 Jul 2015 11:10:46 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:17169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIecT-0003e1-K3 for qemu-devel@nongnu.org; Fri, 24 Jul 2015 11:10:42 -0400 Message-ID: <55B25567.3030802@imgtec.com> Date: Fri, 24 Jul 2015 16:10:31 +0100 From: Leon Alrae MIME-Version: 1.0 References: <1436526602-54425-1-git-send-email-yongbok.kim@imgtec.com> In-Reply-To: <1436526602-54425-1-git-send-email-yongbok.kim@imgtec.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-mips: fix offset calculation for Interrupts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yongbok Kim , qemu-devel@nongnu.org Cc: serge.vakulenko@gmail.com, aurelien@aurel32.net On 10/07/2015 12:10, Yongbok Kim wrote: > Correct computation of vector offsets for EXCP_EXT_INTERRUPT. > For instance, if Cause.IV is 0 the vector offset should be 0x180. > > Simplify the finding vector number logic for the Vectored Interrupts. I think this message would be much better if it was more explicit about the bugs you fixed in this patch as it's not that clear at first glance from the diff (especially that you've rewritten the whole block). > > Signed-off-by: Yongbok Kim > --- > target-mips/helper.c | 47 ++++++++++++++++++++++------------------------- > target-mips/op_helper.c | 2 -- > 2 files changed, 22 insertions(+), 27 deletions(-) > + if (env->CP0_Cause & (1 << CP0Ca_IV)) { > + uint32_t spacing = (env->CP0_IntCtl >> CP0IntCtl_VS) &0x1f; whitespace before 0x1f > + uint32_t pending = (env->CP0_Cause & CP0Ca_IP_mask) > + >> CP0Ca_IP; no need to break the line > + pending &= (env->CP0_Status >> CP0St_IM) &0xff; whitespace before 0xff Anyway, this implementation looks correct to me. Since it fixes the offset when Cause.IV=0 on CPUs supporting Vectored Interrupts which looks like a major issue I think we should apply it to 2.4. I'll include it in the -rc3 pull request. Thanks, Leon