From owner-freebsd-mips@FreeBSD.ORG Tue Oct 4 15:24:11 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 78729106566B; Tue, 4 Oct 2011 15:24:11 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og120.obsmtp.com (exprod7og120.obsmtp.com [64.18.2.18]) by mx1.freebsd.org (Postfix) with ESMTP id 86F798FC26; Tue, 4 Oct 2011 15:24:07 +0000 (UTC) Received: from P-EMHUB01-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob120.postini.com ([64.18.6.12]) with SMTP; Tue, 04 Oct 2011 08:24:11 PDT Received: from p-emfe01-wf.jnpr.net (172.28.145.24) by P-EMHUB01-HQ.jnpr.net (172.24.192.35) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 4 Oct 2011 08:22:15 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe01-wf.jnpr.net ([fe80::d0d1:653d:5b91:a123%11]) with mapi; Tue, 4 Oct 2011 11:22:14 -0400 From: Andrew Duane To: Warner Losh , Adrian Chadd Date: Tue, 4 Oct 2011 11:22:13 -0400 Thread-Topic: svn commit: r225892 - head/sys/mips/mips Thread-Index: AcyCP0JNZHSCsecwTdWmNMj1qfWH+gAaiKLY Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 15:24:11 -0000 Let me pull my MIPS manual when I get in. It exactly specifies the hazards = for each bit. Warner Losh wrote: 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 refl= ected. I assume different platforms define COP0_SYNC for themselves as need= ed? > > Is one needed after the mtc0 after StartWaitSkip? I don't think it matters. The COP0_SYNC is needed when you want to flush t= he 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 wil= l 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