* Define macro ALIGN to set alignment. Header file asm_macros.h should not
contain architecture specific code. Replace hardcoded alignment value with
a call to macro ALIGN.
* Move declaration of shared_info into xtf/traps.h. Declaration of
shared_info structure should be placed in xtf/traps.h as it is a common
declaration for all the possible architectures.
* Do not protect including <arch/barrier.h>. We should always include
<arch/barrier.h> and rely on the compiler to throw an error. This would
avoid increasing #if protection each time we would add a new architecture.
Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
# define __ASM_CODE_RAW(x) #x
#endif
+#define ALIGN .align 16
+
/* Select between two variations based on compat or long mode. */
#ifdef __i386__
# define __ASM_SEL(c, l) __ASM_CODE(c)
extern xen_pv_start_info_t *pv_start_info;
extern xen_pvh_start_info_t *pvh_start_info;
-extern shared_info_t shared_info;
/*
* Parameters for fine tuning the exec_user_*() behaviour.
* @param name Function name.
*/
#define ENTRY(name) \
- .align 16; \
+ ALIGN; \
GLOBAL(name)
/**
#ifndef XTF_BARRIER_H
#define XTF_BARRIER_H
-#if defined(__x86_64__) || defined (__i386__)
# include <arch/barrier.h>
-#else
-# error Bad architecture
-#endif
#endif /* XTF_BARRIER_H */
#include <arch/traps.h>
+extern shared_info_t shared_info;
+
/**
* May be implemented by a guest to provide custom exception handling.
*/