lkml.org 
[lkml]   [2019]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2 v3] MIPS: Ingenic: Fix bugs when calculate bogomips/lpj.
Date
Hi Paul,

On Thu, Aug 01, 2019 at 09:26:09PM -0400, Paul Cercueil wrote:
> > diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
> > index eb527a1..2bdd3e1 100644
> > --- a/arch/mips/kernel/cpu-probe.c
> > +++ b/arch/mips/kernel/cpu-probe.c
> > @@ -1964,6 +1964,13 @@ static inline void cpu_probe_ingenic(struct
> > cpuinfo_mips *c, unsigned int cpu)
> > c->cputype = CPU_XBURST;
> > c->writecombine = _CACHE_UNCACHED_ACCELERATED;
> > __cpu_name[cpu] = "Ingenic XBurst";
> > + /*
> > + * The XBurst core by default attempts to avoid branch target
> > + * buffer lookups by detecting & special casing loops. This
> > + * feature will cause BogoMIPS and lpj calculate in error.
> > + * Set cp0 config7 bit 4 to disable this feature.
> > + */
> > + set_c0_config7(MIPS_CONF7_BTB_LOOP_EN);
>
> Shouldn't it be MIPS_CONF7_BTB_LOOP_DIS then?
> Since the feature is disabled when the bit is set.

The name comes from the fact that we're enabling loops to use the BTB,
in contrast to the default state where this bit is zero & the bad
optimization kicks in causing loops not to use the BTB.

Thanks,
Paul

\
 
 \ /
  Last update: 2019-08-02 19:33    [W:0.072 / U:4.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site