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] [day] [month] [year] [list]
Message-ID: <20170112184138.GN4930@rric.localdomain>
Date:   Thu, 12 Jan 2017 19:41:38 +0100
From:   Robert Richter <robert.richter@...ium.com>
To:     Will Deacon <will.deacon@....com>
CC:     Catalin Marinas <catalin.marinas@....com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arm64: errata: Provide macro for major and minor cpu
 revisions

On 12.01.17 15:33:15, Will Deacon wrote:
> On Wed, Jan 11, 2017 at 01:11:42PM +0100, Robert Richter wrote:
> > Definition of cpu ranges are hard to read if the cpu variant is not
> > zero. Provide MIDR_CPU_FULL_REV() macro to describe the full hardware
> > revision of a cpu including variant and (minor) revision.
> > 
> > Signed-off-by: Robert Richter <rrichter@...ium.com>
> > ---
> >  arch/arm64/include/asm/cputype.h |  3 +++
> >  arch/arm64/kernel/cpu_errata.c   | 15 +++++++++------
> >  arch/arm64/kernel/cpufeature.c   |  8 +++-----
> >  3 files changed, 15 insertions(+), 11 deletions(-)
> > 
> > diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h
> > index 26a68ddb11c1..983e59cbdd54 100644
> > --- a/arch/arm64/include/asm/cputype.h
> > +++ b/arch/arm64/include/asm/cputype.h
> > @@ -56,6 +56,9 @@
> >  	(0xf			<< MIDR_ARCHITECTURE_SHIFT) | \
> >  	((partnum)		<< MIDR_PARTNUM_SHIFT))
> >  
> > +#define MIDR_CPU_FULL_REV(var, rev) \
> > +	(((var)	<< MIDR_VARIANT_SHIFT) | (rev))
> 
> Minor nit, but could you rename this to MIDR_CPU_VAR_REV instead please?
> The revision field *is* the bottom 4 bits, so "full" rev doesn't really
> make a lot of sense.

Yeah, this is that I had in my first version. I wasn't sure on the
naming, so I am fine with your proposal.

Will resubmit.

Thanks,

-Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ