All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huacai Chen <chenhc@lemote.com>
To: "Maciej W. Rozycki" <macro@wdc.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	"open list:MIPS" <linux-mips@vger.kernel.org>,
	Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	WANG Xuerui <git@xen0n.name>,
	Serge Semin <Sergey.Semin@baikalelectronics.ru>,
	"Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [PATCH V2] MIPS: Tidy up CP0.Config6 bits definition
Date: Mon, 1 Jun 2020 10:35:10 +0800	[thread overview]
Message-ID: <CAAhV-H6Wm7wH_3J4xMf-5MTT++4jPTVA7HLX5m-4Hy8vQzAONQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.21.2006010253080.3271@redsun52.ssa.fujisawa.hgst.com>

OK, let me fix it.

Huacai

On Mon, Jun 1, 2020 at 10:13 AM Maciej W. Rozycki <macro@wdc.com> wrote:
>
> On Sat, 23 May 2020, Huacai Chen wrote:
>
> > CP0.Config6 is a Vendor-defined register whose bits definitions are
> > different from one to another. Recently, Xuerui's Loongson-3 patch and
> > Serge's P5600 patch make the definitions inconsistency and unclear.
> >
> > To make life easy, this patch tidy the definition up:
> > 1, Add a _MTI_ infix for proAptiv/P5600 feature bits;
> > 2, Add a _LOONGSON_ infix for Loongson-3 feature bits;
> > 3, Add bit6/bit7 definition for Loongson-3 which will be used later.
>
>  What a mess!  We use *prefixes* for vendor- or processor-specific names,
> e.g.:
>
> #define R3K_ENTRYLO_G           (_ULCAST_(1) << 8)
> #define R4K_CONF_SW             (_ULCAST_(1) << 20)
> #define MTI_CONF7_PTC           (_ULCAST_(1) << 19)
>
> etc. and MIPS_ denotes a MIPS architectural (as in R1, R2, etc., i.e. not
> legacy) definition, e.g.:
>
> #define MIPS_CONF_VI            (_ULCAST_(1) <<  3)
>
>  So to be consistent these would have to be:
>
> > +/* Config6 feature bits for proAptiv/P5600 */
> > +
> >  /* Jump register cache prediction disable */
> > -#define MIPS_CONF6_JRCD              (_ULCAST_(1) << 0)
> > +#define MIPS_CONF6_MTI_JRCD          (_ULCAST_(1) << 0)
>
> #define MTI_CONF6_JRCD          (_ULCAST_(1) << 0)
>
> etc.
>
> > +/* Config6 feature bits for Loongson-3 */
> > +
> > +/* Loongson-3 internal timer bit */
> > +#define MIPS_CONF6_LOONGSON_INTIMER  (_ULCAST_(1) << 6)
>
> #define LOONGSON_CONF6_INTIMER  (_ULCAST_(1) << 6)
>
> etc.
>
>   Maciej

      reply	other threads:[~2020-06-01  2:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23  7:51 [PATCH V2] MIPS: Tidy up CP0.Config6 bits definition Huacai Chen
2020-05-24  7:38 ` Thomas Bogendoerfer
2020-06-01  2:09 ` Maciej W. Rozycki
2020-06-01  2:35   ` Huacai Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAhV-H6Wm7wH_3J4xMf-5MTT++4jPTVA7HLX5m-4Hy8vQzAONQ@mail.gmail.com \
    --to=chenhc@lemote.com \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=git@xen0n.name \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=macro@wdc.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=wuzhangjin@gmail.com \
    --cc=zhangfx@lemote.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.