[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: Move VABORT_GEN_BY_GUEST to traps.h and turned into inline
commit da35d9e3f1ee8d41b1162bfdc515ded2b88bdece Author: Julien Grall <julien.grall@xxxxxxx> AuthorDate: Wed Oct 31 18:12:58 2018 +0000 Commit: Stefano Stabellini <sstabellini@xxxxxxxxxx> CommitDate: Fri Nov 9 10:14:24 2018 -0800 xen/arm: Move VABORT_GEN_BY_GUEST to traps.h and turned into inline The macro VABORT_GEN_BY_GUEST is only used by the trap code. So move it to trap.h. While moving the code, convert is to a static inline to allow typecheck. Signed-off-by: Julien Grall <julien.grall@xxxxxxx> Reviewed-by: Andrii Anisov <andrii_anisov@xxxxxxxx> Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/include/asm-arm/processor.h | 10 ---------- xen/include/asm-arm/traps.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index bdce0df122..3f40468bfd 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -684,16 +684,6 @@ void do_trap_guest_serror(struct cpu_user_regs *regs); register_t get_default_hcr_flags(void); -/* Functions for pending virtual abort checking window. */ -void abort_guest_exit_start(void); -void abort_guest_exit_end(void); - -#define VABORT_GEN_BY_GUEST(r) \ -( \ - ( (unsigned long)abort_guest_exit_start == (r)->pc ) || \ - ( (unsigned long)abort_guest_exit_end == (r)->pc ) \ -) - /* * Synchronize SError unless the feature is selected. * This is relying on the SErrors are currently unmasked. diff --git a/xen/include/asm-arm/traps.h b/xen/include/asm-arm/traps.h index d30ee1e01e..a0406b5a3c 100644 --- a/xen/include/asm-arm/traps.h +++ b/xen/include/asm-arm/traps.h @@ -45,6 +45,16 @@ void do_trap_hvc_smccc(struct cpu_user_regs *regs); int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc); +/* Functions for pending virtual abort checking window. */ +void abort_guest_exit_start(void); +void abort_guest_exit_end(void); + +static inline bool VABORT_GEN_BY_GUEST(const struct cpu_user_regs *regs) +{ + return ((unsigned long)abort_guest_exit_start == regs->pc) || + (unsigned long)abort_guest_exit_end == regs->pc; +} + #endif /* __ASM_ARM_TRAPS__ */ /* * Local variables: -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |