[PATCH 1/2] arm64: Change the cpuinfo_arm64 member type for some sysregs to u64

Catalin Marinas catalin.marinas at arm.com
Wed May 26 09:07:32 PDT 2021


On Mon, May 24, 2021 at 09:31:24AM +0800, Shaokun Zhang wrote:
> On 2021/5/12 2:23, Catalin Marinas wrote:
> > diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h
> > index 7faae6ff3ab4..fe5a8499ddc2 100644
> > --- a/arch/arm64/include/asm/cpu.h
> > +++ b/arch/arm64/include/asm/cpu.h
> > @@ -15,11 +15,11 @@
> >  struct cpuinfo_arm64 {
> >  	struct cpu	cpu;
> >  	struct kobject	kobj;
> > -	u32		reg_ctr;
> > -	u32		reg_cntfrq;
> > -	u32		reg_dczid;
> > -	u32		reg_midr;
> > -	u32		reg_revidr;
> > +	u64		reg_ctr;
> > +	u64		reg_cntfrq;
> 
> One more question: is it ok to change the function prototype to u64 also?
> For CNTFRQ_EL0, if the Arm ARM expand the clock to more than 4GHz and it
> will also work this change (arch_timer and watchdog shall change at the
> the same time).

I think I'll keep cntfrq as u32. It matches the function prototype and
the arm32 code which shares the same driver. Also, from ARMv8.6, there's
a requirement that CNTFRQ_EL0 is standardised at 1GHz.

-- 
Catalin



More information about the linux-arm-kernel mailing list