[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] xen/arm: mark __guest_cmpxchg always_inline



Hi Stewart,

On 14/04/2023 19:57, Stewart Hildebrand wrote:
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@xxxxxxx
---
I considered also changing "guest_cmpxchg64" just below in the same file to
always_inline, but I decided not to because this function does not take a size
parameter.

Make sense. I will fixed the signed-off-by line issue reported by Henry while committing:

Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.