mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: mark __guest_cmpxchg always_inline
When building the hypervisor with -Og, we run into a __bad_cmpxchg link error: aarch64-none-linux-gnu-ld: prelink.o: in function `__int_cmpxchg': .../xen/./arch/arm/include/asm/arm64/cmpxchg.h:117: undefined reference to `__bad_cmpxchg' aarch64-none-linux-gnu-ld: .../xen/./arch/arm/include/asm/arm64/cmpxchg.h:117: undefined reference to `__bad_cmpxchg' aarch64-none-linux-gnu-ld: ./.xen-syms.0: hidden symbol `__bad_cmpxchg' isn't defined aarch64-none-linux-gnu-ld: final link failed: bad value This is due to the function __guest_cmpxchg not being inlined in the -Og build with gcc 12. Fix this by marking __guest_cmpxchg always_inline. Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com> Reviewed-by: Julien Grall <jgrall@amazon.com> Reviewed-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
1 parent
e74360e4ba
commit
0678220def
1 file changed
+5
-5
@@ -86,11 +86,11 @@ static inline void guest_clear_mask16(struct domain *d, uint16_t mask,
|
||||
domain_unpause(d);
|
||||
}
|
||||
|
||||
static inline unsigned long __guest_cmpxchg(struct domain *d,
|
||||
volatile void *ptr,
|
||||
unsigned long old,
|
||||
unsigned long new,
|
||||
unsigned int size)
|
||||
static always_inline unsigned long __guest_cmpxchg(struct domain *d,
|
||||
volatile void *ptr,
|
||||
unsigned long old,
|
||||
unsigned long new,
|
||||
unsigned int size)
|
||||
{
|
||||
unsigned long oldval = old;
|
||||
|
||||
|
||||