From patchwork Thu Aug 2 23:17:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tri Vo X-Patchwork-Id: 10554315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 26951139A for ; Thu, 2 Aug 2018 23:19:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12E8C2BCD0 for ; Thu, 2 Aug 2018 23:19:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 049372BD1B; Thu, 2 Aug 2018 23:19:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9EE642BCD0 for ; Thu, 2 Aug 2018 23:19:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ypb2jUobXvGRJqzmPKAAag4p2A1GSpSiMa8lDOcgIYo=; b=KEYkSsrKtPNEHg 858PhKKMRmoPYB+j/emkjzVSlo2+mbcE2ohU0zkPGhtWyRMqJBpqMaD/OtQuDKWzDyw9ziLev/LIl lmbNBOXLiE4hSbX4OX0MJucZP5nPzvVTqe2gTVmkPerWQp6RKr57wrDvQVlYwWiVABLuU4Z5aWwoh yn8L8gROYzKRahUm+gUVYNqo81Fzn/yFL+Ktccqt9Q2Vy9RRgHqmdIh5CeAs1nnOjwAX478uZparp UBz8Vo2sowBW7N1BetZKo5aV5LZdzQu2TiN172sWaTpqtXHz0ORrSDSV3XqoMYqbRmWGnqHllBH7t SKWJJ0bjch3ZIJqLPlMw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flMry-0007jR-CY; Thu, 02 Aug 2018 23:18:58 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1flMrv-0007iO-LV for linux-arm-kernel@lists.infradead.org; Thu, 02 Aug 2018 23:18:57 +0000 Received: by mail-pf1-x444.google.com with SMTP id l9-v6so2160004pff.9 for ; Thu, 02 Aug 2018 16:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d0auiR8NPrIWMkKJ+G6JZleg2wpPHG5QWQ5tmgiUfUE=; b=nC0ABRVAznSOwbYABe+ySPFNV0LhTpIMNlQaUpNbH0v9Mnxv13+acoxsXt53AWNANT n9yPuevxiUB00DyO2ClfNCtmpvgTzb6l7kaNdD1/Tdq8aAvgWoWm6vz5uioW1Z1AhaTl 8C4Md3HopcSugSSucJOtf2HnXKHB0tLlsKkkKkrIL5Gwho/eu3Y+7joeIDsOG/x95bFb dKxIvxf/9PRY83ince13NN4llJ/48rAJorknRMY+qbRxSRDggZ7wQYzKlNwFi1qRzqWJ WRFLZ1Ed+sHHITu2h4iONHoCxJubX9Qc3hKj0yg5ntVlxxyWDL4SWGPq/qrq6EWxaxes yOMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d0auiR8NPrIWMkKJ+G6JZleg2wpPHG5QWQ5tmgiUfUE=; b=bN0+QESqXpSN7SGMPqDpnkrzyzS96EURZi/OS38AOJ6sxGMnlT0/pw2vshIB7kkZbI 8yCWivaftMhfYl8XB/uOgNlWGsXEBkhZn+tApuAeDOxAQGr6woIGmvn660U1f0Otyi98 mJ2PboXI3C5WzKD1i0UJIruGEUYo6hXpf4lSNWCjooB+I7njqCDAmSFFoAKtv/L7H+qz RkSfd2DWos+waekJ/QguhHCoQLn1OuVR/ra7Az+OHGeOTvhX0NgSEiCnZIeoQ02ts5Mf 9m2A7LG2h2smeYGqt38qrXzSUgAHv+GyA9kYuipsuOoeSBy1/zodyxnZO7fqd6zJ7jhq TqSA== X-Gm-Message-State: AOUpUlGgtDm2M2I9Mudeau/VmmCJOK1+J2hcFj3FEZUepHZwiGQ/HXcT AHyZaahekLTLvTDTiNg1jNc3JkSx/Og= X-Google-Smtp-Source: AAOMgpcJbzgtYue0bfA1eeG5j/orDf1e496D04YiVTnFanZ+Id23wLctn2O24y/TqFpVFUty8M/ubw== X-Received: by 2002:a65:60cf:: with SMTP id r15-v6mr1295391pgv.41.1533251922944; Thu, 02 Aug 2018 16:18:42 -0700 (PDT) Received: from trong0.mtv.corp.google.com ([2620:0:1000:1601:c43f:8c1b:f6ef:3dce]) by smtp.gmail.com with ESMTPSA id z2-v6sm2920420pgv.12.2018.08.02.16.18.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Aug 2018 16:18:42 -0700 (PDT) From: Tri Vo To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: build CONFIG_ARM64_LSE_ATOMICS without -ffixed- flags Date: Thu, 2 Aug 2018 16:17:53 -0700 Message-Id: <20180802231753.86336-1-trong@android.com> X-Mailer: git-send-email 2.18.0.597.ga71716f1ad-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180802_161855_748353_80136452 X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, ndesaulniers@google.com, kernel-team@android.com, will.deacon@arm.com, Tri Vo Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Remove -ffixed- compile flags as they are not required for correct behavior of out-of-line ll/sc implementations of atomic functions. Registers (except x0 which contains return value) only need to be callee-saved, not necessarily fixed. For readability purposes, represent "callee-saves-all-registers" calling convention with a combination of -fcall-used- and -fcall-saved- flags only. Signed-off-by: Tri Vo --- arch/arm64/lib/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.18.0.597.ga71716f1ad-goog diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile index c86b7909ef31..05ba3d276c15 100644 --- a/arch/arm64/lib/Makefile +++ b/arch/arm64/lib/Makefile @@ -11,9 +11,9 @@ lib-y := bitops.o clear_user.o delay.o copy_from_user.o \ # when supported by the CPU. Result and argument registers are handled # correctly, based on the function prototype. lib-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o -CFLAGS_atomic_ll_sc.o := -fcall-used-x0 -ffixed-x1 -ffixed-x2 \ - -ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6 \ - -ffixed-x7 -fcall-saved-x8 -fcall-saved-x9 \ - -fcall-saved-x10 -fcall-saved-x11 -fcall-saved-x12 \ - -fcall-saved-x13 -fcall-saved-x14 -fcall-saved-x15 \ - -fcall-saved-x18 +CFLAGS_atomic_ll_sc.o := -fcall-used-x0 -fcall-saved-x1 \ + -fcall-saved-x2 -fcall-saved-x3 -fcall-saved-x4 \ + -fcall-saved-x5 -fcall-saved-x6 -fcall-saved-x7 \ + -fcall-saved-x8 -fcall-saved-x9 -fcall-saved-x10 \ + -fcall-saved-x11 -fcall-saved-x12 -fcall-saved-x13 \ + -fcall-saved-x14 -fcall-saved-x15 -fcall-saved-x18