From owner-freebsd-mips@FreeBSD.ORG Tue Oct 4 02:42:19 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E14731065672; Tue, 4 Oct 2011 02:42:19 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 718778FC15; Tue, 4 Oct 2011 02:42:19 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p942ddsi066642 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 3 Oct 2011 20:39:39 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Mon, 3 Oct 2011 20:39:42 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <79147576-6E4F-46C9-8887-0847567A46A7@bsdimp.com> References: <20111002110331.GF1511@deviant.kiev.zoral.com.ua> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 03 Oct 2011 20:39:41 -0600 (MDT) Cc: "Jayachandran C." , Kostik Belousov , Alexander Motin , "freebsd-mips@freebsd.org" Subject: Re: svn commit: r225892 - head/sys/mips/mips X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2011 02:42:20 -0000 On Oct 3, 2011, at 7:38 PM, Adrian Chadd wrote: > On 4 October 2011 07:09, Andrew Duane wrote: >> The COP0_SYNC's should be there (should there also be one after the = MTC0 in MipsKernIntr?). The ISA says a hazard is needed, so that should = be reflected. I assume different platforms define COP0_SYNC for = themselves as needed? >=20 > Is one needed after the mtc0 after StartWaitSkip? I don't think it matters. The COP0_SYNC is needed when you want to = flush the instruction pipeline so that changes to COP0 don't affect them = 'randomly'. However, in this case. Either we're setting a bit that's = already set, which won't change anything, or we're setting a bit that's = clear, which will just delay the delivery of the interrupt a few cycles. = The race where it happens before the wait instruction is handled by the = rest of the patch. Warner