lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190802173142.avzg4qn733ju4kqf@pburton-laptop>
Date:   Fri, 2 Aug 2019 17:32:26 +0000
From:   Paul Burton <paul.burton@...s.com>
To:     Paul Cercueil <paul@...pouillou.net>
CC:     Zhou Yanjie <zhouyanjie@...o.com>,
        "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "ralf@...ux-mips.org" <ralf@...ux-mips.org>,
        "jhogan@...nel.org" <jhogan@...nel.org>,
        "malat@...ian.org" <malat@...ian.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "allison@...utok.net" <allison@...utok.net>,
        "syq@...ian.org" <syq@...ian.org>,
        "chenhc@...ote.com" <chenhc@...ote.com>,
        "jiaxun.yang@...goat.com" <jiaxun.yang@...goat.com>
Subject: Re: [PATCH 2/2 v3] MIPS: Ingenic: Fix bugs when calculate
 bogomips/lpj.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ