arm/time,vtimer: Get rid of READ/WRITE_SYSREG32
authorMichal Orzel <michal.orzel@arm.com>
Wed, 5 May 2021 07:43:07 +0000 (09:43 +0200)
committerJulien Grall <jgrall@amazon.com>
Mon, 10 May 2021 17:16:34 +0000 (18:16 +0100)
commit3f568354a95ee2f0c9c553efb94c734fa6848af0
tree42d2a7741a72d30de6a76f17b9fc5bafa28af1fe
parent86faae561cd8eee819e0f42ba7a18dd180aa49d1
arm/time,vtimer: Get rid of READ/WRITE_SYSREG32

AArch64 registers are 64bit whereas AArch32 registers
are 32bit or 64bit. MSR/MRS are expecting 64bit values thus
we should get rid of helpers READ/WRITE_SYSREG32
in favour of using READ/WRITE_SYSREG.
We should also use register_t type when reading sysregs
which can correspond to uint64_t or uint32_t.
Even though many AArch64 registers have upper 32bit reserved
it does not mean that they can't be widen in the future.

Modify type of vtimer structure's member: ctl to register_t.

Add macro CNTFRQ_MASK containing mask for timer clock frequency
field of CNTFRQ_EL0 register.

Modify CNTx_CTL_* macros to return unsigned long instead of
unsigned int as ctl is now of type register_t.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/time.c
xen/arch/arm/vtimer.c
xen/include/asm-arm/domain.h
xen/include/asm-arm/processor.h