From patchwork Tue Jun 27 01:20:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 106383 Delivered-To: patch@linaro.org Received: by 10.182.135.102 with SMTP id pr6csp1876797obb; Mon, 26 Jun 2017 18:20:27 -0700 (PDT) X-Received: by 10.84.231.136 with SMTP id g8mr3066997plk.257.1498526427168; Mon, 26 Jun 2017 18:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498526427; cv=none; d=google.com; s=arc-20160816; b=m0ufFKDBEEv1my2bfYy0IxHBk2ZoMrVP9dtf0kw33H99IuLdw6gj6Osoq/2pCE0aOz EcDA7eWtfgcTT95qy77Y9W99xNmLv67kTDKnn1Y5ZjmhBVGI/7TZ0c5hCR4tAhzmLQTm 8CV5ZKj12D7B+iJdtJbCbJ/ouOLQ05rJRY0PO0FxOrl+DShFVKCgTXUkw7JqZz2o3Fqk V0a0Kht3jays6CHUk2LrMMC2AxQNQ/f4f25TrGCsDI9qMxRKe7MoYV8nV/9h1eSNsx0T S1yQLnBN2pdQq3z7cqBg6TLK0PNDlCbH/xwUN6178TUwwsES+UcX4148Gd1K/IecNTE0 wCWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:delivered-to:sender :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=sI42wiZxFMMBqEHC5EAOZuF9UbqNDuBZvV8ZZLWij/I=; b=GcaJjcD5jwfP+f0W0s9w2TVD60tUwgKgsq0dVjyDqxfWzL4Yjc5rOFVrPtUubkT4o4 f0aQcdini6F1qAvbtdPUVysauqEtgcfeSfuZ+2Mc7Ec4XFddR1pLvgR4Dcd0v8P2ZX4E jhcIxcEgh4cgEmsyZz+q02Au/1WwzxHOKbg9cKKYodxWqKR1zKAvGzX0c8spGVi7WQgl szs1+uUH+fBsOLeklrDUQnyZ6VqWArzqiQM+sKM61vLIdLjqmM+i78+r3e/4j4hyJqB0 jk/74p+HqvxLUhu2xLT1eClAkdc68JixIB2bORCXJP7GzJzBfmg69c31ei67Uu9FexQg 4Ang== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.b=F2Sqv6yC; spf=pass (google.com: domain of gcc-patches-return-456872-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-456872-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id k15si980526pgs.116.2017.06.26.18.20.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jun 2017 18:20:27 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-456872-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.b=F2Sqv6yC; spf=pass (google.com: domain of gcc-patches-return-456872-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-456872-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=aqsZH/S/UDw4RxCID1wXoAzyjFeP/mg2G+hpFXGfDELr8c 4QVOjTtp5kZUuBhBcWUzFQt40maieFHBYHexCYJVeT5lUQcJJeWw49z+Nr3qTblq W1ymb2I60X4SLMBsS0wu8NRqRoorQ9Buxg29UPEh9AJgF86DT+sUpv26rLgjc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=81BqefPaGan+1p0bgwpSXVNVX7Y=; b=F2Sqv6yCRecgqlBcTzmG rCMs43E7f1dHod+BT8Ch8EshZnzu6CqmpxCj3KXW1cHgJPN/5oJCX8FkpER0l2BH 7MEASuwOMC/FqEezyKJkFfy8EllpVTyQQl9ZacNUXUzcz4Dd09lrffB1c13ivtsw WvFGdewflbHVxWnqP4aa/Q4= Received: (qmail 57189 invoked by alias); 27 Jun 2017 01:20:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 57109 invoked by uid 89); 27 Jun 2017 01:20:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qk0-f171.google.com Received: from mail-qk0-f171.google.com (HELO mail-qk0-f171.google.com) (209.85.220.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Jun 2017 01:20:05 +0000 Received: by mail-qk0-f171.google.com with SMTP id 16so14788821qkg.2 for ; Mon, 26 Jun 2017 18:20:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OgsfcEBaXftipT8vZs6lfvacTFHy/GHmJQ2+Vu+yZc8=; b=SeXVce8MLaiaJsvaOXV/w9Y7O6kB4KaLhvnBnZHj2hK9ScrNCgzATOEkMgc3Z11HZF +JIbgPUak9pHKuNJO09T5kXTrwcs60IhM+weTeDTJSr/yB4SPCvhQjLOJTzLfdgzDOTX eaNKe9W+OMXVCljpSj0myHU2EgxZZWeG3ZDnp5qf81mWvQvdmFHHGeTwkeAwieKKX9D8 ZNx9itpJLtnpaoam/mNl79ldA/30t5WQ9NyX33wVFTSYJXwxdv6gkx2umNWr3iuplQfk 19mqsZsecE37pFEjm2zcEr5YD/WKbukwqOqHPZn4SJ4EmkxVD3ON1Qd4Wo57chPC20yE NWfw== X-Gm-Message-State: AKS2vOxZk4Hq0sYnJEpS++k6WfbeUVDzpwvDqWaiDY/KeryxAbe3sL4o 7pKzmYIY+2nzcySLcjEi/W7gYU1kidXt5DyIyw== X-Received: by 10.55.76.71 with SMTP id z68mr3691969qka.8.1498526403615; Mon, 26 Jun 2017 18:20:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.36.155 with HTTP; Mon, 26 Jun 2017 18:20:02 -0700 (PDT) From: Kugan Vivekanandarajah Date: Tue, 27 Jun 2017 11:20:02 +1000 Message-ID: Subject: [AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341 To: "gcc-patches@gcc.gnu.org" , James Greenhalgh , Richard Earnshaw X-IsSubscribed: yes https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00614.html added this workaround to get kernel building with when TARGET_FIX_ERR_A53_843419 is enabled. This was added to support building kernel loadable modules. In kernel, when CONFIG_ARM64_ERRATUM_843419 is selected, the relocation needed for ADRP/LDR (R_AARCH64_ADR_PREL_PG_HI21 and R_AARCH64_ADR_PREL_PG_HI21_NC are removed from the kernel to avoid loading objects with possibly offending sequence). Thus, it could only support pc relative literal loads. However, the following patch was posted to kernel to add -mpc-relative-literal-loads http://www.spinics.net/lists/arm-kernel/msg476149.html -mpc-relative-literal-loads is unconditionally added to the kernel build as can be seen from: https://github.com/torvalds/linux/blob/master/arch/arm64/Makefile Therefore this patch removes the hunk so that applications like SPECcpu2017's 521/621.wrf can be built (with LTO in this case) without -mno-pc-relative-literal-loads Bootstrapped and regression tested on aarch64-linux-gnu with no new regressions. Is this OK for trunk? Thanks, Kugan gcc/testsuite/ChangeLog: 2017-06-27 Kugan Vivekanandarajah * gcc.target/aarch64/pr63304_1.c: Remove-mno-fix-cortex-a53-843419. gcc/ChangeLog: 2017-06-27 Kugan Vivekanandarajah * config/aarch64/aarch64.c (aarch64_override_options_after_change_1): Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341 for default. >From bf5d8151ad6a83903f51529655e83181bdb67200 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Thu, 8 Jun 2017 15:51:29 +1000 Subject: [PATCH] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341 --- gcc/config/aarch64/aarch64.c | 11 ----------- gcc/testsuite/gcc.target/aarch64/pr63304_1.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 71f9819..99cfd20 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -8632,17 +8632,6 @@ aarch64_override_options_after_change_1 (struct gcc_options *opts) if (opts->x_pcrelative_literal_loads == 1) aarch64_pcrelative_literal_loads = true; - /* This is PR70113. When building the Linux kernel with - CONFIG_ARM64_ERRATUM_843419, support for relocations - R_AARCH64_ADR_PREL_PG_HI21 and R_AARCH64_ADR_PREL_PG_HI21_NC is - removed from the kernel to avoid loading objects with possibly - offending sequences. Without -mpc-relative-literal-loads we would - generate such relocations, preventing the kernel build from - succeeding. */ - if (opts->x_pcrelative_literal_loads == 2 - && TARGET_FIX_ERR_A53_843419) - aarch64_pcrelative_literal_loads = true; - /* In the tiny memory model it makes no sense to disallow PC relative literal pool loads. */ if (aarch64_cmodel == AARCH64_CMODEL_TINY diff --git a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c index c917f81c..fa0fb56 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c +++ b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c @@ -1,5 +1,5 @@ /* { dg-do assemble } */ -/* { dg-options "-O1 --save-temps -mno-fix-cortex-a53-843419" } */ +/* { dg-options "-O1 --save-temps" } */ #pragma GCC push_options #pragma GCC target ("+nothing+simd, cmodel=small") -- 2.7.4