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

Re: [PATCH v2] Arm64: force gcc 10+ to always inline generic atomics helpers


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Fri, 11 Sep 2020 12:36:16 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gUeoKTYDr98M/XLivlT+wMguXe6b4IRc+9EmhNoYR+A=; b=D2oCyxYoetnLiwqk/YW7FTxaVUBfw+qFovMni7NAbP259HPwVF5O/zEKardUU+nr3+dVMq7BI/ijTKXny5XJ8Z85CB0RpE7sD8FwHhmEXAQqqmuVbbIc1JLxurrYcjJ5nkUGtbgHW3EIkMd0QeQVSan+fGE+oSbVXmyiRfzOYXRmPHdeYXZ2khc856ITTrUWwp2CiEvHeB6TcsrneqswRR/WaQSJlfMwgF6R3fGL6LCkMuehTPOGoeTPH62CTcdTZUH9ytTdpwB0rrnw9Of86LWnB91Qa/+h2xAVM0Be5prfwqDuCQSrSW+I1FbnlLd+sQyIeu/K7a7ZwbEe3t4XYQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R1lYgrXijIzIkLulma+sAN0NjaE5n1yOTw1dsWYic0dEivLO1C8J/2mX7pkgfnIZ7Q6fowLVSkllJIMFix6LhfOPCvOBXBcAL4OFGW3ZEEkvzU3QV+uWHDK9E13Kcg+HSRvwA8EkQtloa8amZb4VSPhBXF8ntlWQA1v9Sy0a4dZDUTr/b6mblaTHOwns7mDfEi5XupHmPN8lyKTTk6/nTRkT0yI/VTKCONZ7jKbO+Dw/AWzjcFrn7thxtolLH/YmEvNK7p71e7ukkyqgDSn57Qxzg12m4+o+mUUIH4FyntH1gOK6UVrNjV4i887vZC8i/OUeHmmGtgmadVVlakKv9w==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 11 Sep 2020 12:36:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWiCjnFExSwOkCzUa85TKo+Ex39KljX/WA
  • Thread-topic: [PATCH v2] Arm64: force gcc 10+ to always inline generic atomics helpers


> On 11 Sep 2020, at 11:45, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> Recent versions of gcc (at least 10.x) will not inline generic atomics 
> helpers by default. Instead they will expect the software to either link
> with libatomic.so or implement the helpers, which would result in
> 
> undefined reference to `__aarch64_ldadd4_acq_rel'
> 
> for us (not having any local implementation).
> 
> To keep the previous behavior, force gcc to always inline the generic
> atomics helpers.
> 
> Long term we probably want to avoid relying on gcc atomics helpers as
> this doesn't allow us to switch between LSE and LL/SC atomics.
> 
> Suggested-by: Julien Grall <jgrall@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

> ---
> v2: Title and description redone.
> 
> --- a/xen/arch/arm/arch.mk
> +++ b/xen/arch/arm/arch.mk
> @@ -12,6 +12,7 @@ CFLAGS-$(CONFIG_ARM_32) += -mcpu=cortex-
> 
> CFLAGS-$(CONFIG_ARM_64) += -mcpu=generic
> CFLAGS-$(CONFIG_ARM_64) += -mgeneral-regs-only # No fp registers etc
> +$(call cc-option-add,CFLAGS-$(CONFIG_ARM_64),CC,-mno-outline-atomics)
> 
> ifneq ($(filter command line environment,$(origin CONFIG_EARLY_PRINTK)),)
>     $(error You must use 'make menuconfig' to enable/disable early printk now)
> 




 


Rackspace

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