From owner-freebsd-mips@FreeBSD.ORG Fri Jul 16 04:37:16 2010 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E3661065670 for ; Fri, 16 Jul 2010 04:37:16 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id C85FD8FC15 for ; Fri, 16 Jul 2010 04:37:15 +0000 (UTC) Received: by vws19 with SMTP id 19so2563967vws.13 for ; Thu, 15 Jul 2010 21:37:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=83tKAvSiOJsk8Q5sp8jvQ1EEw2ys5oDAeCQ88nnBMxs=; b=Yfvf1b4qXDyWTWSguNpwrhL1W9lzVdHzNk2dF7NPPcrHnjPxXjsyKsgRqFyE9ECiII VUe1LXf1PuW6Y3/5zTQ9cRaLboNE8xqLALBUDx859ncM2u0VuC41QK7LBq383fw+JtJE 3eu9JEjS77pAVkpSLFGin/qWxnUmguoi8cYJI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=XXuXZ71nceLgzgKj+25JkJENG2HpVi+Ekkp8umhxcjcJdzIT7362grc6jqCRpfhOy5 yGrWtrLh/wqTEEAbXMcZVsSfFmk4m0zaGVA8z6GcvVf6O+TV0IUGa1+KvouAqIssIl5s 1jbD28Xipyr5+B698ENMXzT5Eq0pXCiWZNyIw= MIME-Version: 1.0 Received: by 10.220.124.153 with SMTP id u25mr169366vcr.206.1279255033757; Thu, 15 Jul 2010 21:37:13 -0700 (PDT) Received: by 10.220.199.200 with HTTP; Thu, 15 Jul 2010 21:37:13 -0700 (PDT) In-Reply-To: <20100715.161926.175946041864758761.imp@bsdimp.com> References: <20100715.161926.175946041864758761.imp@bsdimp.com> Date: Fri, 16 Jul 2010 10:07:13 +0530 Message-ID: From: "Jayachandran C." To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: mips@freebsd.org Subject: Re: Review 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: Fri, 16 Jul 2010 04:37:16 -0000 On Fri, Jul 16, 2010 at 3:49 AM, M. Warner Losh wrote: > OK. =A0Please find enclosed a minor cleanup diff for assembler files. > It moves ITLBNOPFIX and HAZARD_DELAY into a common header, as well as > replacing MIPS_CPU_NOP_DELAY with HAZARD_DELAY. > > The only real change is increasing the number of nops in a few places > from 4 to 5. > > This is in preparation for making these (a) much shorter and (b) > optimizing for specific CPUs... =A0mips32/mips64 define ssnop to deal > with the super-scaler effects (so ITLBNOPFIX can be shorter), and > mips32r2 and mips64r2 have eh, which can help with HAZARD_DELAY. > > The latter will need some careful study of the docs to make sure that > the proper number of instructions are executed (which is why I'm not > doing it yet :). =A0The former is just shuffling deck chairs, so should b= e > invisible to people. > > Comments? There is a mips_barrier() in cpufunc.h too which does similar things - and is confusingly named - we can to get rid of that too in a similar way. Another cleanup I wanted to do for sometime is to get the status register settings into a header files and avoid the ifdef everywhere. Maybe cpuregs.h (or cpufunc.h) can add cpu_xlr.h/cpu_octeon.h etc which will have hazard/status/extra registers for the specific cpu. Thanks, JC.