[PATCH 1/4] arm64: drop redundant macros from read_cpuid()

Will Deacon will.deacon at arm.com
Tue Dec 17 07:10:33 EST 2013


On Tue, Dec 17, 2013 at 12:04:31PM +0000, Catalin Marinas wrote:
> On Mon, Dec 16, 2013 at 09:04:35PM +0000, Ard Biesheuvel wrote:
> >  #define read_cpuid(reg) ({						\
> >  	u64 __val;							\
> > -	asm("mrs	%0, " reg : "=r" (__val));			\
> > +	asm("mrs	%0, " #reg : "=r" (__val));			\
> >  	__val;								\
> >  })
> >  
> > @@ -54,12 +44,12 @@
> >   */
> >  static inline u32 __attribute_const__ read_cpuid_id(void)
> >  {
> > -	return read_cpuid(ID_MIDR_EL1);
> > +	return read_cpuid(MIDR_EL1);
> >  }
> 
> It makes sense. Just nitpick, could you please use lowercase register
> names for consistency?

Hmm: cputype, hw_breakpoint, perf and kvm are using upper-case names...

Will



More information about the linux-arm-kernel mailing list