From patchwork Fri Sep 11 10:45:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11770337 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC6D592C for ; Fri, 11 Sep 2020 10:45:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8AB9220578 for ; Fri, 11 Sep 2020 10:45:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AB9220578 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kGgYe-00049F-L0; Fri, 11 Sep 2020 10:45:32 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kGgYd-00049A-Jd for xen-devel@lists.xenproject.org; Fri, 11 Sep 2020 10:45:31 +0000 X-Inumbo-ID: f0976dea-adb7-424f-9d27-864a10b891f7 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f0976dea-adb7-424f-9d27-864a10b891f7; Fri, 11 Sep 2020 10:45:31 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BA0E5B32E; Fri, 11 Sep 2020 10:45:45 +0000 (UTC) From: Jan Beulich Subject: [PATCH v2] Arm64: force gcc 10+ to always inline generic atomics helpers To: "xen-devel@lists.xenproject.org" Cc: Julien Grall , Stefano Stabellini Message-ID: <0ad3619d-8be9-99bc-552f-675156c47dfe@suse.com> Date: Fri, 11 Sep 2020 12:45:33 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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 Signed-off-by: Jan Beulich Reviewed-by: Julien Grall Reviewed-by: Bertrand Marquis --- 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)