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@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Julien Grall authored and Stefano Stabellini committed 2018-11-09 10:14:24 -08:00
1 parent f6642a7679
commit da35d9e3f1
2 files changed
+10 -10

No files matched your search

-10
View File
@@ -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.
+10
View File
@@ -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:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.