mirror of
https://github.com/torvalds/linux.git
synced 2024-11-19 02:21:47 +00:00
KVM: arm64: add SYS_DESC()
This patch adds a macro enabling us to initialise sys_reg_desc structures based on common sysreg encoding definitions in <asm/sysreg.h>. Subsequent patches will use this to simplify the KVM code. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: kvmarm@lists.cs.columbia.edu
This commit is contained in:
parent
4dc529257d
commit
8db5d8f141
@ -147,4 +147,9 @@ const struct sys_reg_desc *find_reg_by_id(u64 id,
|
|||||||
#define CRm(_x) .CRm = _x
|
#define CRm(_x) .CRm = _x
|
||||||
#define Op2(_x) .Op2 = _x
|
#define Op2(_x) .Op2 = _x
|
||||||
|
|
||||||
|
#define SYS_DESC(reg) \
|
||||||
|
Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \
|
||||||
|
CRn(sys_reg_CRn(reg)), CRm(sys_reg_CRm(reg)), \
|
||||||
|
Op2(sys_reg_Op2(reg))
|
||||||
|
|
||||||
#endif /* __ARM64_KVM_SYS_REGS_LOCAL_H__ */
|
#endif /* __ARM64_KVM_SYS_REGS_LOCAL_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user