[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] arm64/vfp: Get rid of READ/WRITE_SYSREG32
commit 8990f0eaca139364091109389416455f4f78cd65 Author: Michal Orzel <michal.orzel@xxxxxxx> AuthorDate: Wed May 5 09:42:59 2021 +0200 Commit: Julien Grall <jgrall@xxxxxxxxxx> CommitDate: Mon May 10 18:16:34 2021 +0100 arm64/vfp: 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 FPCR, FPSR, FPEXC32_EL2 to register_t. Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx> --- xen/arch/arm/arm64/vfp.c | 12 ++++++------ xen/include/asm-arm/arm64/vfp.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/arm64/vfp.c b/xen/arch/arm/arm64/vfp.c index 999a0d58a5..47885e76ba 100644 --- a/xen/arch/arm/arm64/vfp.c +++ b/xen/arch/arm/arm64/vfp.c @@ -26,10 +26,10 @@ void vfp_save_state(struct vcpu *v) "stp q30, q31, [%1, #16 * 30]\n\t" : "=Q" (*v->arch.vfp.fpregs) : "r" (v->arch.vfp.fpregs)); - v->arch.vfp.fpsr = READ_SYSREG32(FPSR); - v->arch.vfp.fpcr = READ_SYSREG32(FPCR); + v->arch.vfp.fpsr = READ_SYSREG(FPSR); + v->arch.vfp.fpcr = READ_SYSREG(FPCR); if ( is_32bit_domain(v->domain) ) - v->arch.vfp.fpexc32_el2 = READ_SYSREG32(FPEXC32_EL2); + v->arch.vfp.fpexc32_el2 = READ_SYSREG(FPEXC32_EL2); } void vfp_restore_state(struct vcpu *v) @@ -55,8 +55,8 @@ void vfp_restore_state(struct vcpu *v) "ldp q30, q31, [%1, #16 * 30]\n\t" : : "Q" (*v->arch.vfp.fpregs), "r" (v->arch.vfp.fpregs)); - WRITE_SYSREG32(v->arch.vfp.fpsr, FPSR); - WRITE_SYSREG32(v->arch.vfp.fpcr, FPCR); + WRITE_SYSREG(v->arch.vfp.fpsr, FPSR); + WRITE_SYSREG(v->arch.vfp.fpcr, FPCR); if ( is_32bit_domain(v->domain) ) - WRITE_SYSREG32(v->arch.vfp.fpexc32_el2, FPEXC32_EL2); + WRITE_SYSREG(v->arch.vfp.fpexc32_el2, FPEXC32_EL2); } diff --git a/xen/include/asm-arm/arm64/vfp.h b/xen/include/asm-arm/arm64/vfp.h index 6ab5d36c6c..e6e8c363bc 100644 --- a/xen/include/asm-arm/arm64/vfp.h +++ b/xen/include/asm-arm/arm64/vfp.h @@ -7,9 +7,9 @@ struct vfp_state { uint64_t fpregs[64] __vfp_aligned; - uint32_t fpcr; - uint32_t fpexc32_el2; - uint32_t fpsr; + register_t fpcr; + register_t fpexc32_el2; + register_t fpsr; }; #endif /* _ARM_ARM64_VFP_H */ -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |